Skip to content

nxnfufunezn/google-analytics-beacon-net

Repository files navigation

Google Analytics Beacon Service written in ASP.NET Core

This is a port of igrigorik/ga-beacon to ASP.NET Core 2.1.

The beacon app serves either a one-pixel transparent GIF image or a visible icon (once their respective images are created). The <img /> tag with the pixel or icon can be placed to pages that cannot be tracked with ordinary Google Analytics JavaScript code. The beacon service will log hits to such pages instead.

The beacon service will check for the existence of the cid cookie (used by Google Analytics) and will create one eventually.

Features

The app consists of a Web API controller that accepts either:

The first option requires a Referer request HTTP header to be present.

The above URLs can also be suffixed with the same switches as the original implementation:

  • pixel
  • gif
  • flat
  • flat-gif

Note: Currently, only the pixel switch is supported. Other switches require their respective return images to be created for this repository. Feel free to contribute with your images!

Analytics

About

Google Analytics Beacon Service written in ASP.NET Core

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages