Skip to main content
All CollectionsProductsReclaimReclaim Integration Guides
Set Up Reclaim for Add to Cart (General Instructions)
Set Up Reclaim for Add to Cart (General Instructions)
Updated over 10 months ago

This feature can identify add to cart events for both unknown, non-logged in users (Grow contacts) and known, non-logged in customers (emails in your Grow suppression list). If you use this feature, we will send all of those Add to Cart events to you.

We must enable this feature for you. If you’ve not already spoken with someone on our team, please ensure you request that we enable this for you.

To use this feature, you must first ensure that you’re using the most recent version of our script on your website. You can find your script in your account under Code Script > View Script. Click here for a link to all our tutorials on how to add the script to your site, in case you need a refresher.

If you're using our custom Shopify Integration app, the Add to Cart script will automatically be installed.

On your website

If you aren't using our custom Shopify Integration app, you will need to add our Add to Cart script to your site builder to collect Add to Cart events:

geq.addToCart(item);

Next, edit the snippet.

Generic code for buttons defined by a button ID:

<script type="text/javascript">
document.getElementById("AddToCart").addEventListener('click',function (){
geq.addToCart(item)
});</script>

Generic code for button defined by a class notation:

<script type="text/javascript">
  var item_classnames = document.getElementsByClassName("AddToCart");
  for (var i = 0; i < item_classnames.length; i++) {
    item_classnames[i].addEventListener('click', function () {
      geq.addToCart(item);
    });
  }
</script>

Replace 'AddToCart' in the script with the specific button ID/class from your site.

Our Add to Cart script must be below where you have the item variable in the existing script.

Defining Your item Variable

<script type="text/javascript">
var item = {
"Name": "YOUR-ITEM-NAME",
"Price": "YOUR-ITEM-PRICE",
"ProductID": "YOUR-ITEM-PRODUCT-ID",
"Categories": "YOUR-ITEM-CATEGORIES",
"ImageURL": "YOUR-ITEM-IMAGE-URL",
"URL": "YOUR-ITEM-URL",
"Brand": "YOUR-BRAND-NAME"
};
</script>

Replace our example variable values with the values pulled from your database specifically related to your product. These will be dynamic per product.

Set up flows

For instructions on how to set up an integration with Reclaim via your ESP, click here. Here are the general steps:

1. Request a Test Event from your client success manager to be sent to your ESP. The steps for setting up flows and events will vary depending on your ESP.

2. Copy/Duplicate your existing Add to Cart flow, and name the new version Add to Cart Reclaim. This is the one you will use for our Reclaim events.

3. In this flow, set up a trigger with our event (Add to Cart Reclaim) and exclude contacts who are: in your existing/original Add to Cart flow, been in the Add to Cart Reclaim flow in the past 7 days, started a checkout since entering this flow, and made purchases within the past 7-14 (depending your customers' purchasing behavior).

4. Add a delay that is longer than your existing Add to Cart flow delay. For example, if your existing flow has a 30-minute delay before sending a campaign, set the Add to Cart Reclaim delay for 45 minutes.

5. Select the email campaign to use for these events, and edit the existing flow as needed.

View Add to Cart Events

You can view these events successfully passing through in your Retention.com account. Go to Event Details > Added to cart. This is an easy way to confirm that our events have been successfully implemented.

Have questions? Message us on chat, or email support[at]retention[dot]com!

Did this answer your question?