Installing Conversion Pixel for Post Purchase Pages

Upsell apps like One Click Upsell put a "post purchase" page after a user confirms the purchase in checkout.

This page is where the upsell offer is displayed but it can cause an issue with conversion pixels. 

To enable Ampry conversion tracking for post purchase pages you need to install pieces of code in both the Order Status page and the Post Purchase page. 

The code placed in the Order Status Page should be: 

{% if first_time_accessed == true and post_purchase_page_accessed == false %}
<!-- Conversion Javascript Pixel --> <script type="text/javascript" src="//renderer.ampry.com/register/conversion/pixel/?pixel_code=INSERTYOURS&event_id=INSERTYOURS&FROM=ORDERSTATUSPAGE&revenue={{ total_price | money_without_currency }}"></script> <!--END Conversion Javascript Pixel -->
{% endif %}
The final result should look like this:
Note: You'll need to replace the Pixel code and event ID value with the appropriate values from your Ampry account.
The code placed in the Post Purchase page should be: 
<script>
// make sure the initial conversion isn't tracked twice
if (!Shopify.wasPostPurchasePageSeen) {
  var order = window.Shopify.order;
  fetch('//renderer.ampry.com/register/conversion/pixel/?pixel_code=INSERT&event_id=INSERT&FROM=POSTPURCHASEPAGE&revenue=' + order.totalPrice)
}
</script>
The final result should look something like this: 

Note: You'll need to replace the Pixel code and event ID value with the appropriate values from your Ampry account.
Installing the code like that will allow conversion tracking to work correctly for stores that use One Click Upsell or similar apps.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Submit a Support Ticket Submit a Support Ticket