Looks like the link structure didn’t work for the examples, let me try again:
before: <a href="http://product-page.com">Product</a>
after: <aonclick="_gaq.push(['_trackEvent', 'Affiliate', 'Vendor', 'product-reference']);" href="http://product-page.com">Product</a>
Product Page: HP Probook 4440s Sample Product Page
The MaxButtons output should look something like this:
<a class="maxbutton-1" href="http://product-page.com">Product</a>
// not using any container or center aligning
So you have two ways to get it the way you want.
1) use View CSS and create the button yourself. Create your link with the tracking code and add your class of maxbutton-1 or whatever number it is. Go to the bottom of your button edit page and “View CSS.” Grab that CSS and plop it into your style.css file. Now you’ll be able to use it for your self-created .
or
2) Use jQuery
1 is definitely the more favorable approach, so give it a shot and if you can’t get it let me know and we’ll go from there.
Did that work for you? Marking as resolved, but can re-open if you still have questions.
Hi,
I would also like to track the clicks on my maxbuttons. I already have my google analytics event tracking code, but I don’t understand step one.
Where am I supposed to add my code?
You’ll need to add the code in either your Post or Page via the Text Editor or you’ll need to add it directly to your template file.