PHPackages                             bogdaan/spycss - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bogdaan/spycss

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bogdaan/spycss
==============

Analyze user interactions via CSS, without JavaScript

0.0.3(8y ago)42226MITPHPPHP &gt;=5.5.0

Since Jan 31Pushed 8y ago5 watchersCompare

[ Source](https://github.com/Bogdaan/spycss)[ Packagist](https://packagist.org/packages/bogdaan/spycss)[ RSS](/packages/bogdaan-spycss/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

SpyCss
======

[](#spycss)

[![Build Status](https://camo.githubusercontent.com/31e39a940be68cbce85f274c590d1c4ccf57d1d00c1bbaa62964ec97ea6c313f/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f426f676461616e2f7370796373732e706e67)](http://travis-ci.org/Bogdaan/spycss)

Analyze user interactions via CSS, without JavaScript on client-side. Demo at [spycss.hcbogdan.com](https://spycss.hcbogdan.com).

> - Why?
> - Because we can

How it works
------------

[](#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
----------

[](#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](https://jsfiddle.net/hcbogdan/tp4cj3jy/) to generates CSS and HTML for you link inside view:

```
