WordPress Button Plugin MaxButtons
[resolved] Customized Button URL Code (6 posts)

  1. cwensink
    Posted 1 year ago #

    I'm starting to use commission junction for affiliate links, and the tracking URL's that are set up require a 1 pixel image to be included with a standard html link.

    I also would like to add Google Event Tracking Code to each link to track the success of various buttons so I would have something like this:


    How would I set up these customized link structures in the html of a button?


  2. cwensink
    Posted 1 year ago #

    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

  3. johnbhartley
    Plugin Author

    Posted 1 year ago #

    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 .


    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.

  4. johnbhartley
    Plugin Author

    Posted 1 year ago #

    Did that work for you? Marking as resolved, but can re-open if you still have questions.

  5. marjoleintje
    Posted 1 year ago #


    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?

  6. johnbhartley
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic