Hi I'm new to Google Tag Manager,
I am trying to add Google Adwords Conversion Pixel to our website, and google tells me I should add the following snippet.
gtag('event', 'conversion', {
'send_to': 'AW-1000000/XXXXXXXX',
'event_callback': callback
});
Since our website is already using gtm.js
,
can I convert the above snippet to the following to get the same effect?
dataLayer.push({ "event": "conversion",
"send_to": "AW-1000000/XXXXXXXX", "event_callback": undefined})
The main differences are that Gtag. js requires adding code to the source to track new events or new platforms, whereas GTM doesn't.
Having both hardcoded Google Analytics and Google Tag Manager on your site in and of themselves is not an issue. You'll ultimately need to make sure you're not duplicating your efforts and consequently duplicating your data. If you need to have both, then yes, you can.
Google Ads and Google Marketing Platform tags are fully supported by Tag Manager, and there is no need to deploy additional gtag. js-based code on your site if Tag Manager is already in use.
Unlike analytics. js, gtag. js doesn't use trackers to send data to Google Analytics. It sends data to Google Analytics properties identified by their IDs set by the config command.
No. But you can create an Adwords conversion tag within GTM (there is a template for this, the part before the slash is the conversion id, the part after the slash the conversion label). If you want you can configure the tag via the dataLayer, but you'd still have to create a tag within GTM and apply a trigger to make this work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With