• Resolved cwensink

    (@cwensink)


    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:
    Before:

    after:

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

    https://www.ads-software.com/plugins/maxbuttons/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter cwensink

    (@cwensink)

    Looks like the link structure didn’t work for the examples, let me try again:

    before:  <a href="https://product-page.com">Product</a>
    
    after: <aonclick="_gaq.push(['_trackEvent', 'Affiliate', 'Vendor', 'product-reference']);" href="https://product-page.com">Product</a>

    Product Page: HP Probook 4440s Sample Product Page

    Plugin Author johnbhartley

    (@johnbhartley)

    The MaxButtons output should look something like this:

    <a class="maxbutton-1" href="https://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.

    Plugin Author johnbhartley

    (@johnbhartley)

    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?

    Plugin Author johnbhartley

    (@johnbhartley)

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Customized Button URL Code’ is closed to new replies.