简体   繁体   中英

Google Ads : tracking events

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 ?

Shouldn't it be event instead of send ?

gtag('event', <action>, {
  'event_category': <category>,
  'event_label': <label>,
  'value': <value>
});

reference

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>

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.

Google provides a Chrome extension to help you test Google Tag Manager. Get it here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM