-
AuthorPosts
-
October 17, 2014 at 8:27 pm #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!
October 19, 2014 at 3:19 am #337765Hi 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!
IsmaelOctober 20, 2014 at 3:12 pm #338363Ismael
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!
JasonOctober 21, 2014 at 7:35 am #338855Hi!
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,
IsmaelOctober 21, 2014 at 3:12 pm #339019Ismael – 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)?
October 22, 2014 at 4:46 am #339352Hey!
Whatever you like, without the dot, example:
button-newsletter
Best regards,
JosueOctober 22, 2014 at 3:12 pm #339482Thank you!! That was the final key to making it all work.
October 22, 2014 at 4:00 pm #339508You are welcome, glad we could help :)
Regards,
Josue -
AuthorPosts
- The topic ‘Google Analytics Code in Buttons’ is closed to new replies.