-
Notifications
You must be signed in to change notification settings - Fork 53
Add more details about cross-domain tracking #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ea6277d
6f8318a
36e48f8
c18202d
281110a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
--- | ||
title: "Cross Navigation Enrichment" | ||
title: "Cross-navigation enrichment" | ||
sidebar_position: 5 | ||
sidebar_label: Cross Navigation | ||
sidebar_label: Cross-navigation | ||
--- | ||
|
||
This enrichment parses the extended cross navigation format in `_sp` querystring parameter and attaches the `cross_navigation` context to an event. | ||
This enrichment parses the extended cross-navigation format in the `_sp` querystring parameter, and attaches a `cross_navigation` entity to an event. | ||
|
||
The `_sp` parameter can be attached by our Web ([see cross-domain tracking](/docs/sources/trackers/javascript-trackers/web-tracker/cross-domain-tracking/index.md)) and [mobile trackers](/docs/sources/trackers/mobile-trackers/tracking-events/session-tracking/index.md#decorating-outgoing-links-using-cross-navigation-tracking) and contains user, session and app identifiers (e.g., domain user and session IDs, business user ID, source app ID). The information to include in the parameters is configurable in the trackers. This is useful for tracking the movement of users across different apps and platforms. | ||
To add the `_sp` querystring, configure cross-domain tracking in the [web](/docs/sources/trackers/javascript-trackers/web-tracker/cross-domain-tracking/index.md) or [mobile trackers](/docs/sources/trackers/mobile-trackers/tracking-events/session-tracking/index.md#decorating-outgoing-links-using-cross-navigation-tracking). The querystring contains user, session, and app identifiers, for example domain user and session IDs, business user ID, or source application ID. This is useful for tracking the movement of users across different apps and platforms. The information to include in the parameters is configurable in the trackers. | ||
|
||
The extended cross navigation format can be described by `_sp={domainUserId}.{timestamp}.{sessionId}.{subjectUserId}.{sourceId}.{platform}.{reason}` | ||
:::note Base64 encoding | ||
This enrichment expects the events to be base64-encoded. Configure this in the trackers. | ||
::: | ||
Comment on lines
+11
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the source for this? The tracker base64 encodes the |
||
|
||
If this enrichment isn't enabled, Enrich parses `_sp` querystring parameter according to the old format, `_sp={domainUserId}.{timestamp}` | ||
The extended cross-navigation format is `_sp={domainUserId}.{timestamp}.{sessionId}.{subjectUserId}.{sourceId}.{platform}.{reason}`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think |
||
|
||
If this enrichment isn't enabled, Enrich parses the `_sp` querystring parameter according to the short format `_sp={domainUserId}.{timestamp}` | ||
|
||
## Configuration | ||
|
||
- [Schema](https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow.enrichments/cross_navigation_config/jsonschema/1-0-0) | ||
- [Example](https://github.com/snowplow/enrich/blob/master/config/enrichments/cross_navigation_config.json) | ||
|
||
```json reference | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL, cool! This kind of makes the I'd say embed the example as well, but this is about as boring as enrichment configs get so I'm not sure it matters. 😅 I guess it makes it easy to copy/paste? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, it's not documented but apparently we can change the "See full example on GitHub" text too if that doesn't make sense in this context. ```json reference title="Schema" referenceLinkText="See schema on Github" |
||
https://github.com/snowplow/enrich/blob/master/config/enrichments/cross_navigation_config.json | ||
``` | ||
|
||
```mdx-code-block | ||
import TestingWithMicro from "@site/docs/reusable/test-enrichment-with-micro/_index.md" | ||
|
||
|
@@ -28,10 +36,10 @@ import TestingWithMicro from "@site/docs/reusable/test-enrichment-with-micro/_in | |
This enrichment extracts `_sp` querystring parameter from the following inputs: | ||
|
||
- The `page_url` field from the Snowplow event | ||
- The referer uri extracted from corresponding HTTP header in the raw event | ||
- The `referer` URI extracted from corresponding HTTP header in the raw event | ||
|
||
## Output | ||
|
||
This enrichment adds a new derived context to the enriched event with [this schema](https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/cross_navigation/jsonschema/1-0-0). | ||
This enrichment adds a new derived entity to the enriched event based on [this schema](https://github.com/snowplow/iglu-central/blob/master/schemas/com.snowplowanalytics.snowplow/cross_navigation/jsonschema/1-0-0). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we embed this schema in the page as well? (You've created a monster) Since we can specify that's it's JSON here the syntax highlighting is actually a nicer experience than you get on GH. |
||
|
||
Also, it continues to populate `refr_domain_userid` and `refr_dvce_tstamp` enriched event fields as before. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think by the end of this paragraph the reader should kind of know if they need this or not, but it's very "what"/"how" rather than "why" at the moment, so that's not clear?
The link to cross-domain-tracking is doing a lot of work here also, this text is kind of ambiguous between the default cross-domain tracking and the extended version. Maybe needs a refresher on the normal behaviour and some explanation of the actual differences?
_sp
and includedomain_userid
+timestamp
refr_domain_userid
andrefr_dvce_tstamp
fieldsdomain_sessionid
,user_id
, sourceapp_id
and a customreason
, which are all configurable, in addition to the defaultdomain_userid
+timestamp
(which can not be disabled)