Title: Customized Button URL Code
Last modified: August 21, 2016

---

# Customized Button URL Code

 *  Resolved [cwensink](https://wordpress.org/support/users/cwensink/)
 * (@cwensink)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/customized-button-url-code/)
 * 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?
 * [http://wordpress.org/plugins/maxbuttons/](http://wordpress.org/plugins/maxbuttons/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [cwensink](https://wordpress.org/support/users/cwensink/)
 * (@cwensink)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/customized-button-url-code/#post-4124499)
 * 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](http://www.camcorderchris.com/hp-probook-4440s-review/)
 *  Plugin Author [johnbhartley](https://wordpress.org/support/users/johnbhartley/)
 * (@johnbhartley)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/customized-button-url-code/#post-4124545)
 * 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.
 * .
 * 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](https://wordpress.org/support/users/johnbhartley/)
 * (@johnbhartley)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/customized-button-url-code/#post-4124743)
 * Did that work for you? Marking as resolved, but can re-open if you still have
   questions.
 *  [marjoleintje](https://wordpress.org/support/users/marjoleintje/)
 * (@marjoleintje)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/customized-button-url-code/#post-4124834)
 * 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](https://wordpress.org/support/users/johnbhartley/)
 * (@johnbhartley)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/customized-button-url-code/#post-4124841)
 * 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.

 * ![](https://ps.w.org/maxbuttons/assets/icon-128x128.png?rev=1378636)
 * [MaxButtons - Create buttons](https://wordpress.org/plugins/maxbuttons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/maxbuttons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/maxbuttons/)
 * [Active Topics](https://wordpress.org/support/plugin/maxbuttons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/maxbuttons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/maxbuttons/reviews/)

## Tags

 * [events](https://wordpress.org/support/topic-tag/events/)

 * 5 replies
 * 3 participants
 * Last reply from: [johnbhartley](https://wordpress.org/support/users/johnbhartley/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/customized-button-url-code/#post-4124841)
 * Status: resolved