Detecting and Preventing Data Discrepancies with GA4 and GTM

Common tracking errors, consent mode glitches, and validation procedures to maintain clean GA4 and GTM data.

Speakers: Zafer Yıldız, Ferit Berkay Kelecek

06 Aug 2024

Video Transcript

⏱ 24 min read• 4,228 words

Read the full speech or switch languages

— Hey everyone, welcome to Zeo Talks. Today we’re diving into analytics. What are we doing in the measurement world? Ferit and I have done two Zeo Talks before. I’m the Web Analytics Manager here. Ferit is a senior member of our team. We have a few topics to cover. We’ll keep it casual and improvised. We’ll let the conversation flow naturally. Expect a session around 35 to 40 minutes. Ferit, welcome to the show.

— Thanks. Good to be back on Zeo. It’s been a while since our last talk, Özgür. We’re covering a lot of ground today. Glad we’re doing this.

— We tried to dodge the marketing team, but they caught us in March, right?

— Yeah, exactly.

— That’s great. Let’s start with a warm-up. How do we spot data inconsistencies in Google Analytics 4 or GTM? When a problem pops up, how does it usually reach us? "The tracking is off." This could mean anything. It could be core metrics like sessions or users. It could be a custom conversion. How do we handle this? What tools do we actually use? Do we check the real-time report? Do we use DebugView or the console? There are so many options. There are plenty of extensions and tools to spot these issues. Let’s recommend some tools the audience can use right away.

Let’s start there.

— Let me ask you this. Are session and user discrepancies easy to spot? I don't think brands notice those first. They usually come to us about revenue, add-to-carts, or checkout steps. Isn't it harder to notice session or user issues?

— I don't think it's that hard. Why? Because if there's a massive drop, they notice. Say a brand has 100,000 daily visitors. If that drops to 60,000 for a few days, they know. They immediately say, "My data is down." Exactly. Conversion-focused brands need this. But every metric is linked. If sessions drop, users drop. If users drop, engagement drops. It’s usually a total decline. It’s easy to spot. But fixing it is tough.

— Yeah.

— Sometimes we debug and see nothing. I see myself in DebugView. The network request returns a 200. I show up in real-time. That’s when we need to dig deeper. We look for page-level issues. Or maybe it’s a consent management problem. I see myself. But is the property failing to track users who opt out under advanced consent mode? That’s the real conversation. What extensions do we use? When that happens, I rely heavily on Tag Assistant. It’s my go-to.

— I skip Tag Assistant. I just open the debugger. I check for counts and duplicates there. Tag Assistant is a hassle. You have to connect and reconnect. For non-technical users, just add the debugger. Check the console. See if the JFor is firing. Check for duplicates directly. Maybe you suspect specific pages. Like the homepage. You can navigate to deeper pages. Check the lower category pages. Maybe tags aren't firing there. What else do we use? Tag Assistant often hits CSP errors. We see that constantly. Content Security Policy errors are common.

Updates happen without you knowing. Or they don't happen. If we added JFor.

— Sorry for interrupting. I wanted to say we should share these extensions. Let's put them under the video. Beginners should try them out. They can debug just like we do. I took notes while you talked. I added Analytics Debugger. There's Tag Assistant too. Add that.

— You need to enable a specific JFor feature in Google Analytics Debugger. Let's mention that. You have to toggle the JFor visibility settings.

— The extension is packed with features. Don't just think about Google Analytics 4. You can also debug tools like Adobe or Matomo. It's an excellent tool.

— You can even see the screens.

— Exactly, it's a perfect tool. I know it's your favorite too. Your screenshots always come from there.

— It's great for explaining things to people. It breaks down complex topics so simply. Exactly.

— Mine is great too.

— It shows it right there. It gives you the item ID. You can see if it’s tracking. If it’s missing, it tells you.

— I’m a bit old-school, though. My brain leans toward the network tab.

— Yeah, that works too.

— Exactly. Some extensions miss server-side requests. That’s why I use the console. But I definitely use the debugger and Tag Assistant. I’m forgetting the name of that other extension.

— Let me add this: When checking the network tab, don't search for JFor. Search for "collect."

— Exactly. Data is collected via collect calls.

— Check if the JFor call fires. It must fire on every page. Keep an eye on that.

— Exactly. Debug view is where Google Analytics 4 really beats Universal Analytics. You need to activate it. There are several ways to do that. The most common way is Tag Manager preview mode. Your actions flow right into debug view. You can see yourself there. It works seamlessly. Tag Manager preview mode is a debugger itself. I should add that. You can debug from there too. Also, there is the Google Analytics Debugger extension. This is different from what Ferit mentioned. It is Google's own official extension. It is called Google Analytics Debugger.

Just add it to your browser. Click it to turn it on. It activates debug view for your Analytics property on any site. This Google Analytics Debugger extension is a key tool for us. I'm taking notes on this. We'll share everything so nothing is left hanging. You can try these out while we explain. That covers the debug part. Did we miss anything? Probably. But this is what we use.

— I don't know how useful they are. I never use real-time reports. They don't show user-specific data. Real-time reports might show another user's data instead. I don't really recommend them. We recommend three tools. Tag Assistant, Tag Manager, and the Google Analytics Debugger. Turning on the Analytics Debugger is enough. That should be plenty for checking anything.

— Exactly. We covered checking. Let's talk about data enrichment. When setting things up, we create documentation. This covers the data layer or tracking on Android/iOS. How do we create that documentation? How do we handle communication with developers? What are the best perspectives here?

— I try to minimize communication. Let's prepare reports that require very little back-and-forth. Screenshots are critical here. Show exactly where it should trigger. Just saying "add payment info" isn't always clear enough. They might not care about this. They have other code to manage. They don't know your specific block. When you say "add payment info," show them the credit card field. Use visuals. That is your job.

— Exactly.

— Clean code is vital here. Use proper naming conventions. Code blocks get messy fast. You have e-commerce objects, event names, item ID, and item list name. Clarity is key. They get the event name. They know to clear the e-commerce object. But "item ID" confuses them. Is it a SKU? A system ID? A transaction ID? There are too many IDs. Explain them in detail. I even annotate my requests. For "view item list," I pull the category tree. I want them to know exactly what I’m tracking.

Sometimes developers just don't show up. They deliver broken code without asking questions. Then we have to redo everything from scratch. It’s a huge problem. I really try to watch out for that.

— Exactly. You have to optimize the documentation for the specific site. Google already provides guides on Enhanced E-commerce. They explain the parameters, what they mean, and when they should trigger. Developers can easily find that info. But we need to tailor it to the site's interface. Like you said, some checkouts have three steps. Others have five. Some sites have shipping. Others sell digital goods. Maybe it’s an airline ticket site. You have to optimize the setup for that specific brand or app. You have to explain the parameters clearly. Take the index, for example. A developer might not know what that is. We have to define it. What value goes into the index? What about the item name?

What goes into the item ID? How should they format the price? We create documentation that breaks everything down step-by-step. Doing this actually saves you a ton of effort later. Vague briefs lead to bad documentation. The other side won't get it. They'll waste time trying to figure it out. Most people, myself included, want details upfront. We don't want to waste time. Asking for more details because the brief was lacking is a waste. Setting up extra meetings to explain things is inefficient. That happens because of my poor documentation. We have to produce perfect documentation.

We prioritize this in our SEO and Analytics departments. I’m proud to say we get great feedback. Brands love our documentation. The dev teams love it too. It helps them move fast. Sure, we make mistakes sometimes. We revise them quickly and resend them for integration. Documentation is key. But the developer's experience matters just as much. We often deal with junior devs. Seniors usually handle the complex stuff. Juniors get these tasks passed to them. Even with perfect documentation, it might not be enough.

You have to explain it. Maybe even multiple times.

— I’d like to add something here. String and number data types are crucial. You need to define them. I don’t always do it. I usually just note it in the report or the code block. Maybe we should specify: "This is a string. This is a number." We should explain how to send and aggregate them. I see this a lot. People send numbers as strings or vice versa. It happens constantly. We really need to explain that in detail.

— Exactly. Take item ID. It looks like a number, but it should be a string. Right? Why send it as a number? Only if you need mathematical operations in Google Analytics. If it’s revenue, it must be a number. It’s simple. Quantity is a number. Price needs to be a number for calculations. These are common mistakes. They cause the most post-setup errors. Documentation is fine. But if you don't define these at the parameter level. You'll still have issues with Enhanced E-commerce. Honestly, bad data ruins our reports. That’s why this part is so critical. Anything else you’d add?

— Not really. We’ve covered the details. Let’s move on to common mistakes. We’ve been focusing on events and Enhanced E-commerce. These are the most critical events for any site. Let’s talk about the errors we see most often. I can kick things off. The biggest issue is event placement. Take select item, view item list, or view item. Brands often only trigger these on the product page. They skip the homepage. They skip the lists. They even skip the related products section at the bottom.

— Or they rely on a third-party module.

— Exactly. Third-party modules exist. A pop-up shows products. They missed the events there. I see it a lot with remove from cart.

— Put it in my bag.

— It happens with add to cart too. I add to cart on the homepage. Nothing happens. I go to the product page. A pop-up opens. See? There’s an add to cart button there too. It doesn't work. I didn't trigger that capture. Then I go to the cart. Maybe I want two of that item. I do that often. I click again in the cart. It still doesn't work. So which add to cart did you track? You only tracked the product page button. That’s incomplete data. You lost 50% or 60% of your data. Claiming that’s your total add to cart is wrong. Saying your product list was viewed is also wrong.

I don't know if you see this often. But I run into it all the time.

— Exactly. Increasing the quantity in the cart is often missed. The product detail page is the main spot for add to cart actions. You can trigger an add to cart right there. Most sites work that way. You click add to cart and it goes. Or maybe a third-party module pops up. If you only track the product page, your add to cart count drops. It might go from 50,000 down to 35,000. Honestly, it's better not to track it at all. That data is just wrong. A small drop from 50,000 to 48,000 is fine. Browsers or devices can block JavaScript. That’s expected.

But these basic mistakes are different. You’re creating the data gap yourself. It comes down to documentation and integration. These are integration errors. It happens a lot with purchase tracking too. The quantity shows as one when it’s actually two.

— Yeah.

— Say you added two items. It should show as times two. This impacts everything. It hits your revenue. It hits your purchase counts. You’re messing up everything. One mistake ruins all your data in Analytics. This causes issues elsewhere too. These events aren't just for Google Analytics 4. You’re sending that same add to cart via GTM to Meta and Ads.

— Exactly.

— Or to TikTok, for example.

— It gets messy. I often see issues with quantity. It’s a simple error. Duplicate purchases are common. The purchase fires again when you refresh the page. I always check for this. It’s a critical bug. After I buy something, I’ll go back and refresh the page. I can do that. I’m a user. That’s a normal action. Refreshing the page fires the purchase again. It looks like I bought the item twice. If I refresh five times, it counts five purchases. Your revenue is toast.

Your product data is gone. Your profitability is calculated all wrong. Watch out for this. You must run the code only once. It’s critical. A purchase event should fire once. It sends the transaction ID once. Then it stops.

— Exactly. Next up, let’s talk about PII. That’s personally identifiable information. My full name, email, phone number, or ID number. You get the idea. These things identify me directly. Not my gender or age. Analytics already tracks those basic user details. We don't see much user-level data. Google Analytics 4 is much stricter here. It’s tighter than the old Universal Analytics. You see way more unknown data in age reports. Always. Right? It’s in every report. Lots of null sets for age and location. If we get technical, Google Analytics 4 masks the last digit of the IP.

That affects your location data too. In Universal Analytics, we had to do this manually. We used anonymized IP in GTM to scrub it. We had to use a specific tool to anonymize that IP. But Google Analytics 4 does this by default. Exactly. In a world focused on user privacy, PII is super sensitive. We’ve never had our Analytics account flagged. Thank God for that. We’ve never dealt with that. We catch these things fast. As consultants, it’s our job to spot them. We caught one for a brand recently. It was an email address. I sent a deletion request immediately. It took a while.

It took quite a while, actually. But it eventually gets deleted. It’s not the end of the world. Let’s talk about detecting PII. How do we catch an email address? Think about it. Data is collected under hundreds of dimensions. There are thousands of metrics. Or hundreds, at least. It usually happens under a parameter. Take the page URL. Users often carry their email in the URL during checkout.

— Exactly.

— This is a common issue. Emails like ferit@leo.org show up in the URL. Phone numbers do too. Great, right? All of this gets sent to your reports as page parameters. You end up collecting this data by accident. But Google Analytics 4 can actually spot this. It recognizes email patterns like @gmail.com or @hotmail.com. It even detects phone numbers. So, how do we catch them? Searching for "@gmail.com" is way too manual. Phone numbers usually stand out on their own. You can spot them easily. I’m talking about page reports here. If you see too many parameters, that’s a red flag. Say you have 100 pages. You check Analytics and see 1,100 page paths.

That means a parameter is duplicating your pages constantly. That’s how you catch it. We can spot it manually. It might also be a sub-parameter in a custom event. Maybe partial credit card info is leaking during checkout. Or names. It could be a software bug. Or maybe it’s related to your input fields. That’s the technical side of it. That’s why there’s so much talk about how to detect PII. I’ll add something for that. Let’s put a direct link below the video. You can check your own accounts.

— Here is a pro tip. Look at the breakdowns Zafer mentioned. But don't look at the top performers. Look at the ones with the fewest sessions, views, or users. Reverse the report. These issues are rare. They’re usually bugs or misconfigured items. They always hide in the low-traffic data. I always reverse the report to find them. I check the bottom of the list to catch those leaks. I’ve never seen this happen. I’ve been in the industry for 2.5 years. Zafer has maybe seen it once or twice. It’s extremely rare. I just scroll back a few pages to find it.

— I want to share my screen. Let’s make this concrete while I look for the source. Can you see my screen, Ferit? Perfect. Here is that email I mentioned. See how it hits Google Analytics? Or first name and last name. It gets passed in the URL. That’s the most common issue. You need to search for these in the page path report. Just search for "first name" right there. You could also block them in Tag Manager. That’s another way to handle it. I wanted to make this concrete for you. I’ll link the resource I showed earlier. If you search for "PII in GA4," you’ll find plenty more info.

This is critical. We’re living in a GDPR and KVKK world. It’s not just PII. We’re in a world where cookies are constantly debated. This part is vital. Moving on, let’s talk about the user journey. We covered the integration side. Now let’s look at the rest. We’ve done the integration. The user goes through payment info, shipping info, and begin checkout. What value do these reports provide? We covered the integration side. Now let's talk reporting. What should brands demand here? What insights should they pull from these events? We need to cover this now.

— Let's call these funnels. Connected events create a funnel for us. We map out the steps leading to a purchase. The main benefit? Seeing where users drop off. Where are they leaving your site? It’s not just for purchases. We build these integrations elsewhere too. Take insurance sites. They ask for personal info. What are you insuring? Who are you? Where do you live? What’s the product? These steps become a funnel. The core logic is simple. Where are users dropping off? Which step is the problem?

That’s the primary benefit. Identifying the exact drop-off point. That’s how I use funnels most.

— Exactly. Funnels are inherently reductive. If you ask for a national ID, it might not be necessary. Maybe remove that step. If users drop off there, they’re hitting a wall. They see the shipping cost.

— Exactly.

— It’s a common issue. Users reach checkout. They hit the shipping info step. They see the shipping fee. Maybe they bail. They head to another site. You can spot this in Google Analytics. If your funnel is set up right and your events fire correctly. It’s easy to track. Funnels are standard in e-commerce. But they work for sign-ups too. It’s not just for e-commerce. You can build your own custom steps. Think of a form. For example, booking a test drive for a car. There are multiple steps involved.

You can send all those steps with parameters. See exactly where users drop off. Is something scaring them away? If someone starts a form or a purchase and quits, they’ve changed their mind. It’s simple. Assuming there’s no technical error. You can catch those too. Sometimes things break internally. Nobody notices. You can spot that. Some errors aren't chronic. They don't always show up. Or they happen on specific browsers. You can break down your funnel by browser or device. Look at mobile versus web. Even platform-specific. Check iOS and Android separately. It’s not just about the setup.

This isn't just Analytics consulting. It’s your own brand. These things aren't that hard. You just need to tinker a bit. Integration is a bit technical. You might need a consultant for that. But once it’s live, you can handle funnel analysis. Even with zero experience. If you have a working funnel, check it periodically. See what errors pop up on which platforms. Find out what’s stopping users from reaching the finish line. You can catch that right there. That’s the ultimate goal of funnel analysis.

— Zero. That’s the whole point of these setups. The main reason for all this tracking.

— Exactly. We’ve been talking data. But we can’t skip consent mode. It’s a huge piece of the puzzle.

— I want to give us a shoutout. We’ve really pushed consent mode awareness at ZEO. We got most brands to the table. We showed them the laws. We shared the decrees. We told them it was coming. ZEO brands are on board now. They’ve accepted it. They’re setting it up. I hope the whole industry follows suit. User data matters. We’re customers too, after all. It’s a bit philosophical. My preferences matter. If I don't want my data tracked, it shouldn't be. I remember the old days. It was a total free-for-all.

I don't even know what an adblocker is. I’m a bit younger. Ads were everywhere. You looked at one thing, and ads followed you. It was like a digital cancer. Ads need boundaries. Data collection needs limits too. We work with data, but there’s a line. We have to be respectful. ZEO has made great progress. We held 30 or 40 meetings with our brands last month. We spent hours on this. Each session took up to an hour. We did it so brands don't fall into this trap.

— Exactly. It’s an unknown issue in Turkey. Or it’s just swept under the rug. It’s strictly regulated in the EU. Even for brands not using ZEO for Analytics, we still provide this guidance. Whether they use our SEO or ad services, we inform them through their consultants. We gladly join their meetings. Sometimes we even meet with their lawyers. We explain the technical side and the risks. We cover how machine learning fills the gaps. Check out our ZEO talks on Analytics for more.

We covered consent mode in great detail there. It’s a must-have now. 2025 is the official deadline. We’ve shared the documentation. The goal is full GDPR compliance. There are many cookie management platforms in Turkey. Google also recommends specific partners. You need to contact them. Get it installed on your site or app immediately. Your point is spot on. It’s not just technical. There’s a philosophical side to this. I see it on huge sites all the time. You ask me a question. My answer doesn't impact data collection. That’s just not right.

I’m talking about two or three specific sites. Listeners probably know which big Turkish sites I mean. If you ask me a question, don't bury the opt-out in an anchor text. I want to see it clearly. Exactly. I want to see a button. I know my right to opt out is reserved. But sometimes you put it there and it doesn't even work. I see that all the time, right? It’s just a banner sitting there. It has zero function for data collection. It’s just there for the sake of being there. That’s not right at all. We’re sensitive about this. We work with data. Our job is to educate brands.

We ensure everything works perfectly. We make sure brands don't lose revenue over data issues. This isn't a bad thing. If you lose too much data, Google has solutions. That’s why Consent Mode exists. It’s there to recover your lost data. Being sensitive about this is a good thing. Anything else we haven't covered in this episode?

— We covered data rights. We showed where to catch data. We dove into the data layer. Then we explained how to use it. We showed how to push that data to Google Analytics 4. We also analyzed funnels. We collected all the data. We showed how to analyze those funnels. Finally, we touched on consent mode. We had to. That’s a wrap for today.

— Thanks for tuning in. The ZEO channel has plenty more. We cover AI, SEO, and ads. Check out our ZEO talks and other content. Subscribe to the ZEO channel to stay updated. Catch us on our podcast or YouTube. Follow us for more. Stay safe. See you next time.

This transcript was generated using AI speech recognition and verified against subtitle style rules.

Yiğit Konur

Content author

Yiğit Konur

both

Contact us

How we handle your data

Open as a full page