4.8K members online now
4.8K 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 - where do i put the code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

i set up event tracking in Google Analytics under the Admin / Goals tab.  I placed this script <a onClick="ga('send', 'event', 'Videos', 'Play', 'evokedx_video', '0');" href="">EvokeDxVideo View</a> in my body. 


I am doing something wrong cause it is not tracking.

1 Expert replyverified_user

Re: Event Tracking - where do i put the code

Top Contributor
# 2
Top Contributor
Hi Jocelyn :-)
In the event tracking code, the event value should not have any quote characters surrounding it.
If there is no value for the event you can use <a onClick="ga('send', 'event', 'videos', 'play', 'evokedx_video');" href="">EvokeDxVideo View</a>
the event value is not a required field

if you need to use a value of 0 then ga('send', 'event', 'videos', 'play', 'evokedx_video', 0);
Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here