• Hi, I’m not a proper developer, so forgive my ignorance. I created and maintain a WordPress web site for a client using Elementor. Included on this is the Contact Widget. My client uses Google’s adwords and has asked me to add the following code so that the script is triggered when one of the Contact Widget buttons is clicked.

    <!– Event snippet for Contact conversion page
    In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. –>
    <script>
    function gtag_report_conversion(url) {
    var callback = function () {
    if (typeof(url) != ‘undefined’) {
    window.location = url;
    }
    };
    gtag(‘event’, ‘conversion’, {
    ‘send_to’: ‘AW-787502777/bVl5CIj_k9gBELmtwfcC’,
    ‘event_callback’: callback
    });
    return false;
    }
    </script>

    Can this be done?

    The page I need help with: [log in to see the link]

  • The topic ‘Google Adwords code triggers’ is closed to new replies.