- Setup local event collector
- Configure a remote event collector
- Snowplow Analytics Debugger Chrome Extension
Local setup and debugging
Internal events are using a tool called Snowplow under the hood. To develop and test internal events, there are several tools related to Snowplow to test frontend and backend events:
Testing Tool | Frontend Tracking | Backend Tracking | Local Development Environment | Production Environment | Production Environment |
---|---|---|---|---|---|
Snowplow Analytics Debugger Chrome Extension | Yes | No | Yes | Yes | Yes |
Snowplow Micro | Yes | Yes | Yes | No | No |
For local development you will have to either setup a local event collector or configure a remote event collector. We recommend the local setup when actively developing new events.
Setup local event collector
By default, self-managed instances do not collect event data via Snowplow. We can use Snowplow Micro, a Docker based Snowplow collector, to test events locally:
-
Ensure Docker is installed and working.
-
Enable Snowplow Micro:
gdk config set snowplow_micro.enabled true
-
Optional. Snowplow Micro runs on port
9091
by default, you can change to9092
by running:gdk config set snowplow_micro.port 9092
-
Regenerate your Procfile and YAML config by reconfiguring GDK:
gdk reconfigure
-
Restart the GDK:
gdk restart
-
You can now see all events being sent by your local instance in the Snowplow Micro UI and can filter for specific events.
Configure a remote event collector
On GitLab.com events are sent to a collector configured by GitLab. By default, self-managed instances do not have a collector configured and do not collect data with Snowplow.
You can configure your self-managed GitLab instance to use a custom Snowplow collector.
- On the left sidebar, select Search or go to.
- Select Admin Area.
- On the left sidebar, select Settings > General.
- Expand Snowplow.
-
Select Enable Snowplow tracking and enter your Snowplow configuration information. For example:
Name Value Collector hostname your-snowplow-collector.net
App ID gitlab
Cookie domain .your-gitlab-instance.com
- Select Save changes.
Snowplow Analytics Debugger Chrome Extension
Snowplow Analytics Debugger is a browser extension for testing frontend events. It works in production, staging, and local development environments. It is especially suited to verifying correct events are getting sent in a deployed environment.
- Install the Snowplow Analytics Debugger Chrome browser extension.
- Open Chrome DevTools to the Snowplow Debugger tab.
- Any event triggered on a GitLab page should appear in the Snowplow Debugger tab.