Hi Programmers. I am trying to implement event tracking for the buttons on a clients site that were added using Wordpress shortcodes.
Event Tracking Shortcode Buttons - Help Please
3
Hi Programmers.
I am trying to implement event tracking for the buttons on a clients site that were added using Wordpress shortcodes.
original code is
[button link="http://www.clientsite.co.uk/contact" size="large" bg_color="#ab0000"]JOIN NOW[/button]
I read on another forum that the code should be changed to
<a href="http://www.clientsite.co.uk/contact" class="button" size="large" bg_color="#ab0000" onClick="_gaq.push(['_trackEvent', 'Join Now', 'Clicked',,, false]);">JOIN NOW</a>
Only problem is that the button changes to the default button, i.e, the size and bg_color attributes are ignored.
Any ideas?
Thanks
Nick
I am trying to implement event tracking for the buttons on a clients site that were added using Wordpress shortcodes.
original code is
[button link="http://www.clientsite.co.uk/contact" size="large" bg_color="#ab0000"]JOIN NOW[/button]
I read on another forum that the code should be changed to
<a href="http://www.clientsite.co.uk/contact" class="button" size="large" bg_color="#ab0000" onClick="_gaq.push(['_trackEvent', 'Join Now', 'Clicked',,, false]);">JOIN NOW</a>
Only problem is that the button changes to the default button, i.e, the size and bg_color attributes are ignored.
Any ideas?
Thanks
Nick
- SeeSharp
- Boudewijn
Next Topics on Trending Feed
-
3