Videos
Technically you are migrating from gtag.js to GTM (GTM is a tag manager, and while it can be used to deploy GA by itself it tracks nothing).
If you want to integrate Google Analytics via GTM then the second snippet in your post is the replacement for the first, not an addition. You need the second snippet, then you configure GTM to deploy Google Analytics to your page. For most use cases you do not even need the noscript tag (unless you specifically configure tags that run in noscript mode).
For you debounce-event you can use a timeout to push an event to the datalayer and then use it to trigger a Google Analytics Event. You can do this either somewhere in your page code, or in a custom HTML tag that is triggered on a Pageview (or DOM ready) event.
setTimeout(dataLayer.push({'event':'deBounce'}),20000);
Then you create a trigger of the "Custom Event" type an in the field "event name" you enter "debounce" (without the quotes). You then use that trigger to fire a Google Analytics tag that is set to event tracking in GTM (you notice already that this is not really simpler than gtag.js, but it allows you to control also non-Google tags so it's probably worth the effort).
The "Event" key is special in the dataLayer object - Google overwrites the native push-method in the datalayer array to listen for object keys called "event". Whenever it hits an "event" key it updates all internal variable from the dataLayer (this adds all newly pushed values) and then allows to fire tag.
Yes you would need both the script to set up GTM. 1st code preferably in the head section and 2nd code in the body section of your website.The code enables tag manger to fire tags by inserting gtm.js in the page. Once your GTM is set up ,for tracking you can create universal Analytics tag to track your events.Check out the url below for tracking events using GTM.
https://www.gravitatedesign.com/blog/google-tag-manager-analytics-event-tracking-2018/
Hi. I have looked for a guide on how to migrate from a Google Ads Conversion Tag to Google Tag Manager, but I cannot really find a good guide on this. I already have a Google Ads Conversion Tag setup and it has been working well for me for years. The existing Google Ads Conversion Tag script on my website looks like this:
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-123456789"></script>
<script> window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'AW-123456789'); </script>
I have not created a Google Tag Manager account, and of course, I have not installed the Google Tag Manager script on my website yet.
The best I could find was this Youtube video but in that video, it just shows how to create a new Google Ads Conversion Tag in Google Tag Manager. Can I not use my existing Google Ads Conversion Tag or am I supposed to make a new one?
So I guess I am supposed to:
Create a new Conversion Action in Google Ads (or can I reuse my current Conversion Action that is already setup with my Google Ads Conversion Tag above?)
Get the Conversion ID and Conversion Label of this new Conversion Action
Create a new Google Tag Manager account
Remove the Google Ads Conversion Script above
Install the Google Tag Manager script at the top of the <head> and <body> tags
In GTM, setup Tag Configuration and copy the Conversion ID and Conversion Label here
In GTM setup Triggering
In GTM create a Conversion Linker tag
Did I get this right?