ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

Snowplow webhook

In this article, we'll guide you on configuring a webhook to send information from Snowplow to Meiro Events. Snowplow is a powerful mobile analytics platform that allows developers to track events in mobile apps. By setting up a webhook, you can receive real-time event updates from Snowplow and integrate them into your Meiro Events system for further analysis and actions.

Deploying Snowplow SDK on mobile

Tracker installation

Within this article, you'll discover the installation of the Snowplow tracker on your mobile application.

Tracker configuration

1. Aim the Snowplow event collector URL to the Meiro Events mobile endpoint by following this link. Example: 

val tracker = Snowplow.createTracker (
   applicationContext, // Android context (LocalContext.current in Compose apps)
   "appTracker", // namespace
   "https://your-meiro-events.instance/mobile" // Meiro Events endpoint for Snowplow events processing
)

2. Set the customPostPath in the Snowplow’s network configuration to an empty string. Refer to the Snowplow iOS tracker documentation here for more details on this configuration.
This will ensure that the Meiro Events endpoint always stays the same.

Start tracking

Everything is configured, and you should see the triggered events in your Meiro Events dashboard in the /snowplow endpoint.


Events example

In Snowplow, webhooks can be triggered by various events related to mobile app tracking and analytics. These events can include platform and application context tracking, session tracking, and more. When these events meet the specified trigger criteria, the webhook will promptly send the relevant information to the designated URL.

Learn more: To gain a deeper understanding of handling Snowplow, refer to the official documentation for comprehensive guidance.

Events Tracked Automatically

The events listed below can be tracked when the Mobile SDK is initialized on mobile, provided that auto-tracking is enabled in the tracker configuration.

Platform and Application Context Tracking

Captures contextual information about the device and the app.


Example of events tracking application data:

{
"type": "object",
	"properties": {
		"version": {
			"type": "string",
			"description": "Version number of the application e.g 1.1.0",
			"maxLength": 255
		},
		"build": {
			"type": "string",
			"description": "Build name of the application e.g s9f2k2d or 1.1.0 beta",
			"maxLength": 255
		}
	},
"required": ["version", "build"],
	"additionalProperties": false
}


Session Tracking

Captures the session, which helps keep track of the user activity in the app. A session expires when no tracking events have occurred for the amount of time defined in a timeout (by default 30 minutes). 


Example of event:

{
"type": "object",
	"properties": {
		"userId": {
			"type": "string",
			"pattern": "^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$|^[0-9a-f]{16}$",
			"maxLength": 36,
			"description": "An identifier for the user of the session"
		},
		"sessionId": {
			"type": "string",
			"format": "uuid",
			"description": "An identifier for the session"
		},
		"sessionIndex": {
			"type": "integer",
			"minimum": 0,
			"maximum": 2147483647,
			"description": "The index of the current session for this user"
		},
		"eventIndex": {
			"type": [
				"null",
				"integer"
			],
			"minimum": 0,
			"maximum": 2147483647,
			"description": "Optional index of the current event in the session"
		},
		"previousSessionId": {
			"type": [
				"null",
				"string"
			],
			"format": "uuid",
			"description": "The previous session identifier for this user"
		},
		"storageMechanism": {
			"type": "string",
			"enum": [
				"SQLITE",
				"COOKIE_1",
				"COOKIE_3",
				"LOCAL_STORAGE",
"FLASH_LSO"
			],
			"description": "The mechanism that the session information has been stored on the device"
		},
		"firstEventId": {
			"type": [
				"null",
				"string"
			],
			"format": "uuid",
			"description": "The optional identifier of the first event for this session"
		},
		"firstEventTimestamp": {
			"description": "Optional date-time timestamp of when the first event in the session was tracked",
			"type": [
				"null",
				"string"
			],
			"format": "date-time"
		}
	},
	"required": [
		"userId",
		"sessionId",
		"sessionIndex",
		"previousSessionId",
		"storageMechanism"
	],
	"additionalProperties": false
}
Screen View Tracking

Captures each time a new “screen” is loaded.


Example of event:

{
     "type": {
      "type": "string",
      "description": "The type of screen that was viewed e.g feed / carousel."
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "maxLength": 36,
      "description": "An ID from the associated screenview event."
    },
    "viewController": {
      "type": "string",
      "description": "iOS specific: class name of the view controller."
    },
    "topViewController": {
      "type": "string",
      "description": "iOS specific: class name of the top level view controller."
    },
    "activity": {
      "type": "string",
      "description": "Android specific: name of activity."
    },
    "fragment": {
      "type": "string",
      "description": "Android specific: name of fragment."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "name",
    "id"
  ],
  "minProperties": 2,
  "self": {
    "vendor": "com.snowplowanalytics.mobile",
    "name": "screen",
    "format": "jsonschema",
App Lifecycle Tracking

Captures application lifecycle state changes from foreground to background and vice-versa.

Exception Tracking

Captures any unhandled exceptions within the application. Exceptions can crash the app, so it's likely that the event will be sent after the restart of the app.

Installation Tracking

Captures an install event that occurs the first time an application is opened. The tracker will record when it's first been installed, so deleting and reinstalling an app will trigger another install event.


If installation auto-tracking is not enabled, the tracker will still keep track of when the app was first installed so that when enabled, the tracker will send the recorded install event with a timestamp reflecting when it was first installed.

Learn more: about events tracked automatically

Event enrichment

All the events may be enriched by additional data:

IAB

Use the IAB/ABC International Spiders and Bots List to determine whether an event was produced by a user or a robot/spider based on its' IP address and user agent.

User Agent utils

Deprecated - please consider switching to YAUAA.

UA parser

Parse the useragent and attach detailed useragent information to each event.

Currency conversion

Convert the values of all transactions to a specified base currency using Open Exchange Rates. To use it, you need an Open Exchange Rates account.

Referer parser

Extracts attribution data from referer URLs.

Campaign attribution

Choose which query string parameters will be used to generate the marketing campaign fields. If you do not enable the campaign_attribution enrichment, those fields will not be populated.

Event fingerprint

Generate a fingerprint for the event using a hash of client-set fields. Helpful for deduplicating events.

Cookie extractor

Specify cookies that you want to extract if found.

HTTP Header extractor

Specify headers that you want to extract via a regex pattern, if found each extracted header will be attached to your event.

Weather Enrichment

Unavailable since Enrich 1.4.x.

YAUAA

Parse and analyze the user agent string of an event and extract as many relevant attributes as possible using YAUAA API.

IP lookups

Lookup useful data based on a user's IP address using the MaxMind database.

JavaScript

Write a JavaScript function that is executed for each event.

SQL Query

Perform dimension widening on a Snowplow event via your own internal relational database.

API Request

Perform dimension widening on a Snowplow event via your own or third-party proprietary http(s) API.

IP anonymization

Anonymize the IP addresses found in the user_ipaddress field by replacing a certain number of octets with "x"s.

PII Pseudonymization

Better protect the privacy rights of data subjects by pseudonymizing collected data.

Learn more: about available enrichments for the events tracked


Use cases

Snowplow can be a valuable component within a Customer Data Platform (CDP),Platform, providing advanced event tracking and analytics capabilities. Here are some practical use cases for Snowplow with Meiro:

  • Real-time Customer Insights: Snowplow's real-time event processing capability lets you gain immediate insights into customer behavior.
  • Segmentation and Personalization: By leveraging Snowplow's event data within your CDP, you can create detailed customer segments based on behavior, preferences, and engagement patterns. These segments enable you to deliver personalized messaging, recommendations, and offers, enhancing customer engagement and conversion rates.