Stuifbergen.com

Analytics & Growth Hacking

  • About
  • Contact
  • Professional Services

Find me here

  • Mastodon (social)
  • Mastodon (measure)
  • No more Twitter
You are here: Home / Blog / Setting up Snowplow Analytics with the Relay42 Tag Manager

Setting up Snowplow Analytics with the Relay42 Tag Manager

14 February 2018 by jules Leave a Comment

Recently, I did a Snowplow Analytics implementation via the Relay42 tag management system. The setup I chose for this is very neat (if I can say so myself), so I’m sharing it here, hoping it can help or inspire others.

(This is probably a rare combination of tools, so this post will not be the most read on this blog, but whatever. Welcome, reader!)

Pulling apart the Snowplow tag

The snowplow tag consists of several bits:

  1. loading the script
  2. creating the tracker + setting some variables
  3. send an event: most often is that tracking a page view

For my setup, I decided to put part 3 (the track page view) in a seperate Relay42 tag with lower priority, for reasons I’ll explain later.

Before loading the first bit of the snowplow tag, I’m gathering some meta-information.

Tag priority setup

  1. Relay42: set some “global” configuration variables (site-wide)
  2. Snowplow Tag: create tracker using the variables (site-wide)
  3. Relay42: set (or override) some page-specific configuration variables (using page groups)
  4. Relay42: set some super-page-specific configuration variables (using individual pages)
  5. Snowplow Tag: send pageview, using the custom page context set in the variables
  6. Snowplow Tag: send other events (like transactions)

So the final configuration looks something like this:

In the INIT 1 variable setting bit, the snowplow endpoint is determined and the application name is set.
Normally, these variables are the same across the site, but not always.

  • sometimes you want to run in debug mode to test tags
  • you might want to always use a different application name for your dev/acc environment (via a rule)

Tag example code

Regarding page groups and special cases, I used the following setup:

  • create page group per product funnel, with all pages in them
  • in these group, create an INIT 2 tag which sets the product name and other product specific variables
  • create a page group for all conversion pages (transactions) which uses the variables from INIT2, and fire a custom transaction event (but only after the page view tag)

Pretty clean, right?

If you find this post useful, or if you have anything to add, please ping me in a comment or shoot me a tweet @zjuul.

Happy tagging!

Related posts:

Howto: add custom schemas to Snowplow GCE (and BigQuery) Default ThumbnailDoing Cohort Analysis in R (using ggplot) Analyse Web Site Click Paths as Processes Scripted Install: Snowplow Analytics on the Google Cloud Platform

Filed Under: Blog Tagged With: relay42, snowplow, tag management, tagging

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Recent Posts

  • How to use a pre-hashed email address in GA4 tags in GTM
  • GA4 intraday exports and cookieless pings
  • July 2024 change in collected_traffic_source in GA4 Big Query
  • srsltid parameter, GA4 and Big Query
  • Smart incremental GA4 tables in Dataform

Need help?

  • Contact me

Search

© Copyright Jules Stuifbergen · Powered by Genesis ·