-
Switched to Google Tag, now Conversions aren’t being recorded for days! Please help! (Code included)
Hey guys,
So a few days ago I switched to the new gtag conversion code, but it is not working as no conversions are being recorded even though I’m receiving new leads. (All my leads are always from Google Ads as I don’t appear anywhere else, and I always receive at least 2-3 conversions per day, every day, yet my conversions have been at 0 since I made these changes a few days ago). This is the first time Google Ads doesn’t log any conversions for days.
The conversion action is enabled and that the tracking code is configured correctly.
Below is the HTML/PHP/JS code I included in my <head> tags:
————————-
<script async src=”https://www.googletagmanager.com/gtag/js?id=G-XNEZRJVV2O”></script><script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(‘js’, new Date());
gtag(‘config’, ‘G-XNEZRJVV2O’); <? //GOOGLE ANALYTICS ?>
gtag(‘config’, ‘AW-762398530’); <? //GOOGLE ADS ?>
</script>
<? //GOOGLE ADS CONVERSION TRACKING CODE
if (isset($_REQUEST[“submit”])) //if enquiry form was submitted
{
//echo the google ads conversion tracking script
echo ”
<script>
gtag(‘event’, ‘conversion’, {‘send_to’: ‘AW-762398530/G5qrHLePv7QIcXZj7uX’});
</script>
“;
} ?>
————————-The conversion tracking code only triggers when a lead form has been submitted (the if statement above). I used a Chrome extension which seemed to confirm that IF statement above is correctly triggering the gtag event as it detected it, yet no conversions are being recorded.
Please let me know how I can fix this so that I can see the conversions in my Google Ads account.
Thanks!
Log in to reply.