Tagged: AdWords, conversion, google analytics, Tracking
-
AuthorPosts
-
September 21, 2015 at 4:16 am #506169
Hi – I apologize if this is a general WordPress issue and not impacted by using Enfold. I’m trying to implement conversion tracking with Adwords and Google Analytics. The only thing I’ve gotten to work is a simple page load conversion. None of the triggers based on clicking a link work. Google Tag Manager seems to think it’s all set up okay, but nothing happens.
Seems like I need to add a little bit of code with the “onclick” action – but I don’t see how I can get at the HTML of the page itself so that I can add that to the code associated with a particular link.
As an alternative (although I’d prefer to have this trigger off clicking a link), I figured I could use a Thank You page — but using a hyperlink through one of the Enfold content objects (such as icon list), I don’t see a way to put in a link to download something (eg a trial installer) AND also go to another page.
Help appreciated!
September 21, 2015 at 9:11 am #506281Hey fhcmsoftware,
Did you try adding the code in a code block element to the page(s) in question?
Thanks,
RikardSeptember 21, 2015 at 1:23 pm #506396I haven’t tried that yet – but I need to get at the HTML for the link to add the code there. If I add code in a block, how will that attach the onclick event to the link?
September 21, 2015 at 1:32 pm #506401Hi!
You can refer to this post – http://kriesi.at/documentation/enfold/add-onclick-event-to-the-contact-form-submit-button/
Cheers!
YigitSeptember 22, 2015 at 12:16 am #506744Hi – that seems to be code for an onclick event for a contact form. How do I generalize it for an arbitrary click on a link ?
September 22, 2015 at 12:55 pm #506986Hey!
You can turn on custom CSS field for ALB elements – http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and give your button element a custom class and then add following code to Functions.php file in Appearance > Editor
function add_custom_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('.your-class a').attr('onclick','HERE GOES YOUR ONCLICK EVENT'); }); </script> <?php } add_action('wp_footer', 'add_custom_attr');
Cheers!
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.