Iglu webhook adapter - OXYGEN-MARKET/oxygen-market.github.io GitHub Wiki
HOME > SNOWPLOW TECHNICAL DOCUMENTATION > Webhooks > Iglu webhook adapter
- 1 Overview
- 2 Implementation
- 2.1 Event source
- 2.2 Example
- 2.3 Snowplow adapter
- 3 Events
- 4 See also
This webhook adapter lets you track events sent via GET
or POST
requests containing an Iglu-compatible event payload.
You can use this adapter with vendors who allow you define your own event types for "postback". An example of a vendor who does this is AD-X Tracking.
This adapter assumes that events are sent via a GET
request with all information on the querystring.
The querystring's name-value pairs must include a schema
parameter, which is set to a valid Iglu self-describing schema URI, such as:
iglu:com.acme.postbacks/install_error/jsonschema/1-0-0
Here is an example of an Iglu-compatible event sent as a GET
request:
http://snplow.acme.com/com.snowplowanalytics.iglu/v1?schema=iglu%3Acom.acme%2Fcampaign%2Fjsonschema%2F1-0-0
&user=6353af9b-e288-4cf3-9f1c-b377a9c84dac&name=download&publisher_name=Organic&source=&tracking_id=&ad_unit=
This will be converted by the Iglu webhook adapter into a self-describing JSON looking like this:
{
"schema":"iglu:com.acme/campaign/jsonschema/1-0-0",
"data": {
"name":"download",
"source":null,
"ad_unit":null,
"tracking_id":null,
"publisher_name":"Organic",
"user":"6353af9b-e288-4cf3-9f1c-b377a9c84dac"
}
An example as a POST request:
http://snplow.acme.com/com.snowplowanalytics.iglu/v1 -d '{
"schema":"iglu:com.acme/campaign/jsonschema/1-0-0",
"data": {
"name":"download",
"source":null,
"ad_unit":null,
"tracking_id":null,
"publisher_name":"Organic",
"user":"6353af9b-e288-4cf3-9f1c-b377a9c84dac"
}
}'
Note that successful processing through into Amazon Redshift will depend on the appropriate JSON Schema, JSON Paths file and Redshift table definition all being defined correctly.
Implementation: IgluAdapter
Iglu webhook support was implemented in Snowplow 0.9.11.
Iglu webhook POST support was implemented in Snowplow R83 Bald Eagle.
This webhook adapter supports any event, as long as it is a valid Iglu self-describing event.
Note that a limitation of this adapter with GET requests is that all event properties will end up being "stringly typed" - the adapter has no way of knowing which parameters should be converted into numbers, booleans, date-times or similar.