Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Caddilytics

GoDoc

This repository contains a minimal Caddy middleware for tracking HTTP requests via Google Analytics Measurement Protocol.

Any advice/criticism/PRs are welcome!

Tracking Info

All requests are being tracked as pageviews with the following data:

  • dl (location URL)
  • dr (referer)
  • ua (user agent)
  • ul (language)

Tracking is done asynchronously with a timeout of 1 second.

Usage (configurable per site):

caddilytics UA-1234-5 session-cookie

Cookie

A http only, secure session cookie will be set with an unencrypted random UUID if none is set already.

TODO (unordered ideas)

  • Clean up specs.
  • Allow non secure cookies.
  • Better documentation, especially about building caddy.
  • Log exceptions with exd (exception description) as hit type exception.
  • Track qt (queue time).
  • Track timing.

License

Copyright (c) 2017 Jasper Rädisch. See the LICENSE file for license rights and limitations (MIT).

About

Minimal Caddy middleware for tracking HTTP requests

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.