AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
3.4K members online now
3.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

GA not consistently tracking events

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I set up Google Analytics to track events the other day on the site http://dekalblibrary.org/

 

For the purposes of this question I'll only be focusing on the event tracking code that is on the carousel.

 

After setting it up, and testing it, I realized it only works some of the time. If I go to Real Time and look at the events, then click on the GA links many times, then once in a while it will register but most of the time it won't.

 

As an experiment to see if this was just an issue with the Real Time feature, I left the code alone for a day. Then I looked at the number of events under Behavior - Events. Here are the numbers I got (narrowed down to that one day only):

 

Event Label - # of events

Skillshare - 12

eBooks and other Downloadable Content - 10

Hispanic Heritage Month - 8

 

However, I also had some code I wrote to keep track of the number of clicks locally (and as a test to see if ga was working). And according to my counter I got 20, 15, and 10 hits respectively.

 

Can anyone enlighten me as to why this code is only working some of the time? Thanks

GA not consistently tracking events

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

I recently read a support article about event tracking that mentioned tracking can be difficult in some situations where the interaction takes the visitor to another page... May be helpful: 

"Tracking outbound links and forms can be tricky because most browsers will stop executing JavaScript on the current page once a new page starts to load. One solution to this problem is to set the transport field to beacon.."

Ref: https://developers.google.com/analytics/devguides/collection/analyticsjs/events

 

GA not consistently tracking events

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks. I'll try that.

 

But even the links that don't go to a separate page aren't registering most of the time. I put GA event tracking on the tabs on the right in the "upcoming events" section (the "all", "adult" and "kids" tabs).

 

But whenever I click on them and look at the ga-Real Time screen, they do not seem to register except once in a while it does. The code clearly works, but only works every once in a while.