Tracking Script Installation in WooCommerce

Google will give a Tracking code like the code below

/* get_total(); ?>;
var google_conversion_currency = "USD";
var google_remarketing_only = false;
/* ]]> */

//www.googleadservices.com/pagead/conversion.js
<noscript>
</noscript>

Here in this code locate the code

var google_conversion_value = 1.00;

Duplicate the  PHP file named thankyou.php located in woocommerce/checkout/thankyou.php plugin directory to the theme folder
/wp-content/themes/theme-directory/woocommerce/checkout/
and copy the tracking code to the file. Replace the google_conversion_value to:-

google_conversion_value = <?php echo $order->get_total(); ?>;

&amp;amp;amp;lt;/p&amp;amp;amp;gt; &amp;amp;amp;lt;div style=”display:inline;”&amp;amp;amp;gt; &amp;amp;amp;lt;img height=”1″ width=”1″ style=”border-style:none;” alt=”” src=”//www.googleadservices.com/pagead/conversion/1031505146/?value=1.00&amp;amp;amp;amp;amp;currency_code=USD&amp;amp;amp;amp;amp;label=5sHfCJr2hG0Q-onu6wM&amp;amp;amp;amp;amp;guid=ON&amp;amp;amp;amp;amp;script=0″/&amp;amp;amp;gt; &amp;amp;amp;lt;/div&amp;amp;amp;gt; &amp;amp;amp;lt;p&amp;amp;amp;gt;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s