Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Event ¶
Event tracks an event. Metadata and tags are optional. The request is made in the backend, so that the visitor doesn't have to wait for it to complete.
func EventFromJSON ¶
func EventFromJSON(w http.ResponseWriter, r *http.Request)
EventFromJSON tracks JavaScript using the API. The data is contained inside the body as JSON. The benefit over using the JavaScript snippet directly is that the backend serves as a proxy. Events tracked like this won't be blocked by ad blockers, as this is a first-party request (from your site to your site).
func EventFromURL ¶
func EventFromURL(next http.HandlerFunc) http.HandlerFunc
EventFromURL returns a middleware tracking events using special URL parameters. These can be p_event for the event name, p_meta_<key> for metadata, p_path for the path the event was triggered on. p_event must be set. Plus characters will be replaced with a slash for the values, except for the path.
Types ¶
This section is empty.