For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/sources/golang-tracker.md. The index of all documentation pages is at https://docs.snowplow.io/llms.txt, and the index for this section is at https://docs.snowplow.io/docs/cdi/llms.txt.
Golang tracker SDK
Feature support Compare trackers
- Supported: Page or screen views (Page and screen)
- Not supported: Activity tracking
- Not supported: Built-in entities
- Not supported: Anonymous tracking
- Not supported: Media
- Partial: Ecommerce
- Not supported: Consent
- Supported: Snowtype
The Snowplow Golang Tracker allows you to track Snowplow events from your Golang apps and servers.
There are four basic types of object you will create when using the Snowplow Golang Tracker: subjects, emitters, storage and trackers.
- A subject represents a user whose events are tracked.
- A tracker constructs events and sends them to an emitter.
- The emitter then sends the event to the endpoint you configure, a valid Snowplow Collector, which leverages a storage implementation to store them securely before sending to allow for recovery from failure.
As sending and processing of events is done asynchronously it is advised to create the Tracker as a singleton object. This is due to the fact that all events are first persistently stored in a local Sqlite3 database; if multiple Trackers are created there is the possibility of duplicate sending of events and overt consumption of resources.