Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/jraedisch/caddilytics

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/jraedisch/caddilytics

  • v0.0.0-20210106144731-97af1ee37c0a
  • Source
  • Go
  • Socket score

Version published
Created
Source

Caddilytics

GoDoc

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

Any advice/criticism/PRs are welcome!

Version 2 Compatibility

Caddilytics is compatible with Caddy V2 only. Earlier commits supported Caddy pre V1, so feel free to browse history for info.

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

You will also have to define a global order (or a route) in your Caddyfile:

{
  order caddilytics before header
}

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).

FAQs

Package last updated on 06 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc