I recently worked on a project that used Perfect Audience with the Magento CMS platform. I searched far and wide for a pre-built plugin or some code that I could use for the integration. Unfortunately this was unsuccessful.
Perfect Audience typically has great support and that is why I use them. Unfortunately they won’t provide technical support on what they consider “custom” development.
Here are the steps needed to get Perfect Audience setup on the Magento platform. It is important to note that I didn’t complete the full setup for dynamic product ads. Feel free to comment at the bottom if you have the code for this and would like me to update this post with it.
1. Add Perfect Audience’s Site Tracking Tag
Locate the footer.phtml file for your Magento theme and add the following code. This file should be located in /magento/app/design/frontend/MYTEMPLATE/default/template/page/html. Make sure to change the site tracking tag (XXXXXXXXXXXXXXXXXXXXXXXX.js) to that of your own site.
2. Add Checkout Conversion Tracking Code
In case you don’t already know, it is important that you don’t edit the base template files for Magento. This means you need to create a duplicate success.phtml file if you haven’t done so already. You’ll find this file under /magento/app/design/frontend/base/default/template/checkout/success.phtml.
Copy the success.phtml file to /magento/app/design/frontend/MYTEMPLATE/default/template/checkout/ and Magento will automatically start using that file instead of the original.
Now it’s time to edit the file you just created. Add the following code to the bottom of the success.phtml file.
3. Setup Conversion Goal in the Perfect Audience Admin
Next, you’ll need to setup the conversion goal in the Perfect Audience admin. The script you just added to your site fires an event named “PurchasedItem” to Perfect Audience each time someone places an order.
At this point you are ready to start building your campaigns. You’ll need to add this new conversion goal to your campaigns as you set them up. Good luck!