Solved

Seem to be losing events that I have logged

  • 18 June 2021
  • 7 replies
  • 506 views

Badge

Hi - I’m taking my first few steps with Amplitude - using the Javascript SDK to log page views and other events on my website, bachtrack.com.

I’m currently running in parallel with Google Analytics and making the same page view calls to both Amplitude and GA. As far as I can see, everything is being logged correctly – I haven’t received any error codes yet – but I’m only seeing around 60% of the event count in Amplitude that I’m seeing in Google. To put it another way, 40% of my page view events are getting lost.

The timing is slightly different - the call to GA is inline inside the HTML <head> tag and happens at around 880ms, whereas the Amplitude call only happens after the page is loaded (around 980ms, according to Chrome). But that doesn’t seem like enough for me to be losing such a high percentage of the Amplitude posts.

Can anyone point me in the direction of what to look for?

icon

Best answer by Saish Redkar 18 June 2021, 15:38

View original

7 replies

Userlevel 7
Badge +10

Hey @xgretsch ,
That’s a really good question to bring up when trying to move from GA to Amplitude.

I haven’t personally dived into the data discrepancies that might occur during this , but this help article might help you get a start to identify some of the causes - 

https://help.amplitude.com/hc/en-us/articles/115002383247#h_7b0d1b3e-8642-4620-a558-94543dbd85c5

Hope this helps to some extent.

 

I would also love to hear from the other Community Members who have moved from GA to Amplitude and some of the approaches they took to validate the numbers.

 

 

 

Badge

 

I haven’t personally dived into the data discrepancies that might occur during this , but this help article might help you get a start to identify some of the causes - 

https://help.amplitude.com/hc/en-us/articles/115002383247#h_7b0d1b3e-8642-4620-a558-94543dbd85c5

Hope this helps to some extent.

 

It’s a perfectly sensible article, but my problems are a somewhat more basic level: at this point, I’m not even worrying about users/sessions, and I’ve very carefully aligned the metrics between GA and Amplitude. The one that might be interesting is the robot question, but I believe those are adequately aligned also. I could be wrong, though, so if anyone can tell me how Amplitude goes about deciding what’s a robot, that would be great!

Userlevel 6
Badge +8

Hi @xgretsch ,

 

Thanks for writing into the Amplitude community! I can see that one of our active members, @Saish Redkar , gave you the checklist to look at in this article but it would seem you have already gone through this checklist, correct?

 

I do not believe the loading time should make a difference but one thing you could do is have the Amplitude code load before the Google Analytics code. I would also make sure that the Amplitude SDK is initialized correctly with the correct API Key. However, another common misunderstanding is that the chart you may be looking at in Amplitude. Are you looking at the unique users count in Amplitude or the Event Totals? If it is the unique count that is different to Google ANalytics, I would instead look at the Event Totals metric and see if the numbers more closely match. 

 

Are the properties of events being tracked the same? Or are some events never turning up to Amplitude despite being logged by the SDK? If the problem still persists after these checks, can you send me a private message with your Amplitude email and project ID and I will look into it further for you.

Badge

Hi Denis

I’m looking at the event totals – I’m well aware that algorithms for determining sessions and unique users are likely to vary between the platforms.

I’m sure the SDK is being initialized with the correct API key: after all, I’m getting 60% of the events I’d expect and it’s only ever initialized in one place.

I agree that it’s unlikely that loading time is the issue, and it’s not clear how I could make Amplitude load any earlier.

The properties of events are the same. As far as I can tell, this is a pure question of percentages – all the important events are turning up in Amplitude, just not enough of them.

Userlevel 6
Badge +8

Hello everyone!

I messaged @xgretsch privately and we discussed this and so it seems to be an implementation issue of some sort. They are currently looking into it themselves and using the Amplitude Event Explorer add-on for Chrome to do so. They will reach out to me if they find anything unusual and I will update everyone here if there is. Thank you again to @Saish Redkar for your advice and expertise!

Kind Regards,
Denis

Badge

Update so far:

(1) I tried flooding Amplitude with a soak test of 500 events from one machine. It logged them all perfectly.

(2) I tried intercepting and logging any errors returned from the logEvent() API call. No errors were reported.

(3) I tried intercepting the case where a tracking software blocker (the one I used was Ghostery) blocked proper loading of the Amplitude API and logging this case. This turns out to be costing me over 1,000 events per day. It’s only a minority of the events, but it’s enough to be significant.

So there’s progress! I won’t be back on this for another couple of weeks, but I’ll keep this thread updated in case it’s useful to anyone else.

Userlevel 6
Badge +8

Sounds good @xgretsch , you can come back here whenever you want and we can pick it back up! :)

Reply