How to Troubleshoot Ecommerce Tracking with Google Analytics?

Tracking your sales using Google Analytics is very important for your data, but what if it’s not accurate?

Video transcript:

David: Well, we’re going back to your second question, Dave. So, the short version was trying to find out consistent tracking information between an ecommerce store and Google Analytics, whether Universal Analytics or Google Analytics 4.  

Dave: Yeah. That’s basically it. We’re just kind of seeing sometimes it’s like, what it’s almost double the sales. What the heck is going on? So, we’re diving in. Part of it is that I don’t know what Google does with I mean, so we’ve got the Canadian dollar versus the US dollar. I don’t know if Google Analytics lines up the exact date of when the actual sale happens? Is it gross money? Is it net? And then, when we were setting up Google Analytics 4 earlier today, Brian and I noticed that we hadn’t set the time zone right. So, if somebody, you know… What? Is that what you were going to ask?

David: Time zone.

Dave: Yeah.

David: So, yeah. Go on.

Dave: Well, so we’ve got a few weeks on this site, we have a few weeks of GA4, and the data is pretty close now.

David: Good.

Dave: For UA, we haven’t exactly looked back recently, but a couple of months ago, it was way off. And then the other thing is that I know, I shouldn’t say I know, I’m assuming Google Analytics does not handle failed payments properly or even returns.

David: Interesting, interesting. Ok. Ok.

Dave: In other words, somebody puts a payment in, and it’s successful, just like that. But then, all of a sudden, Stripe comes back and says, “Wait a second, we can’t get the money, so the payment has failed.”

David: Right. So, that’s really interesting, too. A full caveat, this is almost impossible to troubleshoot because every ecommerce system is a little bit different. Right? And Google Analytics acknowledges this because they’ll often state, “We’re giving you an approximation of what we think is happening, but you can’t take it to the bank.” Right? So, anecdotally, it should be pretty close. But there are things like JavaScript failure, browsers not allowing third-party cookies, more and more people being understanding about privacy, or the privacy policy is actually working and preventing you from looking. You know, if you have a privacy policy system and people say, yeah, I don’t want to be tracked, that sounds scary. And then suddenly, well, Google Analytics is not going to be able to get the data.

Dave: Yeah. And so, some of that I understand, but then when we see Google Analytics giving us more sales than the store. I’m like, what the heck?

David: And that has to do, I think, with how Google Analytics tracks ecommerce. Right? When a sale happens on your website, depending on how your website is set up, and again, without looking at it, knowing the system exactly, at a certain point, your system is sending special data into Google Analytics. Right? And then, depending on when that data is sent, it would be affected. So, for instance, in the example you gave us with Stripe, let’s say I make a purchase, and with the confirmation page – your order has been sent – that’s typically when the data is sent to Google Analytics. But if later, Stripe receives data and rejects the payment because that happened after the data was sent into Google Analytics, then, well, Google Analytics isn’t connected to Stripe.

Dave: Yep.

David: Right? I don’t even know if you can connect Google Analytics to Stripe and have Stripe send data. Or if you need to switch the order of things and have Stripe validated before it gets to the confirmation page, right? Or if Stripe can even work that fast. Right? So, those are things that I would look at. Now GA4, if you got it to work with WooCommerce, props to you. And Brian, if that’s what you did…

Dave: Brian did it.

David: You’re amazing. Right? Because very few people are getting that yet.  

Dave: At this point, if you heard somebody say that you’re amazing, your response is, “Wait, what? Say that again. I couldn’t quite hear you.”

Brian: Right!

David: I have a client on Shopify, and I’m trying to figure it out. Right? And it’s going to have to involve some weird stuff and tag manager and blah, blah, blah. It’s not going to be easy if I want the data in GA4. And then, once Shopify converts and actually enables it manually, I have to turn off that stuff to make sure it’s not a conflict. Right? I’m kind of dreading this. But alas… Those are the things that I’d have to look at. Right? Because we don’t know when the data is being sent to Google Analytics if it’s before or after Stripe processes the payments. In which case, it could be something like that, where it’s assuming that payment goes through and sends it into Google Analytics, that would over-report. But then, that would make me worry as a marketer because I’d be if it’s… you said double sometimes?

Dave: One month was almost double. Remember that, Brian?  

Brian: Yeah.

David: That would make me worried that, wow, half the people who made a purchase had credit cards that didn’t work? Because that’s what that would have to mean.

Dave: Yeah.

David: And then that would make me worry that I’m getting a lot of fraudulent purchases or there’s something really wrong with Stripe. That would make me worried if that were the case. It’s maybe just a bad month, but the other thing that I would worry about too is with Google Analytics I think you can only set one currency.

Dave: Correct.

David: So, if you’re running two different countries in one Google Analytics profile, you’ve picked a currency just like you’ve picked one time zone. So, if you’re buying in Canadian dollars, and the US dollar is stronger or weaker, Google Analytics isn’t making that conversion.

Dave: That’s a good point.

David: So, if you’re adding up, ok, this is how many Canadian dollars they made, and here’s how many US dollars they made. Oh, my goodness. The numbers are way off. Well, that’s because Google Analytics is only reporting whatever currency you’ve set it to report.

Dave: Yeah. Yeah. I mean, that’s a good point. The conversion is pretty stable between US and Canada, though. So, I could see that, if we’re a few dollars off, that’s ok.

David: Right.

Dave: One of the things that Brian and I were looking at that we hadn’t yet looked at is in GA4, I guess in UA also, but then GA4 was kind of liking it, we need to look at the actual number of items. The actual number of items associated with the transaction. Because they list them there. If all of those match up, then we know that it’s one of these dollar conversions or weird things. Then we could kind of explain some of that away, I think.

David: What were you thinking, Brian?

Brain: What I was going to say was, at least with GA4, it’s now lesser compared to the actual sales. So, what you mentioned earlier about JavaScript failing or browser protection, makes sense. That particular issue with the double sales is more on the UA or Universal Analytics side.

Dave: Correct.

Brian: Probably because of a double script or something. The difference in Universal Analytics is that it’s easier to enable it. It’s just like click, click, and that’s it. But with GA4, there are a couple of things that you need to do, especially when you’re working with Google tag manager, that we don’t have to do with Universal Analytics.

Dave: Right. That’s what we were talking about.

Brian: I think that comes into play.

David: Yeah. It’s really tough. Like, I had a client that wasn’t ecommerce, but the sign-up process for this just to become a customer (they sold stuff online, but it wasn’t ecommerce, short version) of this website was so complicated that nobody could explain it to me to even validate whether what we thought was a conversion was really a conversion. With Google Analytics for what you’ve done, Brian, you might have been doing it right in Google Analytics 4, and the old default process for UA isn’t even right because it’s automated. Maybe the way you built through GA4 is correct, and UA is wrong because it’s the default.

Dave: We were looking at some of that because the UA is so much simpler. Right? There are only a few things you go through, and you click for ecommerce and all of that.

David: Have you made a test purchase? Like, sometimes you can create a one-dollar product or…

Dave: Yeah, what we really need to do, Brian, is we need to set up a test site and verify some of this stuff there. Do you know what I mean?

David: I wonder if you just do a test product. Like, create a one-dollar product, and then just do it on the live site just to see if it shows up in both Universal and GA4.

Dave: We could do that.

Have a question about this process? Ask it here:

Get started doing SEO today

SEO seems hard- you have to keep up with all the changes and weed through contradictory advice. This is frustrating and overwhelming. Curious Ants will teach you SEO while bringing your website more traffic and customers- because you’ll learn SEO while doing it.