简体   繁体   中英

Google AMP Adwords conversion tracking

In an AMP page I want to report a conversion to Adwords when user clicks a certain HTML tag.
How do I config an "amp-analytics" tag to report a conversion to Adwords?

This indicates "amp-analytics" supports it.

I also want to know the answer to your question. I'm thinking it might be something like.

 <amp-analytics type="remarketing"> <script type="application/json"> { "vars": { "google_conversion_id": "976157725", "google_custom_params": "window.google_tag_params", "google_remarketing_only": true } } </script> </amp-analytics> 

Or a second possibility might be

 <amp-analytics config="https://www.googletagmanager.com/amp.json?id=GTM-XXXXX&gtm.url=SOURCE_URL" data-credentials="include"> <script type="application/json"> { "vars": { "var1": "val1", "var2": "val2" } } </script> </amp-analytics> 

This is from https://juliencoquet.com/en/2017/01/27/tracking-amp-pages-with-google-analytics-and-tag-manager-2/ I'd love to know your feedback.

This is what I added: (replace {{googleConversionId}} and {{googleConversionLabel}} below with data from the adwords pixel snippet)

I made sure the my relevant "a" tags had a "clickout" class

<amp-analytics type="googleadwords"><script type="application/json">
{
  "triggers": {
    "onClick": {
      "on": "click",
      "selector": ".clickout",
      "request": "conversion"
    }
  },
  "vars": {
    "googleConversionId": {{googleConversionId}},
    "googleConversionLanguage": "en",
    "googleConversionFormat": "3",
    "googleConversionLabel":{{googleConversionLabel}}",
    "googleRemarketingOnly": "false"
  }
}

It works, I see conversions in adwords dashboard

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM