• Stars
    star
    2,560
  • Rank 17,784 (Top 0.4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Modern, privacy-friendly, and detailed web analytics that works without cookies or JS.

Shynet logo

Modern, privacy-friendly, and cookie-free web analytics.
Getting started ยป

Screenshots โ€ข Features โ€ข Office Hours


Motivation

There are a lot of web analytics tools. Unfortunately, most of them come with the following caveats:

  • They require handing all of your visitors' info to a third-party company
  • They use cookies to track visitors across sessions, so you need to have those annoying cookie notices
  • They collect so much personal data that even the NSA is jealous
  • They are closed source and/or expensive, often with limited data portability
  • They are hard to use

Shynet has none of these caveats. You host it yourself, so the data is yours. It works without cookies, so you don't need any intrusive cookie notices. It collects just enough data to be useful, but not enough to be creepy. It's open source and intended to be self-hosted. And you may even find the interface easy to use.

Shynet is a portmanteau of "Skynet" and "shy." The idea is that it gives you loads of useful information (Skynet) while also respecting your visitors' privacy (shy).

Screenshots

Note: These screenshots have been edited to hide sensitive data. The "real" Shynet has a lot more pages and information available, but hopefully this gives you an idea of the general look and feel of the tool.

Shynet's homepage Shynet's homepage, where you can see all of your services at a glance.

A service page A real service page, where you can see higher-level details about a site.

Not shown: management view, session view, full service view. (You'll need to install Shynet for yourself to see those!)

Shynet is built using a17t, an atomic design library. Customization and extension is simple; learn more about a17t.

Features

Architecture

  • Runs on a single machine โ€” Because it's so small, Shynet can easily run as a single docker container on a single small VPS
  • ...or across a giant Kubernetes cluster โ€” For higher traffic installations, Shynet can be deployed with as many parallelized ingress nodes as needed, with Redis caching and separate backend workers for database IO
  • Built using Django โ€” Shynet is built using Django, so deploying, updating, and migrating can be done without headaches
  • Multiple users and sites โ€” A single Shynet instance can support multiple users, each tracking multiple different sites

Tracking

  • JavaScript not required โ€” It will fallback to using a 1x1 transparent tracking pixel if JavaScript isn't available
  • Lightweight โ€” The tracking script weighs less than a kilobyte (and doesn't look like your typical tracking script)
  • Generally not blocked โ€” Because you host Shynet yourself, it tends not to be on ad block lists
  • Primary-key integration โ€” You can easily associate visitors in Shynet with their user accounts on your site (if that's something you want)

Metrics

Here's the information Shynet can give you about your visitors:

  • Hits โ€” how many pages on your site were opened/viewed
  • Sessions โ€” how many times your site was visited (essentially a collection of hits)
  • Page load time โ€” how long the pages on your site look to load
  • Bounce rate โ€” the percentage of visitors who left after just one page
  • Duration โ€” how long visitors stayed on the site
  • Referrers โ€” the links visitors followed to get to your site
  • Locations โ€” the relative popularity of all the pages on your site
  • Operating system โ€” your visitors' OS (from user agent)
  • Browser โ€” your visitors' browser (from user agent)
  • Geographic location & network โ€” general location of your visitors (from IP)
  • Device type โ€” whether your visitors are using a desktop, tablet, or phone (from user agent)

Workflow

  • Collaboration built-in โ€” Administrators can easily share services with other users, as well
  • Accounts (or not) โ€” Shynet has a fully featured account management workflow (powered by Django Allauth)

Recommendations

Shynet isn't for everyone. It's great for personal projects and small to medium size websites, but hasn't been tested with ultra-high traffic sites. It also requires a fair amount of technical know-how to deploy and maintain, so if you need a one-click solution, you're best served with other tools.

Concepts

Shynet is pretty simple, but there are a few key terms you need to know in order to use it effectively:

Services are the properties on the web you'd like to track. These generally correspond to websites or single top-level domains. Shynet generates one tracking embed per service.

Hits are a single page-load on one of your services.

Sessions are a collection of hits (or just one) that are made by the same browser in a short period of time.

Installation

You can find instructions on getting started and usage in the Usage Guide. Out of the box, we support deploying via a simple Docker container, docker-compose, Heroku, or Kubernetes (see kubernetes).

FAQ

Does Shynet respond to Do Not Track (DNT) signals? Yes. While there isn't any standardized way to handle DNT requests, Shynet allows you to specify whether you want to collect any data from users with DNT enabled on a per-service basis. (By default, Shynet will not collect any data from users who specify DNT.)

Is this GDPR compliant? It depends on how you use it. If you're worried about GDPR, you should talk to a lawyer about your particular data collection practices. I'm not a lawyer. (And this isn't legal advice.)

Troubleshooting

Having trouble with Shynet? Check out the troubleshooting guide, or create an issue if you think you found a bug in Shynet itself (or have a feature suggestion).

Roadmap

To see the upcoming planned features, check out the repository's roadmap project. Upcoming features include data aggregation through rollups, anomaly detection, detailed data exports, two-factor authentication, and a data deletion tool.

In the Wild

These sites use Shynet to monitor usage without violating visitors' privacy: PolitiTweet, Miles' personal site, a17t, Lensant, WhoAreMyRepresentatives.org, and more. (Want to add your site to this list? Send a PR.)

Contributing

Are you interested in contributing to Shynet? Just send a pull request! Maybe once the project matures there will be more detailed contribution guidelines, but for now just send the code this way and we'll make sure it meets our standards together. Just know that by contributing, you agree to share all of your contributions under the same license as the project (see LICENSE). And always be sure to follow the Code of Conduct.

License

Shynet is made available under the Apache License, version 2.0.


Shynet was created by Miles McCain (@MilesMcCain) at the Recurse Center using a17t.

More Repositories

1

a17t

An atomic design toolkit for pragmatists
JavaScript
476
star
2

librenews

A free and open breaking news notification platform
Python
87
star
3

whyprivacymatters

The ability to maintain privacy from governments, corporations, and our peers is fundamental to a free, democratic, and equitable society.
SCSS
47
star
4

LibreNews-Android

An Android client for the LibreNews server
Java
34
star
5

personal

The source for my personal static website
HTML
31
star
6

truthsocial

Automatically updated dump of Truth Social's source code (reskinned Mastodon)
Ruby
25
star
7

ArmorLib

Easily scan files for threats to security and privacy. A Rust library and command line tool. WIP.
Rust
20
star
8

ieql

Implementation and standard for IEQL. Scan thousands of documents efficiently & robustly.
Rust
13
star
9

cyber101

An introductory cybersecurity curriculum developed for an Independent Project at Phillips Academy
HTML
13
star
10

Email-Scraper

Simple tool for scraping millions (billions?) of email addresses from the Internetยฎ
Python
8
star
11

django-privacy-analytics

Privacy-focused, performant, and server-side analytics for your Django project
Python
7
star
12

cs106s

Website for CS106S, coding for social good
HTML
6
star
13

postback

Encrypted S3 backups for Postgres
Python
6
star
14

turtle-lang

A humble, fun, and friendly Lisp
Rust
5
star
15

tim

Automatic scheduling system that adapts to your life
Python
5
star
16

timemachine

Hello from the future (and the past?)
5
star
17

atlos

The open source platform for visual investigations
Elixir
4
star
18

cs106s-hashing

Teaching materials for the CS106S lecture on hashing and security literacy
JavaScript
4
star
19

tpl-site

Website for the Tech Policy Lab at Cornell University
HTML
4
star
20

geoadmin

OpenStreetMap planet data, but with only administrative regions.
Shell
4
star
21

citizen140

Archive tweets, and get a notification whenever one is deleted.
Python
3
star
22

polititweet-old

Archiving the deleted tweets of politicians and other major public figures. Keep data free.
HTML
3
star
23

WhoWas

Highly efficient asynchronous username history tool
Java
3
star
24

kbd

Add predictive text shortcuts to any website for power users and accessibility.
JavaScript
3
star
25

CHRON

Bukkit flexible CHRON jobs, with SHELL support!
Java
3
star
26

BibleOrQuran.org

BibleOrQuran gives you a random verse from either the Bible or the Qur'an, and has you guess which it's from. Here is its source.
HTML
2
star
27

CongressionalDroneOversight

A DroneScout component: Parse and combine CREC .xml files into JSON
Jupyter Notebook
2
star
28

hacknehs-parallel-processing

Code for my parallel processing workshop
Python
2
star
29

random-game

Superhuman randomness?
Vue
2
star
30

MarkovPoetry

MarkovPoetry is a Java implementation of Markov chain generation based on long input text, generating short sentences in the "style" of the text using a Markov algorithm.
Java
2
star
31

530zulu

Twice-daily email news update. Stay informed.
Python
2
star
32

Encompassed.press

The source behind https://encompassed.rmrm.io
HTML
2
star
33

covideo

Documenting and sharing life under quarantine
Sass
2
star
34

WhoAreMyRepresentatives

New and improved WhoAreMyRepresentatives.org
HTML
1
star
35

Deaddrop

Secure, authenticated, and monitored file 'dead drops'
Python
1
star
36

pollpoint

Polling people through a Raspberry Pi
JavaScript
1
star
37

stanford-namespace

Repository for files at https://stanford.edu/~mccain/
HTML
1
star
38

cs147-website

Website for CS147
HTML
1
star
39

milesmcc

GitHub profile README!
1
star
40

musicauthor

Writes up (and builds) my playlists
Python
1
star
41

cs106s-sentiment

Sentiment analysis workshop
JavaScript
1
star
42

StoryCleaner

Polish and compile AI-generated news stories
Python
1
star
43

personal-1

The repository containing my portfolio and (potentially) the source code for my personal website.
1
star
44

cs106s-apis

CS106S lesson on civics and APIs
JavaScript
1
star
45

old-personal

Old clone of personal site
JavaScript
1
star
46

DocumentSurvey

Platform to show survey respondents documents based on an access code
Python
1
star
47

sigdig

Digital signal processing in Rust. Implements common compression & encryption algorithms.
Rust
1
star