Nested schema with pixel tracker

Hi,

is it possible to use nested fields with the pixel tracker? I’ve built a schema which contains multiple objects but I’m unsure how to use this with the pixel tracker…

Also a heads up: The docs link to a wizard, which is not available anymore it seems:

Cheers

I did some more research and I think I have solved it.

This is an example of the nested data I want to send:

{
  "selligent_event_id": "757c7628-181c-423b-9073-f57101eb5111",
  "device": {
    "useragent": "Mozilla/5.0 (Windows 98; Win 9x 4.90) AppleWebKit/5342 (KHTML, like Gecko) Chrome/36.0.804.0 Mobile Safari/5342",
    "device": "Mobile",
    "os": "Windows"
  },
  "user": {
    "sso_id": "1234213",
    "selligent_id": "xsfd2q34"
  },
  "newsletter": {
    "timestamp": "2019-09-26T07:58:30.996+0200",
    "newsletter_id": "xx1",
    "mailing_list": "mailliste 1"
  },
  "marketing": {
    "source": "newsletter",
    "campaign": "mz_regensburg_daily",
    "test_id": "A"
  }
}

Using square brackets, I can define the nested schema:

selligent_event_id=757c7628-181c-423b-9073-f57101eb5111&device[useragent]=Mozilla/5.0+(Windows+98;+Win+9x+4.90)+AppleWebKit/5342+(KHTML,+like+Gecko)+Chrome/36.0.804.0+Mobile+Safari/5342&device[device]=Mobile&device[os]=Windows&user[sso_id]=1234213&user[selligent_id]=xsfd2q34&newsletter[timestamp]=2019-09-26T07:58:30.996+0200&newsletter[newsletter_id]=xx1&newsletter[mailing_list]=mailliste+1&marketing[source]=newsletter&marketing[campaign]=mz_201104_regensburg_daily

The final HTTP-Request would then look like this:

<img src="https://t.domain.de/com.snowplowanalytics.iglu/v1?schema=iglu%3Acom.selligent%email_open%2Fjsonschema%2F1-0-0&aid=selligent&p=web&selligent_event_id=757c7628-181c-423b-9073-f57101eb5111&device%5Buseragent%5D=Mozilla%2F5.0+%28Windows+98%3B+Win+9x+4.90%29+AppleWebKit%2F5342+%28KHTML%2C+like+Gecko%29+Chrome%2F36.0.804.0+Mobile+Safari%2F5342&device%5Bdevice%5D=Mobile&device%5Bos%5D=Windows&user%5Bsso_id%5D=1234213&user%5Bselligent_id%5D=xsfd2q34&newsletter%5Btimestamp%5D=2019-09-26T07%3A58%3A30.996%2B0200&newsletter%5Bnewsletter_id%5D=xx1&newsletter%5Bmailing_list%5D=mailliste+1&marketing%5Bsource%5D=newsletter&marketing%5Bcampaign%5D=mz_201104_regensburg_daily &marketing%5Btest_id%5D=A">

Would this be a feasible solution? I couldn’t verify it yet on a demo instance of Snowplow.

Yeah that should work fine, /com.snowplowanalytics.iglu/v1 returns a 1x1 gif just like the pixel tracker.

You’re using the Iglu Webhook there which is designed for tracking a self describing event just like this.

1 Like