I implemented a script that triggers a dynamic gTag.js AdWords conversion based on various user interactions on my webpage. Everything was working smoothly until I switched to Google Tag Manager. Now, the code snippet:
gtag('event', 'conversion', {'send_to':'Dynamic Bits Here'});
is causing an error. How can I modify this to work with Google Tag Manager? I attempted to push it directly to the dataLayer like so:
window.dataLayer.push('event','conversion', {'send_to':'Dynamic Bits Here'});
Unfortunately, AdWords is not recognizing this as a conversion. I want to avoid having to set up an AdWords conversion tracker in Tag Manager for each individual conversion since there are numerous conversions happening.
Should I just keep gTag.js installed alongside Tag Manager?