This guide describes the setup and configuration needed for conversion
measurement to work on AMP landing pages.

For a complete overview of AMP for Google Ads, see [Using AMP for your Google
Ads landing pages](https://developers.google.com/google-ads/amp/landing-pages), a step-by-step guide to
deploying AMP with Google Ads.

If you use Google Analytics, follow the steps in [Set up Google Analytics
session unification for AMP](https://support.google.com/analytics/answer/13707279) so
that user sessions are stitched across AMP pages and the rest of your site.
Configuring Google Analytics is recommended if you create Google Ads conversions
based on Google Analytics key events or link Google Ads to Google Analytics.

## Background

For accurate conversion measurement, ad clicks pass on a GCLID ("Google click
identifier") to your landing pages. The landing pages will store the GCLID in a
cookie on your domain and the GCLID parameter is then included in conversion
tags on your site. Read [How Google Ads tracks website
conversions](https://support.google.com/google-ads/answer/7521212) for more details.

Because AMP landing pages are served directly from your own domain, they can
store the GCLID in a cookie on your domain. If your AMP landing pages and your
conversion pages are on different domains or subdomains that cannot share
cookies, you must pass the GCLID on outgoing links to your site
pages using a query parameter in the URL. The tags on your site pages can then
retrieve the GCLID from the query parameter and store the GCLID as a cookie
on your domain.

## Prerequisite

Enable [Google Ads
auto-tagging](https://support.google.com/google-ads/answer/3095550) to measure
conversions on your website across all browsers.

> [!IMPORTANT]
> **Key Point:** If AMP pages are on a non-standard subdomain (other than `www.`, `m.`, or `amp.`) or if the AMP pages link to pages on a different top-level domain, skip to the [advanced configuration section](https://developers.google.com/google-ads/amp/conversion-measurement#advanced_configuration) to set up conversion measurement. Otherwise, use the basic configuration as described below.

## Basic configuration

### Step 1: Tags on AMP landing pages

To use the
[amp-analytics](https://amp.dev/documentation/components/amp-analytics)
component, start by including the required script in the `<head>` element of
your AMP page. You can then configure Google Ads tags with the `amp-analytics`
component by using either the Google tag or Google Tag Manager.

#### Option 1: Google tag

Using the default [Google tag for
AMP](https://developers.google.com/tag-platform/gtagjs/amp?technology=gtagjs) on your AMP landing pages with
your Google Ads tag ID adds website visitors to your "All visitors" remarketing
lists (if you've set up remarketing).

This configuration also stores the GCLID in a first-party cookie on your domain
and passes the GCLID by default across standard subdomains (`www.`, `m.`, and
`amp.`). In the following sample code snippet, replace
<var translate="no">AW-CONVERSION_ID</var> with your Google Ads tag ID (for example,
`AW-123456789`):

```
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
  "vars" : {
    "gtag_id": "AW-CONVERSION_ID",
    "config" : {
      "AW-CONVERSION_ID": { "groups": "default" }
    }
  }
}
</script>
</amp-analytics>
```

For the `gtag_id` field, you can specify the tag ID from any Google product (for
example, Google Ads or Search Ads 360) that you use on your AMP pages, but
include only one product ID in `gtag_id`.

#### Option 2: Google Tag Manager

- [Create a Google Tag Manager AMP container and add the default code
  snippet](https://support.google.com/tagmanager/answer/9205783) to your AMP page.
- Add a [Conversion Linker
  tag](https://support.google.com/tagmanager/answer/7549390) to your Google Tag Manager AMP container to store the GCLID in a first-party cookie on your domain and pass it across standard subdomains.

### Step 2: Tags on non-AMP pages

Review the following options for tags needed on non-AMP pages. Follow the
detailed instructions in [How Google Ads tracks website
conversions](https://support.google.com/google-ads/answer/7521212) for each of
the options below.

#### Option 1: Google tag

Follow the [Google tag setup
instructions](https://support.google.com/google-ads/answer/7548399):

- Place the Google tag snippet on all pages of your website.
- On conversion pages, place the event snippet anywhere in the code after the Google tag snippet.

#### Option 2: Google Tag Manager

On your Google Tag Manager web container:

- Create a Google Tag Manager [Google Ads
  Conversion](https://support.google.com/tagmanager/answer/6105160) tag.
- Add a **Conversion Linker** tag to the Google Tag Manager web container and set it to fire on **All Pages**.

If the Tag Manager code snippet on your site pages loads in an iframe, select
**Enable linking across domains** and **Accept incoming linker parameters** in
your [Conversion Linker
tag](https://support.google.com/tagmanager/answer/7549390#linker).

## Advanced configuration: Set up conversion measurement across domains

If your AMP pages are on a non-standard subdomain (that is, **not** `www.`,
`m.`, or `amp.`) or link to pages on a different top-level domain, complete the
following cross-domain configuration.

### Step 1: Tags on AMP landing pages

You can configure Google Ads tags with either the Google tag or Google Tag
Manager.

#### Option 1: Google tag

- Implement the [Google tag for
  AMP](https://developers.google.com/tag-platform/gtagjs/amp?technology=gtagjs) on your AMP pages.
- Add the following code snippet to your AMP page:
  - Replace <var translate="no">AW-CONVERSION_ID</var> with your Google Ads tag ID (for example, `AW-123456789`).
  - In the `domains` array, include the domain where your AMP page is hosted along with any destination domains or subdomains.

```
<amp-analytics type="gtag" data-credentials="include">
<script type="application/json">
{
  "vars" : {
    "gtag_id": "AW-CONVERSION_ID",
    "linker": { "domains": ["subdomain1.example.com", "subdomain2.example.com", "www.example2.com"] },
    "config" : {
      "AW-CONVERSION_ID": { "groups": "default" }
    }
  }
}
</script>
</amp-analytics>
```

For the `gtag_id` field, you can specify the tag ID from any Google product (for
example, Google Ads or Search Ads 360) that you use on your AMP pages, but
include only one product ID in `gtag_id`.

#### Option 2: Google Tag Manager

- [Create a Google Tag Manager AMP
  container](https://support.google.com/tagmanager/answer/9205783) and deploy AMP-compliant tags.
- Add a [Conversion Linker
  tag](https://support.google.com/tagmanager/answer/7549390) to your AMP container.
- Select **Enable linking across domains** , and in **Auto Link Domains**, enter the domain that your AMP page is hosted on and any destination domains for outgoing links as a comma-separated list.
- Add the default Google Tag Manager AMP code snippet to your AMP page, replacing <var translate="no">GTM_CONTAINER_ID</var> with your container ID (for example, `GTM-XXXXXX`):

```
<!-- Google Tag Manager -->
<amp-analytics config="https://www.googletagmanager.com/amp.json?id=GTM_CONTAINER_ID&gtm.url=SOURCE_URL" data-credentials="include">
</amp-analytics>
```

### Step 2: Tags on non-AMP pages

Configure tags on your non-AMP pages with either the Google tag or Google Tag
Manager.

#### Option 1: Google tag

- Add the following Google tag snippet to your non-AMP pages:
  - Replace <var translate="no">AW-CONVERSION_ID</var> with your Google Ads tag ID (for example, `AW-123456789`).
  - In the `domains` array, include the domain where your AMP page is hosted along with any destination domains or subdomains.

```
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-CONVERSION_ID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-CONVERSION_ID', {
    'linker': {
      'domains': ['subdomain1.example.com', 'subdomain2.example.com', 'www.example2.com']
    }
  });
</script>
```

#### Option 2: Google Tag Manager

- In the Google Tag Manager web container:
  - Configure your Conversion Linker tag to [link across
    domains](https://support.google.com/tagmanager/answer/7549390#linker).
  - Use the [default Google Tag Manager code
    snippet](https://support.google.com/tagmanager/answer/14842164) on your non-AMP pages.
  - If you use Google Analytics, [configure your domains in Google
    Analytics Admin](https://support.google.com/analytics/answer/10071811) for cross-domain measurement.

## Optional configuration

This section covers additional optional configuration that may be needed for
your AMP deployment.

### Conversion event on AMP pages

In most cases, the conversion will happen in subsequent pages in user journey
which are likely non-AMP pages. In these cases, follow the instructions in [How
Google Ads tracks website
conversions](https://support.google.com/google-ads/answer/7521212).

This section covers the case where you would like to measure a conversion on the
AMP landing page itself.

#### Using Google tag

On the AMP page where you want to record a conversion, add a conversion trigger
to the `triggers` object. The following example shows a complete tag on an AMP
conversion page that reports a Google Ads conversion:

```
<!-- Google tag (gtag) -->
<amp-analytics type="gtag" data-credentials="include">
  <script type="application/json">
  {
    "vars": {
      "gtag_id": "AW-CONVERSION_ID",
      "config": {
        "AW-CONVERSION_ID": {
          "groups": "default"
        }
      }
    },
    "triggers": {
      "CONVERSION_LABEL": {
        "on": "visible",
        "vars": {
          "event_name": "purchase",
          "transaction_id": "",
          "value": 15,
          "currency": "USD",
          "send_to": "AW-CONVERSION_ID/CONVERSION_LABEL"
        }
      }
    }
  }
  </script>
</amp-analytics>
```

Note the following fields in this `<amp-analytics>` tag:

- The `gtag_id` field contains the tag ID provided by Google Ads conversions (for example, `AW-123456789`), and <var translate="no">CONVERSION_LABEL</var> is the conversion label for the conversion action.
- You can specify the tag ID from any Google product that you use on your AMP page, but include only one product ID in the `gtag_id` field.
- The `config` object needs to contain one entry for each Google product you use to measure activity on your AMP site.
- If you use both Google Ads and Search Ads 360, see [Technical details for
  Google tag and event snippet](https://support.google.com/sa360/answer/7566546) for Search Ads 360 AMP tag examples.
- In this example, the `amp-analytics` component fires on the page `visible` event. Alternatively, you can configure the conversion to fire on a different event, such as a button `click`.

#### Using Google Tag Manager

In your Google Tag Manager AMP container, add **Google Ads Conversion Tracking**
or **Google Ads Remarketing** tags and configure triggers for your conversion
events.

### Google Ads call tracking

[Phone call conversion tracking](https://support.google.com/google-ads/answer/6095883)
is supported on AMP pages in Google Ads.

> [!NOTE]
> **Note:** This feature isn't supported in the Safari browser.

#### Step 1: Locate conversion configuration

To get started, set up a [call
asset](https://support.google.com/google-ads/answer/2453991) and create a [website
call conversion action](https://support.google.com/google-ads/answer/6095883) in your
Google Ads account. After you create the conversion action, retrieve your
numeric **Conversion ID** and **Conversion Label** from either the Google Tag
Manager setup option or the Google tag phone snippet.

##### Option 1: Use the Google Tag Manager setup option in Google Ads

1. Sign in to your Google Ads account, and select **Goals** \> **Conversions** \> **Summary**.
2. Select **+ Create conversion action** (or **New conversion action** ), and create a website phone call conversion action by following [Set up your
   phone call conversions](https://support.google.com/google-ads/answer/16559798).
3. In the tag setup step, select **Use Google Tag Manager**.
4. Copy the **Conversion ID** and **Conversion Label** to use in the AMP call tracking configuration in Step 2.

##### Option 2: Extract values from the Google tag phone snippet

If you select **Install the tag yourself** during tag setup, Google Ads
generates a phone snippet similar to the following example:

```
<script>
  gtag('config', 'AW-123456789/_ABcDEFg12hI34567jK', {
    'phone_conversion_number': '1-800-123-4567'
  });
</script>
```

Extract the numeric **Conversion ID** (without the `AW-` prefix) and the
**Conversion Label** from the `gtag('config', ...)` target string:

| Phone snippet value | AMP call tracking parameter | Example value |
|---|---|---|
| Numeric ID after `AW-` | Conversion ID (path segment) | `123456789` |
| String after `/` | Conversion Label (`cl` query parameter) | `_ABcDEFg12hI34567jK` |

#### Step 2: Configure the AMP call tracker

Include the [amp-call-tracking](https://amp.dev/documentation/components/amp-call-tracking)
component script in the `<head>` element of your AMP page:

    <head>
      <script async custom-element="amp-call-tracking"
        src="https://cdn.ampproject.org/v0/amp-call-tracking-0.1.js"></script>
    </head>

To measure call conversions, wrap your click-to-call `<a>` link in an
`<amp-call-tracking>` element pointing to the Google Ads call tracking endpoint:

```
<amp-call-tracking
  config="https://www.googleadservices.com/pagead/conversion/CONVERSION_ID/wcm?cl=CONVERSION_LABEL&tel=1800-123-4567&mode=1">
  <a href="tel:18001234567">+1-800-123-4567</a>
</amp-call-tracking>
```

Replace the following:

- <var translate="no">CONVERSION_ID</var>: your numeric Google Ads Conversion ID without the `AW-` prefix (for example, `123456789`).
- <var translate="no">CONVERSION_LABEL</var>: your Google Ads Conversion Label (for example, `_ABcDEFg12hI34567jK`).

The `tel` query parameter in the `config` URL must match the telephone number in
the enclosed `<a>` link.

## Limitations

Conversion linking across different domains won't happen if a user closes out
the AMP page without navigating to the next page since cross-domain linking
works using link decoration.