WebSite X5Help Center

 
Mandar V.
Mandar V.
User

Google Ads Conversation Tracking codes  en

Autore: Mandar V.
Visite 265, Followers 1, Condiviso 0  

Hello WX5 masters. Need your guidance.

Client has provided me 2 different codes for Google Ads Conversation Tracking. 

Step 1 is installing Google tag - 

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-11105800220"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'AW-11105800220');
</script>

Steo 2 is adding conversation script -

<!-- Event snippet for Contact conversion page
In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. -->
<script>
function gtag_report_conversion(url) {
var callback = function () {
if (typeof(url) != 'undefined') {
window.location = url;
}
};

gtag('event', 'conversion', {
'send_to': 'AW-11105800220/tOs8CKgmt_gbEUyg1k8p',
'value': 1.0,
'currency': 'INR',
'event_callback': callback
});
return false;
}
</script>

Step 3 is a creating HTML button link - 

Example button -

<button onclick="gtag_report_conversion();">
Submit
</button>

Example link - 

<a href="thankyou.html" onclick="return gtag_report_conversion('thankyou.html');">
Contact Us
</a>

I am confused. Please guide.

Regards

Postato il
3 RISPOSTE
Incomedia
Elisa B.
Incomedia

Hi!

You need to enter this code in the expert section for each page, in the Header. As far as buttons and links are concerned, you will need to use the HTML Code Object to set them up

Thanks! Kind regards.

Leggi di più
Postato il da Elisa B.
Mandar V.
Mandar V.
User
Autore

Thanks ELISA B.

Already uploaded the code the expert section of each page in the header. 

Client want another code to be linked to his connect via WhatsApp button. 

Please let me know how to do it? 

Regards 

Leggi di più
Postato il da Mandar V.
Incomedia
Eric C.
Incomedia

Hello Mandar,
could you clarify what should be achieved exactly?
Thank you.

Leggi di più
Postato il da Eric C.