Google Ads — Conversion Tracking Tags

To track conversions such as purchases, leads, and sign-ups, Google Ads utilizes global site tags that rely on JavaScript (gtag.js) to collect conversion data. While conversion tracking is useful for evaluating advertising performance, it is not a requirement for the CPC pricing model. However, if using the CPA (cost per acquisition) pricing model to track acquisitions, conversion tracking snippets must be inserted into all of the pages of the website.

Conversion tracking relies on two gtag commands – a ‘config’ command that configures the Google Ads account and an ‘event’ command that sends event data to Google Ads.

The steps required to set-up the conversion tracking facility for Google Ads campaigns, are as follows:

  1. Create a conversion action at Tools & setting > Measurement > Conversion in the Google Ads account. This generates a conversion tracking code snippet to track users that complete the conversion action after clicking an ad.
  2. Add the global site tag snippet such as the one shown below, which contains the config command, to all pages of the website.
    Note: If the global site tag has already been installed, only the config command on the last line of the code, needs to be added.
  3. <!-- Global site tag (gtag.js) - Google Ads: accountID -->
        <script async src="https://www.googletagmanager.com/gtag/js?id=AW-accountID "></script>
        <script>
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());
          gtag('config', 'AW-accountID ');
        </script>
  4. Add the event command to the webpage (e.g., “Thank you for your order” page) that the customer is sent to after the conversion action is completed.
    <!-- Event snippet for Purchase conversion page -->
        <script>
          gtag('event', 'conversion', {
              'send_to': 'AW-accountID/eventID',
              'transaction_id': ''
          });
        </script>

Previous     Next

Use the Search Bar to find content on MarketingMind.







Digital Marketing Workshop

Digital Marketing Workshop

Unlock the Power of Digital Marketing: Join us for an immersive online experience designed to empower you with the skills and knowledge needed to excel in the dynamic world of digital marketing. In just three days, you will transform into a proficient digital marketer, equipped to craft and implement successful online strategies.


Marketing Analytics Workshop

Marketing Analytics Workshop

In an analytics-driven business environment, this analytics-centred consumer marketing workshop is tailored to the needs of consumer analysts, marketing researchers, brand managers, category managers and seasoned marketing and retailing professionals.