snowplow-incubator / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
1 stars 0 forks source link

Improve Snowplow cross-domain linking to AMP CDN #13

Closed colmsnowplow closed 3 years ago

colmsnowplow commented 3 years ago

The JS tracker attaches the domain_userid to the querystring when navigating to an AMP page, but if that page is hosted on the AMP CDN, it isn't successfully captured.

I believe this to be down to cookies - currently we first set a cookie, then grab that value to send.

This has two problems: 1. on the AMP domain, we can't always set the cookie, and 2. the order of operations isn't deterministic, so a changing value isn't guaranteed to change in time.

Can easily be resolved by reordering priority of the value to take from querystring before grabbing from cookie.

colmsnowplow commented 3 years ago

Fixed in https://github.com/ampproject/amphtml/commit/5d232608b80c5f4c3fbaa6c297a292140da43cfd