Why not just use a Google Ads Conversion tag to fire on the event you are pushing to the Datalayer? Answer from KalaBaZey on reddit.com
🌐
Google Support
support.google.com › google-ads › answer › 7548399
Use the Google tag for Google Ads conversion tracking - Google Ads Help
If you’re tracking website conversions, the event snippet tells the Google tag when to track a conversion.
🌐
Google
developers.google.com › tag platform › measure conversions and key events
Measure conversions and key events | Tag Platform | Google for Developers
The event tag should be placed on pages with events you would like to mark as conversions. Place the event tag after the global snippet, within the <head> section. The fields in the event snippet are different depending on the tag type, counting ...
🌐
Reddit
reddit.com › r/googletagmanager › using google tag manager to send conversion event to google ads?
r/GoogleTagManager on Reddit: Using Google Tag Manager to Send Conversion Event to Google Ads?
March 14, 2024 -

Using Google Tag Manager to Send Conversion Event to Google Ads?

I have a Custom HTML Tag configured in GTM that listens for a JavaScript event for the contact form being submitted. It then sends calls window.dataLayer.push and sends the Google Analytics event. I need to also send this conversion to Google Ads. Can I use the following or something similar to it?

window.dataLayer.push({

"event" : "conversion",

"send_to": "AW-33************"

})

Or if not what would I pass to the push function to send the conversion to Google Ads?

Thanks,

John

🌐
MarketingMind
ashokcharan.com › Marketing-Analytics › ~s-google-ads-conversion-tracking-tags.php
Google Ads - Conversion Tracking Tags | MM Marketing Mind
<!-- Event snippet for Purchase conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-accountID/eventID', 'transaction_id': '' }); </script> Previous Next
🌐
Adhook
adhook.io › en › blog › digital advertising › Conversion-Tracking-with-Google-Tag-Manager
Setup Conversion-Tracking in Google Tag Manager | Ultimate Guide
After clicking on "Manually Add Event Code" you can select the desired event. For example, select "Complete registration". Here you can also specify further attributes for your conversion, such as the value of a registration.
🌐
Google
developers.google.com › tag platform › gtag.js › google tag api reference
Google tag API reference | Tag Platform | Google for Developers
The example below illustrates setting a campaign name and ID for a black Friday shopping event. Because you've used set, all other tags, for example, GA4 Event tags or Google Ads Remarketing tags, can access this data. gtag('set', 'campaign', { 'id': 'abc', 'source': 'google', 'name': 'black_friday_promotion', 'term': 'running+shoes', });
Find elsewhere
🌐
Instapage
help.instapage.com › hc › en-us › articles › 360015956912-Using-the-Google-Ads-conversion-tracking-tag
Using the Google Ads conversion tracking tag – Instapage Help Center
You also need to replace the "//add your event code here;" notes with your unique Google event code (it should look like this: gtag('event', 'conversion', {'send_to': 'AW-123456789/AbC-D_efG-h12_34-567'}); ).
Top answer
1 of 1
2

You always need to call gtag.js before you can utilize the functions in gtag. In the of your HTML document you always place this piece of code:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX"></script>
<script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'UA-XXXXXXXXX');
      gtag('config', 'AW-XXXXXXXXX', {'send_page_view': false});
</script>

After the initiation, you can send data to GA and in your case Ads. In most cases, the ecommerce data is already available before the page loads. So you should be able to send this information in the :

<script>
gtag('event', 'purchase', {
  "send_to": "AW-XXXXXXXX/<Conversion Label>",
  "transaction_id": "24.031608523954162",
  "affiliation": "Google online store",
  "value": 23.07,
  "currency": "USD",
  "tax": 1.24,
  "shipping": 0,
  "items": [
    {
      "id": "P12345",
      "name": "Android Warhol T-Shirt",
      "list_name": "Search Results",
      "brand": "Google",
      "category": "Apparel/T-Shirts",
      "variant": "Black",
      "list_position": 1,
      "quantity": 2,
      "price": '2.0'
    },
    {
      "id": "P67890",
      "name": "Flame challenge TShirt",
      "list_name": "Search Results",
      "brand": "MyBrand",
      "category": "Apparel/T-Shirts",
      "variant": "Red",
      "list_position": 2,
      "quantity": 1,
      "price": '3.0'
    }
  ]
});
</script>

Source: https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce#2_track_checkout_options https://developers.google.com/adwords-remarketing-tag/

My recommendation is to use Google Tag Manager to enable your Digital Marketing tools instead of in the code. You will get more freedom in the tools you use, but of course, some code changes are still required.

Hopefully, this clarifies stuff.

Cheers, Raoul

🌐
Google
developers.google.com › tag platform › gtag.js › group and route data
Group and route data | Tag Platform | Google for Developers
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"> </script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); // Global configs gtag('config', 'TAG_ID'); gtag('config', 'DC-ZZZZZZ'); // Measure Google Ads conversions gtag('event', 'conversion', { 'send_to': 'AW-YYYYYY/AbC-D_efG-h12_34-567', 'value': 1.0, 'currency': 'USD' }); // Measure Floodlight conversions gtag('event', 'conversion', { 'allow_custom_scripts': true, 'send_to': 'DC-ZZZZZZ/actions/locat304+standard' }); // Route ecommerce add_to_cart ev
🌐
Stack Exchange
magento.stackexchange.com › questions › 242913 › google-tag-event-snippet-for-sales-conversion-page
magento 1.9 - Google Tag - Event snippet for sales conversion page - Magento Stack Exchange
<?php $OrderId = Mage::getSingleton('checkout/session')->getLastOrderId(); $Order = Mage::getModel('sales/order')->load($OrderId); $incrementId = $Order->getIncrementId(); ?> <script> gtag('event', 'conversion', { 'send_to': 'XX-XXXXXXXXX/XXXXXXXXXXXXXX', 'value': <?php echo number_format($Order->getSubtotal(),2,".",""); ?> , 'currency': 'GBP', 'transaction_id': <?php echo "'".$incrementId."'"; ?> }); </script>
🌐
Google Support
support.google.com › google-ads › answer › 6331314
Add a Google tag to your website - Google Ads Help
Paste your event snippet(s) here. </head> <body> </body> </html> Here's the same webpage after the conversion tracking tag has been added (sample only—this code won't work on your website): <html> <head> <title>Sample HTML File</title> <!-- Google tag (gtag.js) - Google Ads: 123456789 --> <script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'TAG_ID'); </script> <!-- Event snippet for Example conversion page --> <script> gtag('event', 'conversion', {'send_to': 'AW-123456789/AbC-D_efG-h12_34-567', 'value': 1.0, 'currency': 'USD' }); </script> </head> <body></body> </html>
🌐
Reddit
reddit.com › r/googleads › "conversion" vs "purchase" events in google ads gtag / event snippet
r/googleads on Reddit: "conversion" vs "purchase" events in Google Ads GTAG / event snippet
December 22, 2024 -

Hi guys

I wanted to ask what the difference is between "gtag('event', 'conversion', { ...}); " and " gtag('event', 'purchase', { ...}); " in Google Ads Conversion event code snippets.

Context:
Am trying to set up Conversions with basket data (CWBD) via Shopify customer events on the purchase tag. When we add the CWBD parameters to the code, the pixel stops working (conversions drop to 0).

Google CWBD example code uses gtag('event', 'purchase', { ...}); " rather than "gtag('event', 'conversion', { ...}); " and so ChatGPT is telling me I need to change the conversion from Conversion to Purchase both in the code and in Google Ads itself (see here for the Google info using purchase rather than conversion in the Google Ads example for CWBD)

However, I can't see anywhere where I can change the event in Google Ads so that it uses "gtag('event', 'purchase', { ...}); " in the event snippet. The event is already categorised as a "Purchase" goal in Google Ads and all of my events use "gtag('event', 'conversion', { ...}); " regardless of the event goal setting.

When I change the code to gtag('event', 'purchase', { ...}); " this doesn't fix the issue (it still records 0 conversions), so am unsure if I am missing something in terms of how to change conversion to purchase in Google Ads, or if the issue is actually something else entirely.

TIA!

🌐
Google
developers.google.com › tag-platform › devguides › events
About events - Analytics Help
Discover more about Google Analytics events including the different types of events, how they are grouped together, and implementation steps.An event allows you to measure a specific interaction or oc
🌐
Google Support
support.google.com › google-ads › answer › 6331304
Track clicks on your website as conversions - Google Ads Help
For desktop sites, Set up conversion tracking for your website. For mobile sites, Track phone number clicks on a mobile website. When setting up the tag, choose the Click option instead of Page load. The event snippet will look like this: <script> function gtag_report_conversion(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'TAG_ID/CONVERSION_LABEL', 'value': 1.0, 'currency': 'USD', 'event_callback': callback }); return false; } </script>
🌐
Stack Overflow
stackoverflow.com › questions › 70385161 › can-you-do-google-ad-conversion-tracking-in-universal-analytics
events - Can you do google ad conversion tracking in Universal Analytics? - Stack Overflow
<script> gtag('event', 'conversion', {'send_to': 'AW-CONVERSION_ID/CONVERSION_LABEL', 'value': 1.0, 'currency': 'USD' }); </script> The Conversion ID and LAbel can be retrieved from the Google Ads Interface when selecting manual Implementation.
🌐
HubSpot
knowledge.hubspot.com › website-pages › track-conversions-in-google-ads-with-a-global-site-tag
Track conversions in Google Ads with a global site tag
To track conversions on HubSpot-hosted pages in Google Ads, you can add a global site tag to the head HTML of your pages. To work with ads data primarily in HubSpot, connect your Google Ads account and install the Google Ads pixel instead. In addition to the global site tag, you should add the event snippet to the head HTML of any thank you pages you want to track conversions for.
🌐
Stack Overflow
stackoverflow.com › questions › 69990784 › dynamically-firing-a-gtag-event-with-google-tag-manager
Dynamically Firing A gTag Event with Google Tag Manager
I have a script that fires a dynamic gTag.js adwords conversion based on various user interactions taken on that page. This worked fine when I had gTag.js installed. However I recently upgraded to Google Tag Manager and now my code: gtag('event', 'conversion', {'send_to':'Dynamic Bits Here'});