Track Google Ads Conversions through gtag.js v3
-
Hi, I noticed a couple of threads about setting Google ads conversions using CAOS and your github plugin and I thought to give it a try.
My current CAOS Settings are:
BASIC SETTINGS Snippet Type:Default Anonymize IP: not checked Tracking Code Position:Header (default) ADVANCED SETTINGS Compatibility Mode: None (default) Download File: Gtag.js Cache directory for gtag.js /uploads/myscripts/ Site Speed Sample Rate (%): 50 Enqueue order: 10 Everything else in this page is unchecked or empty None of the CAOS extensions are active.
In the setup instructions Google Ads if you choose the option “The global site tag is already installed on all pages, but comes from another Google product (such as Google Analytics) or from another Google Ads account” it gives this:
gtag('config', 'AW-9_digit_code_here');
and then if you want to set the conversion at the click of something it gives you this:
<script> function gtag_report_conversion(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-9_digit_code_here/_some_hash_here_from_Google', 'event_callback': callback }); return false; } </script>
QUESTIONS
in your github plugin at the line$adsId = 'YOUR-ADS-ID';
should we set it as$adsId = 'AW-9_digit_code_here';
which is the Google Ads Conversion ID or as$adsId = 'Google-Ads-Account-ID'
Where Google-Ads-Account-ID is this onePS. in your website comments you mention to use the Google Ads Account ID but reading the docs from Google I think we should use the conversion id.
Is there any other step I should follow other than installing your plugin and setting the correct ID?
Thank you in advance and sorry for the long post.
- The topic ‘Track Google Ads Conversions through gtag.js v3’ is closed to new replies.