Follow

How to embed Adwords Conversion Tracking Code onto your Magento store

Please follow these simple steps in order to embed the AdWords Conversion Tracking Code onto your Magento store ( Magento version under 2):

1. Open this file:

/app/design/frontend/default/yourskinname/template/checkout/success.phtml

2. At the bottom of the file please paste the following php code:

<?php
$order_details = Mage::getModel(‘sales/order’)->loadByIncrementId(Mage::getSingleton(‘checkout/session’)->getLastRealOrderId());
$adwords_saleamt = $order_details->subtotal;
?> 

3.  Then paste the AdWords Conversion Tracking Code you received from StoreYa's Traffic Booster to the bottom of the page (below the php code from step 2).

 

Please follow these simple steps in order to embed the AdWords Conversion Tracking Code onto your Magento 2 store:

  • Login to Magento 2 Admin, on the Admin Panel, Stores > Settings > Configuration.
  • On the left panel, under Sales, select Google API.
  • Open the Google Adwords section, you need to do:

  • Enable the Google Adwords by choosing Yes for that field.
  • Fill your Google Adwords ID xxxxxxx in the Conversion ID field. (...google_conversion_id = xxxxxxx)
  • In the Conversion Language field, choose the language that is defined in your Google Adwords script.
  • In the Conversion Format field, fill the number that is taken from your Google AdWords script.
  • In the Conversion Color field, fill the hexadeciamal value from your Google AdWords script.
  • In the Conversion Label field, fill the text xxx string from your Google AdWords script. (...google_conversion_label = xxx)
  • Set the Conversion Value Type to a dynamic variable based on the Total Cost of sales.
  • Save Config to complete.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk