S
S
skyfly20102020-05-22 16:36:47
Google Ads
skyfly2010, 2020-05-22 16:36:47

How to set up google ads to accept conversions from a website?

Good afternoon. There is a site. It has several buttons for communication:

<a href="#" style="font-size:22px;" onclick="ym(63284002,'reachGoal','tg'); return gtag_report_conversion('tg://resolve?domain=UserName');"><img src="/assets/basestyle/Tg.jpg"" class="img-fluid" style="max-width:32px;"/></a>
<a href="tel:+375299841006" style="font-size:22px;" onclick="ym(63284002,'reachGoal','phone'); return gtag_report_conversion1('tel:88888888888888');"><img src="/assets/basestyle/phone.jpg" class="img-fluid" style="max-width:32px;"/></a>

When you click on the first button: a chat with the user opens.
When you click on the second one, a regular call occurs. It is
necessary to transfer information about the conversion to Google Ads.
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-88888888"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'AW-88888888');
  
function gtag_report_conversion(url) {
  var callback = function () {
    if (typeof(url) != 'undefined') {
      window.location = url;
    }
  };
  gtag('event', 'tgconversion', {
      'send_to': 'AW-88888888/kUT8CM_Vm9EBEJWaiOQC',
      'event_callback': callback
  });
  return false;
}
function gtag_report_conversion1(url) {
  var callback = function () {
    if (typeof(url) != 'undefined') {
      window.location = url;
    }
  };
  gtag('event', 'phoneclick', {
      'send_to': 'AW-88888888/ATmPCIWCqdEBEJWaiOQC',
      'event_callback': callback
  });
  return false;
}
</script>


We perform an action on the site, Google Tag Assistant is satisfied. Says everything went smoothly. The requests went to google. At the same time, there is no data in the advertising company itself.

I’ll note separately that you need to configure it through Google ads, other methods (through analytics or Tag Manager) are not suitable =((

Tell me, who has any ideas about how this can be done?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question