Add Google Analytics Event Tracking
-
Is there a way to add Google Analytics event tracking to the lightbox shortcode? This would allow me to view the number of times a video was viewed in the lightbox.
In essence, I would like to add the following code to the link code:
onClick=”ga(‘send’, ‘event’, ‘video’, ‘video-play’, ‘Video Name’);”
Adding it within the shortcode after the anchor as shown below does not work.
[video_lightbox_vimeo5 video_id=”111111111″ width=”640″ height=”480″ anchor=”http://www.domainname.com/imagename.jpg” onClick=”ga(‘send’, ‘event’, ‘video’, ‘video-play’, ‘Video Name’);”]
Has anyone else had luck adding the GA event tracker?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add Google Analytics Event Tracking’ is closed to new replies.