Hi, I need to add the new Google Ads conversion tags (formerly Google adwords).
They sent me the info that I paste below but I do not know where I would have to place the code that goes to point 1 - b: "copy the tag below and paste it between the head tags (<head> </ head>)"
Could you add, in the parameters of the template, the field to add the Global site tag (gtag.js)?
Or if you can tell me in which file to put it.
regards
Hernan
hernan sent you a conversion tracking tag
The Google Ads user has shared a tracking tag to track conversions on your website. To add this tag to your website, follow the instructions below.
How to use the tag
For conversion tracking to work, you'll need to install the conversion tracking tag, which consists of a global site tag and an event snippet. If installing the tag with Google Tag Manager, follow these instructions instead.
If any of your web pages are built using AMP, you'll need to add tags to both the AMP and HTML versions. Instructions are included for both.
HTML PAGES
1. Install the global site tag on every page of your website.
a. Open the HTML for each page.
b. Choose from the following options:
If you haven't installed the global site tag on your website, copy the tag below and paste it between the head tags (<head></head>):
<!-- Global site tag (gtag.js) - Google Ads: 815053806 --> <script async src="https://www.googletagmanager.com/gtag/js?id=AW-000000000"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-000000000'); </script>
See more guidelines on setting up the global site tag.
If you installed the global site tag on your website from another Google product (example: Google Analytics) or from another Google Ads account, copy the 'config' command below and add it to every instance of the global site tag, right above the </script> end tag.
gtag('config', 'AW-000000000');
If you or a manager account already installed the global site tag on your website while setting up the tag for another conversion action, make sure that the tag is on every page of your website and check that the 'config' command has this Google Ads account's conversion ID: AW-000000000
c. Save the changes to your webpages.
- Install the event snippet on the conversion page. This is the page your customers reach on your website after they've completed a conversion — the "Thank you for your order" page, for example.
a. Open the HTML for the conversion page.
b. Copy the snippet below and paste it between the head tags (<head></head>) of the page, right after the global site tag.
<!-- Event snippet for Ventas Mercado Pago conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-000000000/M3WmCKzf8IgBEO730oQD', 'transaction_id': '' }); </script>
c. Add code to dynamically pass a value to the transaction_id parameter. When tracking purchases, sales, or leads on your website, this parameter ensures that each conversion is only counted once.
d. Save the changes to your webpage.
AMP PAGES
You should follow these instructions for any of the pages built using the AMP framework.
1. Install the global site tag on every page of your website.
a. Open the HTML for each page.
b. Choose from the following options:
If you haven't installed the global site tag on your website, add these two tags:
1. First, copy the tag below and paste it between the head tags (<head></head>), before the AMP JS library.
<meta name="amp-google-client-id-api" content="gtag"> <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
Then, copy the tag below and paste it between the body tags (<body></body>) of all of your AMP pages
<!-- Global site tag (gtag) - Google Ads: 000000000 --> <amp-analytics type="gtag" data-credentials="include"> <script type="application/json"> { "vars": { "gtag_id": "AW-000000000", "config": { "AW-000000000": { "groups": "default" } } }, "triggers": { } } </script> </amp-analytics>
See more guidelines on setting up the global site tag.
If you installed the global site tag on your website from another Google product (example: Google Analytics) or from another Google Ads account, copy the line below and include it in the "config" section of every instance of the global site tag.
"AW-000000000": { "groups": "default" }
If you or a manager account already installed the global site tag on your website while setting up the tag for another conversion action, make sure that the tag is on every page of your website and check that the "config" section has this Google Ads account's conversion ID: AW-000000000
c. Save the changes to your webpages.
- Install the event snippet on the conversion page. This is the page your customers reach on your website after they've completed a conversion — the "Thank you for your order" page, for example.
a. Open the HTML for the conversion page.
b. Copy the snippet below and paste it into the "triggers" section of the global site tag.
"C_A8uXxnk-9tk": { "on": "visible", "vars": { "event_name": "conversion", "transaction_id": "", "send_to": ["AW-000000000/M3WmCKzf8IgBEO730oQD"] } }
c. Add code to dynamically pass a value to the transaction_id parameter. When tracking purchases, sales, or leads on your website, this parameter ensures that each conversion is only counted once.
d. Save the changes to your webpage.