× Exclamation Point Icon Important: As we continue to evolve and improve our offerings, we have decided to retire the SharpSpring Ads (formerly Perfect Audience) platform on August 15, 2024. Click here to learn more.

Magento

*SharpSpring Marketing Automation Users: This article is not applicable if you are a SharpSpring Marketing Automation user*

If you use Magento to host your online store, you'll need to correctly install the SharpSpring Ads site tracking tag before you can use SharpSpring Ads.

Note: Magento themes/skins can vary, and site variables for your particular skin may be different than what is listed here. If you need further assistance, please contact Magento's support or review their Knowledge Base for more help.

Installing the Tracking Tag

  1. Login to your Magento account. Navigate to your Admin panel and locate the "Miscellaneous HTML" section. You can paste the site tracking tag there.
  2. Head to your Magento site/skin files. Navigate to the path /app/design/frontend/default/yourskinname/template/checkout/success.phtml. Your skin/theme may contain several files named "success.phtml" so ensure you have selected the file your live site is using.
  3. Paste the following code in this file:
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
$total = $order->getGrandTotal();?>
<script type="text/javascript">
window._pq = window._pq || [];
_pq.push(['track', 'PurchasedItem', {orderId: "<?php echo $this->__($this->escapeHtml($this->getOrderId())) ?>", revenue: <?php echo $total ?>}])
</script>

Then Save. Back in SharpSpring Ads, click Manage-> Create Conversion. Use the following settings:

Then click Create Conversion Goal.

Once the tag is installed, it will take our system 6-8 hours to update and start displaying your audience data, so don't worry if you don't see any activity right away!

If you have any problems, email ads@sharpspring.com.