r/GoogleTagManager

Conversion attributes for cross-domain iFrame tracking

Hey all, so currently I'm trying to improve attribution for a purchase tracking that happens on another domain but through iFrame popup on my main domain. We are using 3rd party provider for checkout and while it allows to add our GA4 Measurement ID in provider's dashboard settings and Purchase event is fired browser side from their platform and arrives in GA4, I noticed that attribution is missing whether purchase happened from paid/social etc.

I added cross-domain settings in GA4 and listed provider domain name there. Also created Conversion Linker tag in GTM and added main domain and iFrame domain. Seems like after these changes gclid_aw cookie was being set on main domain and ahref for iFrame got some new URL that contains: ?_gl=1*1bgt7lz*_gcl_aw*R0NMLjE3NzY2NzI0OTQuOTk5OTk.*_gcl_au*MjcyODU3MTUxLjE3NzY2MzgxMjM.*_ga*MjY5NzI1MjUyLjE3NzY2MjIwNTI.*_ga_FMFG2MM934*czE3NzY2NzIzOTckbzMkZzEkdDE3NzY2NzI1MzMkajYwJGwwJGgw

But the moment I click on ahref button to open iFrame, the iFrame url doesn't get these new linker parameters attached to it. And not sure what is the way to make it work? And then the question is even if I managed to also add these params to iFrame url, since the event is fired from another domain which I don't have access to, would it even send these params to GA4 or not?

reddit.com
u/Limpuls — 1 day ago

Everybody just Select All > Ignore or just me?

For years first thing when opening any GTM is :

- problems > see details

- untagged pages > select all > ignore

and the work can begin ... just me? useless thing as all the "untagged pages" are tagged (or some pdf files) - anyways uselss thing

reddit.com
u/BuzisBuzicco — 1 day ago
▲ 2 r/GoogleTagManager+1 crossposts

Free guide — how to track form submissions in Matomo for every scenario.

📄 https://docs.google.com/document/d/1pkYW3p5_9jRS2PFjfZmMQii6yKJKWd2I/edit?usp=sharing&ouid=116204365774511143498&rtpof=true&sd=true

Your Matomo form tracking is probably broken. Most people don't find out until their data is already wrong.

13 scenarios covered inside:

→ AJAX forms (no page reload)

→ React / Vue / Angular SPAs

→ Multi-step forms — see exactly where users drop off

→ Form abandonment — down to which field they left on

→ Modal & popup forms

→ Contact Form 7 & Gravity Forms (WordPress)

→ WooCommerce checkout funnel

→ Typeform & HubSpot iframe forms

→ Matomo Tag Manager — no-code setup

→ Field-level tracking: time spent, empty fields, errors

→ Common mistakes that inflate or lose your data

→ Verification checklist before going live

Who should bookmark this:

✔ Developers setting up Matomo for a client

✔ Agencies auditing an existing setup

✔ eCommerce brands tracking leads or checkout

✔ Anyone whose numbers don't add up

share with your dev team.

❤️ Like so more people find it.

➕ Follow for more breakdowns like this.

Using Matomo and not sure if your tracking is accurate?

u/incisiveranking2022 — 1 day ago

Why does setting up website tracking always turn into such a mess?

I've tried to set up proper analytics on a few different websites now some for my own projects, some for clients. Every single time, the same frustrating cycle plays out. I'm starting to think it's not just me the whole way we do this is broken.

Here’s what always happens.

First, I have to figure out what to track. That means clicking through the entire website manually, trying to notice every little thing a user might do clicking a button, filling out a form, landing on a specific page. Then I try to match those actions to business goals and write everything down in a spreadsheet. This takes days or even weeks. We argue about what to name things. We always forget some events because the site has pop-ups or thank-you pages that only appear after you submit something. The final plan looks great on paper.

Then comes the hard part: actually making it work in Google Tag Manager. I have to build tags, triggers, and variables. If I do it myself, I spend weeks wrestling with GTM's weird behavior, why did that trigger fire ten times? Why isn't the variable showing up? If I hire someone, it costs hundreds or thousands of dollars, and even then, it only works most of the time. But we publish it anyway because the project needs to move forward.

A few weeks later, someone asks why our conversion numbers dropped. I go back into GTM and discover that half the triggers stopped working. Why? Because the developers updated the website and changed some class names or page structure. No one noticed because no one checks tracking regularly. Our data has been wrong for nearly three weeks. We made business decisions based on bad information. So now we have a choice, live with broken tracking or start over. We almost always start over. "This time we'll document everything better," we say. But the same thing happens again. The real problem, I think, is that planning happens in one place (spreadsheets), building happens in another place (GTM), testing happens somewhere else, and checking on things after launch basically never happens. These four steps don't talk to each other. Each one needs different skills and different tools. No one person owns the whole thing from beginning to end.

For those of you who have actually solved this how did you do it? Do you just hire a full-time analytics person? Do you accept that your data will always be a little wrong? Or is there a better way to connect the plan, the setup, the testing, and the ongoing checks without it becoming someone's entire job?

I really want to know if everyone else is quietly dealing with this same broken cycle or if I'm just unlucky.

reddit.com
u/muhia_kay — 6 days ago

My Tag manager shows 3 tracking IDs. Can someone explain what that means and how to fix it.

I was helping a friend in setting up GTM. I have done this once previously so tried it again. His website is hosted on Shopify and after creating and linking GTM to his website, I realized the Tag manager is showing 3 tracking IDs. I did a little bit of research and understood that one ID is the one which I just set up, but the other two are the default IDs set up by shopify when setting up the website. I tried disabling or deleting the other two but can't find any option on spotify to do so.

reddit.com
u/T__lymphocyte — 5 days ago

Help me correct my tagging on an SPA

I'm working on a project with a buddy of mine, he's created the page and I'm handling the GAds, GTM, and GA4 set up. For this specific page, it's a Single-Page Application, which I'm not very familiar with. I understand the concept but I believe my Tags aren't set up correctly (GA4 drops off whenever I navigate through the page, and then only registers on an initial history click).

Does the above sound correct or should GA4 be registering at all times?

reddit.com
u/Zealousideal_Stock85 — 4 days ago

Need help with Shopfy purchase tracking

Hi, I am currently trying to set up tracking in Shopify for a Google Ads account. The store is using a third-party checkout, but the thank you page is hosted by Shopify, not the third-party platform.

The issue is that GTM is not loading on the thank you page and is not capturing the purchase event data. I have tried adding custom scripts in the checkout and also using customer events, but none of that is working.

At the moment, the purchase event is firing through gtag and all the data is being captured correctly. However, I want to implement this through GTM so that I can set up manual enhanced tracking.

Does anyone know how I can properly fire the purchase event in GTM in this setup?

Here is the customer event code:

// GTM for Shopify Custom Pixel by Loves Data

// Replace GTM-EXAMPLE with your GTM container ID

window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':

new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=

'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);

})(window,document,'script','dataLayer', 'GTM-WLS67S64');

analytics.subscribe("checkout_completed", (event) => {

dataLayer.push({ ecommerce: null });

const items = [event.data?.checkout?.lineItems?.map((item)](http://event.data?.checkout?.lineItems?.map((item)) => {

return {

item_id: item.variant.product.id,

item_name: item.variant.product.title,

price: item.variant.price.amount,

quantity: item.quantity

}

});

dataLayer.push({

event: "purchase",

url: event.context.document.location.href,

ecommerce: {

currency: event.data?.checkout?.currencyCode,

value: event.data?.checkout?.subtotalPrice?.amount,

transaction_id: event.data?.checkout?.order?.id,

coupon: event.data?.checkout?.discountAllocations,

shipping: event.data?.checkout?.shippingLine?.price?.amount,

tax: event.data?.checkout?.totalTax?.amount,

items: items

}

});

});

analytics.subscribe("payment_info_submitted", (event) => {

dataLayer.push({ ecommerce: null });

const items = [event.data?.checkout?.lineItems?.map((item)](http://event.data?.checkout?.lineItems?.map((item)) => {

return {

item_id: item.variant.product.id,

item_name: item.variant.product.title,

price: item.variant.price.amount,

quantity: item.quantity

}

});

dataLayer.push({

event: "add_payment_info",

url: event.context.document.location.href,

ecommerce: {

currency: event.data?.checkout?.currencyCode,

value: event.data?.checkout?.subtotalPrice?.amount,

items: items

}

});

});

analytics.subscribe("checkout_shipping_info_submitted", (event) => {

dataLayer.push({ ecommerce: null });

const items = [event.data?.checkout?.lineItems?.map((item)](http://event.data?.checkout?.lineItems?.map((item)) => {

return {

item_id: item.variant.product.id,

item_name: item.variant.product.title,

price: item.variant.price.amount,

quantity: item.quantity

}

});

dataLayer.push({

event: "add_shipping_info",

url: event.context.document.location.href,

ecommerce: {

currency: event.data?.checkout?.currencyCode,

value: event.data?.checkout?.subtotalPrice?.amount,

items: items

}

});

});

analytics.subscribe("checkout_started", (event) => {

dataLayer.push({ ecommerce: null });

const items = [event.data?.checkout?.lineItems?.map((item)](http://event.data?.checkout?.lineItems?.map((item)) => {

return {

item_id: item.variant.product.id,

item_name: item.variant.product.title,

price: item.variant.price.amount,

quantity: item.quantity

}

});

dataLayer.push({

event: "begin_checkout",

url: event.context.document.location.href,

ecommerce: {

currency: event.data?.checkout?.currencyCode,

value: event.data?.checkout?.subtotalPrice?.amount,

items: items

}

});

});

analytics.subscribe("cart_viewed", (event) => {

dataLayer.push({ ecommerce: null });

const items = [event.data?.cart?.lines?.map((item)](http://event.data?.cart?.lines?.map((item)) => {

return {

item_id: item.merchandise.product.id,

item_name: item.merchandise.product.title,

price: item.merchandise.price.amount,

quantity: item.quantity

}

});

dataLayer.push({

event: "view_cart",

url: event.context.document.location.href,

ecommerce: {

currency: event.data?.cart?.cost?.totalAmount?.currencyCode,

value: event.data?.cart?.cost?.totalAmount?.amount,

items: items

}

});

});

analytics.subscribe("product_added_to_cart", (event) => {

dataLayer.push({ ecommerce: null });

dataLayer.push({

event: "add_to_cart",

url: event.context.document.location.href,

ecommerce: {

currency: event.data?.cartLine?.cost?.totalAmount?.currencyCode,

value: event.data?.cartLine?.cost?.totalAmount?.amount,

items: [

{

item_id: event.data?.cartLine?.merchandise?.product?.id,

item_name: event.data?.cartLine?.merchandise?.product?.title,

price: event.data?.cartLine?.merchandise?.price?.amount,

quantity: event.data?.cartLine?.quantity

}

]

}

});

});

analytics.subscribe("product_viewed", (event) => {

dataLayer.push({ ecommerce: null });

dataLayer.push({

event: "view_item",

url: event.context.document.location.href,

ecommerce: {

currency: event.data?.productVariant?.price?.currencyCode,

value: event.data?.productVariant?.price?.amount,

items: [

{

item_id: event.data?.productVariant?.product?.id,

item_name: event.data?.productVariant?.product?.title,

price: event.data?.productVariant?.price?.amount,

quantity: 1

}

]

}

});

});

analytics.subscribe("page_viewed", (event) => {

window.dataLayer.push({

event: "shopify_page_view",

url: event.context.document.location.href

});

});

reddit.com
u/Glittering_Client_28 — 5 days ago

GA4 event + Google Ads event = Double Fire?

I have what is probably a stupid question, but I am running Google Ads to track button clicks that link to a different site. I set up another tag with the same trigger to also track it as a GA4 event. When I click the button in a preview test, both the Ads tag and the GA4 tag are fired. Is this correct and then it will just send the conversion to the correct platform, Analytics or Ads? I'm worried about double conversions.

reddit.com
u/SorryAboutMyself — 5 days ago

GTM is not getting loaded on the Shopify thank you page, and I’m not sure why.

I have added a custom script under Customer Events, and during testing it is working correctly. However, GTM is still not loading on the thank you page…

reddit.com
u/Glittering_Client_28 — 6 days ago

Shopify + Google Ads conversion issue (2 tags firing) — anyone seen this before?

Hi everyone,

I’m running into a strange conversion tracking issue on Shopify and I’m trying to understand where it’s coming from.

For a single purchase, Google Ads reports “2 tags” firing (for example Checkout Started - GTM and Purchase - GTM), even though it correctly deduplicates them into one conversion.

The unusual part is that these tags are triggered from two different URL formats:

Web Pixel / Sandbox URL:
.../web-pixels@.../sandbox/modern/checkouts/cn/.../thank-you

Standard Checkout URL:
.../checkouts/cn/.../it-it

Technical setup:

  • No code in theme.liquid (double-checked)
  • No scripts in “Additional Scripts” in Shopify checkout settings (completely empty)
  • Google Tag Manager is loaded only via a Custom Pixel (Shopify Customer Events, sandbox environment)
  • The issue was already present before installing the Google & YouTube app

The question:
If GTM is loaded exclusively via the Shopify Custom Pixel (sandbox), where is the second signal (from the standard checkout URL) coming from? How is a standard checkout URL being tracked if there are no scripts in the theme or checkout settings?

Has anyone experienced this kind of split tracking behavior when using GTM only through a Shopify Custom Pixel?

Is there a way to eliminate the standard checkout signal and keep only the Web Pixel one?

Any insights or similar experiences would be greatly appreciated. Thanks.

reddit.com
u/the_one_neo_ — 5 days ago

GTM Preview and GA4 DebugView work, but no events in live GA4 reports (events don’t show in Debug)

Hi, I’m troubleshooting a Google Tag Manager + GA4 setup on a Shopify store and running into an issue. Setup:

  • GTM Preview mode: events fire correctly 

  • GA4 DebugView: events appear 

  • GTM container is published 

  • GTM is installed in the <head> of theme.liquid

  • GA4 is also connected via the Shopify Google & YouTube app Issue: When I test on the live site (outside of preview/debug mode), no events appear in GA4 reports ❌ So it seems like:

  • GTM → GA4 works in Preview/Debug 

  • But live GA4 reporting does not reflect the events ❌ What I’ve considered so far:

  • Consent mode / cookie banner blocking analytics

  • GA4 internal or developer traffic filtering

  • Reporting delay in GA4

  • Possible conflict between Shopify native GA4 integration and GTM Question: Has anyone experienced a situation where:

  • GTM Preview and GA4 DebugView work correctly

  • On your live website, your events get tracked and in GA4 you can see the DebugView and everything instead of the live GA4 report showing no data.

Any guidance would be really appreciated.

https://docs.google.com/document/d/1cXo1GgdS6Vc7ty5kefeoHo6YpPiQ4AzyqZLeyi-Btzw/edit?usp=sharing\

Update: Hey everyone — quick update on my GTM + GA4 issue. (2026 setup) For GTM, I have installed it directly into my Shopify theme.liquid file using the standard container code:

<!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-WM6PQVFB');</script> <!-- End Google Tag Manager -->

For GA4, I’m using the Shopify Google & YouTube app (so GA4 is also connected there separately).

Current situation:

  • GTM container is installed

I also do have a CMP - Shopify built-in cookie banner.

I think I found the real issue or maybe? messy GA4 setup (multiple properties + data streams). Fixed it to 1 account → 1 property → 1 data stream

  • Shopify cookie banner (Customer Privacy API)
  • GTM + GA4 setup
  • Tags were firing, but GA4 wasn’t showing data properly
  • Had multiple GA4 tags / measurement IDs firing at onc What was wrong My GA4 setup was messy:
  • 1 account
  • 2 properties
  • 2 data streams
  • Multiple GA4 tags firing (Shopify app + GTM + possibly others) So events were being sent to different destinations, which made everything look broken/confusing. What I fixed I simplified everything to:
  • 1 Analytics account
  • 1 Property
  • 1 Data Stream
  • 1 Google Tag (1 measurement ID)
  • 1 destination I deleted:
  • extra properties
  • extra data streams Now everything is properly unified into a single GA4 setup. How I verified it Network tab:
  • collect requests firing
  • Only one Google Analytics request now (no duplicates like before)
  • Just a single GA4 setup running
  • Plus one Google Merchant Center request (this is expected and can be ignored) Key point: no more multiple GA4 tags firing like before Console: window.Shopify.customerPrivacy.getTrackingConsent() Returned: 'yes' → consent is granted The confusing part After fixing everything:
  • DebugView → events showing  (mainly GTM debug/preview mode)
  • GTM Preview → working 
  • Realtime → shows 1 active user  BUT: When I checked: Reports → Life cycle → Engagement → Events Events were NOT showing instantly  I thought it was still broken, but it wasn’t. The “issue” (not actually an issue) Turns out:  GA4 is just delayed
  • DebugView = instant
  • Realtime = near instant
  • Standard reports = delayed (minutes → sometimes ~1 hour) So what happened was:
  • Initially only active user showed in Realtime
  • Then after a bit of clicking around + waiting
  • Events appeared normally in the Life Cycle, events:event name , I change the date to today so I can see if the events are appearing for today after clicking them. It doesn’t appear instantly, after a small delay it appears.

I’ll update this thread if I find the solution. If anyone has seen Shopify + GTM + GA4 conflicts like this before, I’d really appreciate any insight 🙏 thxs also really appreciate all the help n insight so far :) 🙇🏻‍♀️🙇🏻‍♀️

u/No_Background_7216 — 8 days ago

Most eCommerce store owners trust their GA4 reports blindly.

That's a mistake.

GA4 reports show you processed data.

Not the raw data underneath.

That means:

→ Broken events don't always show as broken

→ Missing conversions don't wave a red flag

→ Inflated or duplicate data slips through unnoticed

The reports look clean. The collection underneath might not be.

One shift changes everything:

Stop asking "What do my reports say?"

Start asking, "How is this data being collected?"

That one question forces you to look at your tag setup, your event firing, your data layer, and the actual infrastructure feeding those reports.

We've audited hundreds of GA4 setups. In 80%+ of them, the reports looked fine on the surface. The collection layer told a different story.

Bad data in → bad decisions out. No report can fix that.

Before you optimise a single campaign, audit how your data gets into GA4, not just what GA4 shows you.

Want us to check yours?

reddit.com
u/incisiveranking2022 — 7 days ago

SGTM and Google Tag Destination and Combine

[SGTM and Google Tag Destination]

Hi everyone,

Recently I set up a Server-Side configuration of GTM.

It’s a very simple setup where the web container loads the G-MMxxGA4 tag with GA4 config and ecommerce events.

In the server container, the GA4 tag always sends data to the G-MMxxGA4 tag, while Google Ads Conversion and Remarketing send data to the tag set as 166xxADS (without the AW- prefix).

Here’s my question:

When I was fully client-side, all tags were combined, and the destination was set to both GA4 and Google Ads.

Now with the server-side setup, can I leave things as they are, or is there a risk of messing up the data that the server has already cleanly sent to Google Ads?

I tried following what I’ve read around—taking the AW-166xxADS tag and linking it to a Google Ads destination, leaving it basically idle. But now I’m getting a warning that the AW- tag with Google Ads destination has no “recent data.”

So what’s the correct approach? Should I keep things separated as I’ve done now, or go back to the previous setup where everything was combined?

Here the ss of configuration:

https://ibb.co/ymT8ckrw

Thanks in advance for the help

u/Fast_Difference_5813 — 8 days ago