Skip to main content

For AI agents: a Markdown version of this page is at https://docs.snowplow.io/docs/api-reference/snowbridge/configuration/transformations/builtin/spGtmssPreview.md. The index of all documentation pages is at https://docs.snowplow.io/llms.txt, and the index for this section is at https://docs.snowplow.io/docs/api-reference/llms.txt.

Snowbridge spGtmssPreview transformation

note

This transformation was added in version 2.3.0

spGtmssPreview: Specific to Snowplow data. Extracts a value from the x-gtm-server-preview field of a preview mode context, and attaches it as the GTM SS preview mode header, to enable easier debugging using GTM SS preview mode.

Only one preview mode context should be sent at a time.

note

As of version 3.0.0:

Invalid preview headers sent to GTM SS can result in requests failing, which may be problematic. There is insufficient information available about the values to allow us to confidently validate them, but we do two things to avoid this problem.

First, we validate to ensure that the value is a valid base64 string. Second, we compare the age of the event (based on collector_tstamp) to ensure it is under a configurable timeout age. If either of these conditions fail, we treat the message as invalid, and output to the failure target.

Configuration options​

hclassets/docs/configuration/transformations/snowplow-builtin/spGtmssPreview-minimal-example.hcl
loading...
hclassets/docs/configuration/transformations/snowplow-builtin/spGtmssPreview-full-example.hcl
loading...

Was this page helpful?