1. Home
  2. Docs
  3. Snowplow Open Source Quick Start
  4. Further Exploration
  5. Track events & entities

Track events & entities

In this section, you will add tracking to your own application, as well as learn how to create schemas that describe your custom events & entities, and how to track these from your application/s.

Step 1: Track out-of-the-box events from your own application

Web tracking

You will track a large number of standard web events out-of-the-box with Snowplow. Implementing the Javascript tracker, for example, will enable you to start tracking the following events:

Mobile tracking

You can find our full list of our SDKs here (including our server side trackers, and 3rd party webhooks)

SSL certificate

You will need to set up your SSL certificate so that your collector can receive HTTPS traffic on a domain you own:

  • You can create your SSL certificate using Amazon Certificate Manager Once you have done that you will need to add the SSL certificate as an input variable for your Collector load balancer (ssl_certificate_arn) and run terraform apply

Snowplow Inspector

We recommend installing the Snowplow Inspector chrome extension developed by our Partner Poplin Data which allows you to view & validate events that are being tracked from a web page and can be used for QA purposes.

Step 2: Track custom events & entities

Custom events & entities allow you to track & collect events that better reflect your business. In this step, you will define your custom event by creating a schema for it and uploading it to Iglu – your schema repository – and then start tracking it from your application. 

Schemas

Learn more why schemas are a powerful feature of Snowplow, and about the anatomy of a schema here.

  • First create the schema for the event
    • The below is an example – you can create your own schema or edit this schema to better suit your needs
{ "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", "description": "Schema for a button click event", "self": { "vendor": "com.snowplowanalytics", "name": "button_click", "format": "jsonschema", "version": "1-0-0" }, "type": "object", "properties": { "id": { "type": "string" "minLength": 1 }, "target": { "type": "string" }, "content": { "type": "string" } }, "required": ["id"], "additionalProperties": false }
Code language: JSON / JSON with Comments (json)
  • You should then save this schema in the following folder structure, with a filename of 1-0-0:
    • /schemas/com.snowplowanalytics/button_click/jsonschema/1-0-0
    • Note: If you update the vendor string in the example, you should update the above path too.
  • Upload your schema to your Iglu registry that you created when setting up your pipeline
    • Download the latest igluctl if you haven’t already
    • To upload your schemas on localhost to the Iglu Server, use the following command:
      • igluctl static push --public <local path to schemas/> <Iglu server endpoint> <iglu_super_api_key>
      • You can find more information on the Igluctl docs page
  • To send an event using this schema you’ll want to track a Self Describing Event. Here is an example of how to do so with the JavaScript Tracker:
snowplow('trackSelfDescribingEvent', { event: { schema: 'iglu:com.snowplowanalytics/button_click/jsonschema/1-0-0', data: { id: 'purchase-button-1', target: '/checkout', content: 'Purchase Now' } } });
Code language: JavaScript (javascript)

Once you’ve sent this event at least once, you can take a look at this event in Postgres. You’ll find the core event properties in atomic.events and the event specific properties in atomic.com_snowplowanalytics_button_click_1.

You can join back to atomic.events using root_id = event_id.

Next, learn how to further enrich your data >>

Do you have any feedback for us?

We are really interested in understanding how you are finding the Quick Start and what we can do to better support you in getting started with our open source. If you have a moment, let us know via this short survey.