Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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!

    #506281

    Hey fhcmsoftware,

    Did you try adding the code in a code block element to the page(s) in question?

    Thanks,
    Rikard

    #506396

    I 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?

    #506401
    #506744

    Hi – 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 ?

    #506986

    Hey!

    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

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.