Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #852478

    Hey guys,

    i have a question regarding the catalogue element and the possibility to track onclick conversions for AdWords. Obviously, the catalogue element is made to show items/products/prices whatever and then adding a link to bring them to the desired item. On this link click i want to add an onclick event to track those conversions (visit site => click link in catalogue) and send them back to AdWords.

    Can you help me figuring out how to do this or what to adapt?

    Thank you very much!

    #853121

    Hey nerlub,
    You could use a function to track your events, like this. But you’ll need the right events, this is an example.

    function add_custom_script(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘.ga-buy-1 a’).attr(‘onclick’, ‘ga(\’send\’, \’event\’, \’Buy Button\’, \’item1\’)\;’);
    jQuery(‘.ga-buy-2 a’).attr(‘onclick’, ‘ga(\’send\’, \’event\’, \’Buy Button\’, \’item2\’)\;’);
    jQuery(‘.ga-buy-3 a’).attr(‘onclick’, ‘ga(\’send\’, \’event\’, \’Buy Button\’, \’item3\’)\;’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_script’);

    Best regards,
    Mike

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