All Projects → Bogdaan → spycss

Bogdaan / spycss

Licence: MIT license
Track user interactions without JavaScript ✨

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to spycss

Ridesharing Android
Ridesharing driver & rider sample apps using HyperTrack SDK
Stars: ✭ 186 (+365%)
Mutual labels:  tracking
Object detection tracking
Out-of-the-box code and models for CMU's object detection and tracking system for surveillance videos. Speed optimized Faster-RCNN model. Tensorflow based. Also supports EfficientDet. WACVW'20
Stars: ✭ 221 (+452.5%)
Mutual labels:  tracking
Motionplanning
Motion planning algorithms commonly used on autonomous vehicles. (path planning + path tracking)
Stars: ✭ 228 (+470%)
Mutual labels:  tracking
React Tracker
React specific tracking library, Track user interaction with minimal API!
Stars: ✭ 191 (+377.5%)
Mutual labels:  tracking
Dcfnet pytorch
DCFNet: Discriminant Correlation Filters Network for Visual Tracking
Stars: ✭ 200 (+400%)
Mutual labels:  tracking
Tracker
Laravel Stats Tracker
Stars: ✭ 2,638 (+6495%)
Mutual labels:  tracking
Privacybadger
Privacy Badger is a browser extension that automatically learns to block invisible trackers.
Stars: ✭ 2,346 (+5765%)
Mutual labels:  tracking
Nesicide
Integrated Development Environment for the 8-bit Nintendo Entertainment System
Stars: ✭ 244 (+510%)
Mutual labels:  tracking
Keen Tracking.js
A light, fast and flexible javascript tracking library
Stars: ✭ 218 (+445%)
Mutual labels:  tracking
Supercookie
💭 Inspiration
Stars: ✭ 3,630 (+8975%)
Mutual labels:  tracking
Person Detection And Tracking
A tensorflow implementation with SSD model for person detection and Kalman Filtering combined for tracking
Stars: ✭ 193 (+382.5%)
Mutual labels:  tracking
Siamfc Pytorch
SiamFC PyTorch
Stars: ✭ 197 (+392.5%)
Mutual labels:  tracking
Fracker
PHP function tracker
Stars: ✭ 234 (+485%)
Mutual labels:  tracking
Whotracks.me
Data from the largest and longest measurement of online tracking.
Stars: ✭ 189 (+372.5%)
Mutual labels:  tracking
Ros robotics projects
Example codes of new book ROS Robotics Projects
Stars: ✭ 240 (+500%)
Mutual labels:  tracking
Mcmot
Real time one-stage multi-class & multi-object tracking based on anchor-free detection and re-id
Stars: ✭ 181 (+352.5%)
Mutual labels:  tracking
Opentracks
OpenTracks is a sport tracking application that completely respects your privacy.
Stars: ✭ 225 (+462.5%)
Mutual labels:  tracking
Maps
🌍🌏🌎 The whole world fits inside your cloud!
Stars: ✭ 253 (+532.5%)
Mutual labels:  tracking
Xprof
A visual tracer and profiler for Erlang and Elixir.
Stars: ✭ 246 (+515%)
Mutual labels:  tracking
Openats
Open Auto Tracking System for satellite tracking or target tracking.
Stars: ✭ 234 (+485%)
Mutual labels:  tracking

SpyCss

Build Status

Analyze user interactions via CSS, without JavaScript on client-side. Demo at spycss.hcbogdan.com.

  • Why?
  • Because we can

How it works

As you probably know, in css we can add external resources via url(resource) property. Usually, this resource is only loaded when its needed. So, we can create HTML/CSS that will track user interactions, and send request to our backend.

This library was created in order to simplify the creation of tracking css.

How to use

First, install library with composer:

composer require bogdaan/spycss

For example, you want to track click on some link. We can use this snippet to generates CSS and HTML for you link inside view:

<?php
// inside controller or DI:
$userId = 'get_from_cookie--OR--fetch_from_db';
$backendUrl = 'https://spy-css-backend/';
$s = new \SpyCss\SpyCss($userId, $backendUrl);

// inside you view, generates element:
// <a class="scsssXXXX" href="https://hcbogdan.com">Novikov Bogdan</a>
echo $s->builder()
    ->tag('a')
    ->content('Novikov Bogdan')
    ->attribute('href', 'https://hcbogdan.com')
    ->interactions([
        new \SpyCss\Interaction\Active('click_on_hcbogdan_com')
    ])
    ->get();

// generates special styles like:
// .scsssXXXX:active::after {content: url(https://spy-css-backend/userId/active/click_on_hcbogdan_com);}'
echo '<style>'.$s->extractStyles().'</style>';

You can create keylogger for input type="text" fields (snippet at jsfiddle):

<?php
// ... init SpyCss

// set alphabet
$logThisChars = 'abcdefgABCDEFG';

// create input field
echo $s->builder()
    ->tag('input')
    ->attribute('name', 'field')
    ->interactions([
        new \SpyCss\Interaction\Keylogger($logThisChars)
    ])
    ->get();

// generates special styles
echo '<style>'.$s->extractStyles().'</style>';

See more examples at spycss-demo

Directory structure

./src/
├── Builder.php          # Tag builder with fluent interface
├── Interaction          #
│   ├── Active.php       # Track :active state
│   ├── Checked.php      # Track :checked state on input and option
│   ├── Focus.php        # Track :focus state
│   ├── Hover.php        # Track :hover state
│   ├── Keylogger.php    # Track key press on text fields
│   ├── Online.php       # Online tracking
│   ├── Pseudo.php       #
│   └── Valid.php        # Track :valid state
├── Interaction.php      # Base class for interactions
├── SpyCss.php           #
└── Util                 #
    └── Html.php         # Html tag helpers

Todo

  • Review browser support
  • Update demo
  • Add more interactions
  • Implement twig helper

Read more

Contributing

Pull request are welcome.

Inspired by jbtronics/CrookedStyleSheets.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].