5 Replies Latest reply on Sep 11, 2018 7:44 PM by Sanford Whiteman

    Adwords conversion tracking code on landing page without TY page

    Eva Yu

      I have read many posts on the site on this topic but still have not found the answer. I'm trying to add the adwords conversion tracking code to a landing page template.

      Since we use the on-page thank you message, there is no follow-up page to embed the tracking code.

       

      I'm using the second method to track the click action on the CTA button. The global site tag and event snippets are already in place (hopefully correct), but I don't know how to activate the code on the button.

      We use guided landing page template and I only have basic knowledge of HTML. Is there any other simpler way to make it work?

       

      Thanks!

       

      The code on the template looks like so:

        <!-- BASIC INFO -->
          <title></title>
      
      
          <!-- GOOGLE FONTS -->
          <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Montserrat:400,700">
          <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800">
          <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
          
         <!-- Global site tag (gtag.js) - Google Ads: 796654883 -->
      <script async ></script>
      <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
      
      
        gtag('config', 'AW-796654883');
      </script>
          
          <!-- Event snippet for Download 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-796654883/KEFpCOSJo4gBEKP67_sC',
            'event_callback': callback
        });
        return false;
      }
      </script>