Analytics
5.7K members online now
5.7K 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

Event Tracking in Wordpress Portfolio doesn't work

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am trying to understand how I can set up Google Analytics to track clicks on portfolio items in my Wordpress site. I have properly set up event tracking on buttons throughout the site. Everything appears to render properly on the page. However, when I check the result with Analytics Debugger, I get this:

 

_gaq.push processing "player._setAccount" for args: "[UA-XXXXX-XX]":
_gaq.push processing "player._setDomainName" for args: "[player.vimeo.com]":
_gaq.push processing "player._set" for args: "[_anonymizeIp,true]":
_gaq.push processing "player._trackPageview" for args: "[]":

 

Properly set up event tracks look like the

 

_gaq.push processing "_trackEvent" for args: "xxxxxxxxx":

 

What appears to be going wrong?

1 Expert replyverified_user

Re: Event Tracking in Wordpress Portfolio doesn't work

Top Contributor
# 2
Top Contributor
Hi :-)
Vimeo adds its own tracking to videos hosted by them which is what you are seeing here:
_gaq.push processing "player._setAccount" for args: "[UA-XXXXX-XX]":
_gaq.push processing "player._setDomainName" for args: "[player.vimeo.com]":
_gaq.push processing "player._set" for args: "[_anonymizeIp,true]":
_gaq.push processing "player._trackPageview" for args: "[]":

If you are using the most recent version of tracking code Universal analytics.js then
_gaq.push processing "_trackEvent" for args: "xxxxxxxxx":
wont work for event tracking as the syntax is incorrect for the current version of the tracking code snippet
correct syntax would be
ga('send', 'event', 'category', 'action', 'opt_label', opt_value, {'nonInteraction': 1});
https://developers.google.com/analytics/devguides/collection/analyticsjs/events



Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here