Channel flow tag variables

Hi there,
We are writing GA4 order data from sGTM into BigQuery. I just found stape’s channel flow tag and I’m wondering how do I extract each marketing interaction UTMs, so I can send this data into our BigQuery table. Is it with event data variables?

Another one. I checked the Tag’s code and found that there’s all UTMs, not just source/medium. Is this correct or these other UTMs aren’t working? Thanks.

Channel flow saves all data in user’s cookies, you can retrieve them there (just via standard cookies variable).

The tag searches the url and saves 5 standard utm, not just source/medium, here’s the full list:

  • utm_source
  • utm_medium
  • utm_campaign
  • utm_content
  • utm_term

And can set cookies with each of them + flow cookies:

  • channel_flow_first - first visit source/medium
  • channel_flow_last - last visit source/medium
  • channel_flow - all source/medium between first and last

Hi Alex,
How can I create variables for the full channel flow so I can send them as parameter in a GA4 tag? I guess creating a cookie variable but whats the cookie name exactly? Is it “channel_flow”? Thanks for your patience :slight_smile:

Also specifically, we are using shopify webhook data to write order data into bigquery. I wonder how we can include the channel flow in the writer tag. I mean this is done with variables but not sure. Thanks again.

Yes, you can use a standard variable to retrieve cookie data. The names of the cookies correspond to what I wrote above, but you can also check this in your browser.

How to add this data to BQ depends on your current setup and I am unlikely to be able to give you the right method, you need to see how it works for you.

If you are sending webhooks from Shopify directly to BQ - you need to have the channel flow data stored in Shopify, for example in the order attributes, so you can add it to the webhooks for BQ.