Reputation: 237
I'm little confused with Google services. I want to track conversion events.
I've already configured the script like that :
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXX');</script>
<!-- End Google Tag Manager -->
My Google Tag Manager account is configured with deux services : Analytics and Ads
I've configured conversion event on Google Ads and I try to push it through Javascript calls, but maybe I'm wrong somewhere.
Here is my Javascript code :
gtag('send', <event_action>, {
'event_category': <event_category>,
'event_label': <event_label>,
'value': <event_value
});
At the end of the day, I have no conversion on my dashboard on Google Ads.
Can someone helps with to figure out what's wrong ?
Upvotes: 1
Views: 1211
Reputation: 36
Google provides a Chrome extension to help you test Google Tag Manager. Get it here.
Upvotes: 0
Reputation: 166
Google Tag Manager and Google Ads have different base scripts and will not work together like this very well.
You can set up Google Ads Conversion Tracking in Google Tag Manager simply without additional code by going to tags click new then filling out the conversion ID and Label which can be found in the google ad conversion tools set up by click set up via tag manager.
Set the trigger in google tag manager and preview in Tag Manager to debug this.
Upvotes: 0
Reputation: 5940
Shouldn't it be event
instead of send
?
gtag('event', <action>, {
'event_category': <category>,
'event_label': <label>,
'value': <value>
});
Upvotes: 2
Reputation: 167
Do you also include the gtag.js?
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');
</script>
Upvotes: 0