• Virtuallly

Install Google Ads Conversion Tracking Code on Wordpress



Here I guide you step by step how you can install conversion the tracking codes on your wordpress site. Your 10 mins installation can be a great achievement for the ad campaign.


Before starting the simple steps I want to ensure that you should fix this in the very beginning of your campaigns so that you get the maximum result. The result or definition may differ from case to case basis, as below :


Sell for E-commerce

Leads for Real Estate

Sign - ups for blogs or niche website


There are two types of tags

One tag goes on your entire site (global site tag)

And 'event snippet' which only go on the conversion pages like the'' Thank You'' page.

Make sure Google Tag Assistant extension is installed in your chrome browser.


Installation of Global SiteTag


Go to the dashboard of your wordpress site:

Plugins

Add New (+)

HFCM (Header Footer Code Manager)


Go the Google Ads Account, find the code from conversion section:

For the demo purpose I am showing here :

(This code will go to the every pages of the site )

<!-- Global site tag (gtag.js) - Google Ads: 606467807 -->

<script async src="https://www.googletagmanager.com/gtag/js?id=AW-606467807"></script>

<script>

window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());


gtag('config', 'AW-606467807');

</script>

Next,


Click HCFM again > Add a new snippet >

Snippet name :Confirmation snippet (your own wish)

Site display :Site wide

Location : Header

Show on all devices

Status : active


snippet code :

<!-- Global site tag (gtag.js) - Google Ads: 606467807 -->

<script async src="https://www.googletagmanager.com/gtag/js?id=AW-606467807"></script>

<script>

window.dataLayer = window.dataLayer || [];

function gtag(){dataLayer.push(arguments);}

gtag('js', new Date());


gtag('config', 'AW-606467807');

</script>


SAVE it now


Installation of Event Snippet


Again visit , add a new snippet :


Name : Google ads leads confirmation

Site display :specific pages

Page list: about us/ log in/ contact us

Location : Before content

Device Dispaly : All devices

Status : Active


<!-- Event snippet for Confirmation 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-606467807/p2dACNj2jdsBEN_tl6EC',

'event_callback': callback

});

return false;

}

</script>

Conclusion :


SAVE it now.

Now refresh the page and check on Google Tag Assistant extension if it is showing.


3 views
Contact :

Whitefield

Bangalore 

Karnataka

India- 560066

KK

Mob: 9480119503

E-mail :  support.virtuallly.com
  • Instagram
  • Facebook B&W
  • Twitter B&W
  • LinkedIn B&W
  • YouTube

© 2020 by Virtuallly.com | All Rights Reserved. We work virtually.