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

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

Event Tracking help

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Do you have to set up tag in order to set an event? I cannot get an event to track and I'm not sure if it is my code or that I dont have a tag set.


I have tried: ga('send', 'event', 'Videos', 'play', 'Fall Campaign');

And: _gaq.push([ '_trackEvent', 'Category', 'Action', 'Label is Optional']);


with no success. Any suggestions would be great!


1 Expert replyverified_user

Re: Event Tracking help

Top Contributor
# 2
Top Contributor

Hi Kathy,


You need to load the Google Analytics library in order to send hits to Google Analytics.


  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  ga('create', 'UA-XXXXXXX-1', 'auto');


Once you put the above code in your head tag on your page you will be able to send events to GA using the code ga('send', 'event', 'Videos', 'play', 'Fall Campaign');


Let me know if you have more questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Event Tracking help

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thank you. I added this code and will see if it starts to track!

Thanks so much