Event Tracking Analyitics for Coupon and Store Links
Would love to track these outbound clicks from /go/ and /go-store/ as events in GA. I have a plugin installed from yoast that will add the proper onclick= tag to the <a> but it only works on the blog posts section of clipper.
I have tried to manually add an <a href="#" onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby\'s First Birthday']);">Play</a>, as an example from google, to the outbound links in both taxonomy-stores-.php and the loop-coupon.php. When I added it it does work and will track, however it breaks the automatic copy to clipboard function on the coupon links.
For example in taxonomy-stores.php i changed the line for the store URL to look like this.
<p class="store-url"><a href="<?php echo $url_out; ?>" onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby\'s First Birthday']);" target="_blank"><?php echo $stores_url; ?></a></p>
Works for GA but breaks the auto copy to clipboard.
Any idea how I can implement this without breaking that function?