Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 22nd Jan 2012, 06:46 AM   #1
Nick Arthur
War Room Member
 
naonline's Avatar
 
Join Date: 2008
Location: The original Perth (Scotland)
Posts: 398
Thanks: 81
Thanked 44 Times in 33 Posts
Default
Event Tracking Shortcode Buttons - Help Please
Share on: 
fb share twitter share gplus share more share

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

naonline is offline  
Unread 22nd Jan 2012, 05:24 PM   #2
Quality > Quantity
War Room Member
 
Join Date: 2011
Location: Germany
Posts: 67
Thanks: 2
Thanked 8 Times in 8 Posts
Default
Re: Event Tracking Shortcode Buttons - Help Please
Share on: 
fb share twitter share gplus share more share

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
SeeSharp is offline  
Unread 23rd Jan 2012, 03:40 AM   #3
Active Warrior
 
Join Date: 2010
Posts: 44
Thanks: 1
Thanked 2 Times in 2 Posts
Default
Re: Event Tracking Shortcode Buttons - Help Please
Share on: 
fb share twitter share gplus share more share

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.
Boudewijn is offline  
Closed Thread


Bookmarks

Tags
buttons, event, shortcode, tracking


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 06:25 AM.