Web Tracking for Shopify Browse Abandonment

Browse abandonment campaign allows you to send emails with product recommendations based on what customers have recently viewed in your store. 

Browse abandonment emails can be very effective. This type of email have high contribution to your purchase funnel and can drive additional revenue. However, since the nature of these emails is very personal, you should be sensitive and not overuse this powerful tool.

The new Browsing Abandonment campaign is now available to Shopify store owners. 

To get this campaign up and running, you will need to setup a "web tracking code" in your Shopify admin. This is an easy 2 minutes setup:

1. Find out what the Remarkety Store ID is for your store by looking here:



2. Login to your Shopify store backend

3. Navigate to:

    a. Online Store (1)
    b. Themes (2)
    c. “Actions” (3)
    d. Edit Code (4)



4. Under “Layout” locate the “theme.liquid” layout file

5. Place the following code at the end of the theme.liquid file, before the </body> tag.
    Important - Replace STORE_ID with the Remarkety Store ID code from step 1:

var _rmData = _rmData || [];
_rmData.push(['setStoreKey', 'STORE_ID']);
{% if customer %}
_rmData.push(['setCustomer', {{ customer.email | json }}]);
{% endif %}
<script>(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src = 'https://d3ryumxhbd2uw7.cloudfront.net/webtracking/track.js';
s.parentNode.insertBefore(g, s);
}(document, 'script'));</script>
<script type="text/javascript" src="https://d3ryumxhbd2uw7.cloudfront.net/webtracking/rmShopifyUtils.min.js"></script>


6. Once your layout file looks like the example below, you can go ahead and save itArt_Store___Edit__1_.png


7. Next, to track product views, select the “product.liquid” file on the left, inside the Templates folder.

*Please note that the product.liquid file does not exist on certain Shopify themes. If you cannot locate the product.liquid file, you may need to add the script to the main-product.liquid.file instead.  

8. Place the following code at the end of the “product.liquid” file:

       var _rmData = _rmData || [];
       _rmData.push(['productView', {
         productId: {{product.id|json}},
         productCategoriesIds: {{product.collections|map:'id'|json}},
         productCategories: {{product.collections|map:'title'|json}}

9. Save the layout.


You're all set! You can now open and create your awesome Browser Abandonment campaign. 

If you have any additional questions, please feel free to contact support@remarkety.com.  

Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.