Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #337513

    I am trying to get a Google Analytics onclick tracking code to work with your shortcode buttons and promo box buttons, and I can’t get it to track the clicks.

    I went through and added the Custom CSS field as was advised in other posts, and placed the Google Analytics onclick code into that field.

    Here is a sample of what I placed in the field:

    onClick=”ga(‘send’, ‘event’, ‘download’, ‘product_flyer’, ‘snaptivation’);”

    Is there something I’m missing? The GA code is working perfectly for text links and for submit button clicks on my Contacts Form 7 plugin forms. I just can’t get it to work on the theme buttons.

    Any advice would be appreciated!

    #337765

    Hi Jason!

    Thank you for using Enfold.

    You should not add the ga tracking code on the custom css class field. Please refer to this link for more info: https://kriesi.at/support/topic/tracking-code-on-specific-button/#post-335355

    Cheers!
    Ismael

    #338363

    Ismael

    I added the code you linked to. Is there anything I’m supposed to do on a button per button basis? Our website has a done of products on it and are trying to track which specific product page gets the most Request More Information button clicks – so we could see if Oven Doors are getting clicks or the button on the Conveyors page, etc.

    Let me know if there’s something more I need to do.

    Thanks!
    Jason

    #338855

    Hi!

    Please read the whole thread. Start with adding custom css class for buttons: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/

    Then do this: https://kriesi.at/support/topic/tracking-code-on-specific-button/#post-335355

    Regards,
    Ismael

    #339019

    Ismael – I guess I’m missing something here. I went through both threads and added the coding where I was instructed. I have turned on the custom css class for the buttons and added the coded found in the second thread.

    My question is what do I put in the Custom CSS Class field when I create the button? Is it just .button-1 (or whatever I rename it to)?

    #339352

    Hey!

    Whatever you like, without the dot, example:

    button-newsletter
    

    Best regards,
    Josue

    #339482

    Thank you!! That was the final key to making it all work.

    #339508

    You are welcome, glad we could help :)

    Regards,
    Josue

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Google Analytics Code in Buttons’ is closed to new replies.