Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Event Tracking Shortcode Buttons - Help Please (https://www.warriorforum.com/programming/526730-event-tracking-shortcode-buttons-help-please.html)

naonline 22nd January 2012 06:46 AM

Event Tracking Shortcode Buttons - Help Please
 
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

SeeSharp 22nd January 2012 05:24 PM

Re: Event Tracking Shortcode Buttons - Help Please
 
Hello Nick,

Unfortunately I can't help you without knowing the actual javascript code that is going along with this button.
If you provide it, I can assist you further.

Greetings
Exterior

Boudewijn 23rd January 2012 03:40 AM

Re: Event Tracking Shortcode Buttons - Help Please
 
Since you have a class in the href I wonder if you have a css section for this button.
You can then put all color ans size stuff in there and remove it from the href part.


All times are GMT -6. The time now is 11:11 PM.