Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #778252

    hello,
    my website is http://www.expressvalet.sg

    I am trying to track the clicks to the “Call Now” button in the full-screen slider, however, i understand the limitation to is that we are only allowed to add text to it. Based on google conversion tracking i am supposed to add these into my button.

    <a onclick="goog_report_conversion ('tel:800-123-4567')"
    href="#">Call now!</a>

    need some advice as i am kind of stuck here. Does anyone else face the same issue when trying to track a button.
    Thank you so much for your help.

    #778308

    Hey alsonjonsolutions,
    Please refer to this link for a possible solution: https://kriesi.at/support/topic/please-clear-this-up-for-em-ga-tracking-2/#post-349057

    Best regards,
    Mike

    #778309

    hello Mike,

    thanks, i have came across this as well just some clarifications, Thanks so much for your help.

    Qn1 : The FullScreen slider has a total of 4 slides and 4 call buttons once i allocate a name to the CSS Class, does this CSS name represents all?
    Qn2: Would number 23 be the page id i am aiming to track?

    function add_custom_script(){
    if(is_page(array(23)){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	 $('.button-1 a').on('click', function() {
                 ga('send', 'event', 'button', 'click', 'button-1');
             });
        });
    })(jQuery);
    </script>
    <?php
    }
    }
    add_action('wp_footer', 'add_custom_script');
    
    #778437

    Hi,
    Q1: You can use the same class for all 4 buttons if you like, or with a more complex script you can have a different class for each.
    Q2: your home page is id 10

    Best regards,
    Mike

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