analytics

package
v0.1.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tracker

type Tracker struct {
	// TrackingID is the tracking id for the Google Analytics property that you
	// want to track pageview events for. This value can be found in your
	// Google Analytics dashboard.
	// Example: "UA-123456789-1"
	TrackingID string

	// PropertyName is the name for the Google Analytics property that you want
	// to track pageview events for. This can be found in your Google Analytics
	// dashboard.
	// Example: "example.com"
	PropertyName string

	// DryRun is used to disable reporting pageview events.
	DryRun bool

	// Handler is a http handler that is "wrapped" by the Tracker and actually
	// processes the client requests. The original request, as well as the
	// response generated by the handler is used to extract analytics data.
	Handler http.Handler
}

func (*Tracker) ServeHTTP

func (t *Tracker) ServeHTTP(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL