Skip to main content
All CollectionsProductsReclaimReclaim Integration Guides
Set up Reclaim for Add to Cart in Emarsys
Set up Reclaim for Add to Cart in Emarsys
Updated over 11 months ago

This feature can identify abandoned cart contents 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.

NOTE: 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 have the most recent version of our script on your website and the Emarsys integration. 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—and here's how to setup an Emarsys integration if you haven't already.

On your website

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

Inside of your site builder, add our Add to Cart script to fire when someone clicks to add an item to their cart:

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>

Set up Add to Cart flow

Once you have the Add to Cart script added to your site, you will need to set up an automated flow in Emarsys for the Add to Cart events.

1. In Emarsys, click Channels > Triggered Email > Create Mail Stream.

2. Create Custom HTML Email.

3. Name the email Add to Cart Reclaim, and select English for the language. Under Trigger settings, choose Interactions event. Click Save.

4. Select 2 Content Creation at the bottom. You can write custom HTML like in this example.

Or, use an existing Add to Cart template. Go to the dots at the top of the email > Open template.

Then, click the arrow at the top that says Go to Templates.

Search existing templates, or create a new one.

Note: In the email template, you will need to use your variables and make sure they work properly.

Here's an example of how the event syntax looks:

cart_details:
{“sku”=>“test122121",
“url”=>“https://www.test.co/products/test”,
“name”=>“Pre & Post Swim Eye Gel - Pack Of Two”,
“brand”=>“TRIHARD”,
“price”=>20.99,
“category”=>“test test”,
“image_url”=>“https://cdn.test.com/s/test.png”,
“product_id”=>6707270811734,
“compare_at_price”=>0}

Note: Don't use <a href="##{{ event.url }}"> or anything similar, as it may cause the email not to be sent or to be blocked.

5. Click Save and go back to Channels > Triggered Email. Search for Add to Cart Reclaim, and toggle to Activate the email.

Set up segment

  1. Go to Contacts > Segments > Create Segment.

2. Choose Standard Segment.

3. Select Contact, Email behavior, Geo, Smart Insight segment.

4. Name the segment Add to Cart Reclaim. Under Filter Conditions > Contact criteria, set these:
Opt-in > Equal > True

5. Click Save & Apply.

Set up automation

1. To create the automation, go to Automation > Automation Programs > Create Program.

2. Select Behavior-focused journeys (Interactions).

3. Click External Event.

4. Double click External Event.

5. From the Trigger Event drop-down menu, choose Add to Cart Reclaim. Then, click Done.

6. Under Channels, click Send email. Once it appears, double click Send email.

7. Choose the Mail stream created previously called Add to Cart Reclaim. Then, click Done.

8. Under Nodes, select Decision and then double click it when it appears in the flow.

9. Keep the Type as Included in segment, and choose Add to Cart Reclaim from the Segment drop-down. Click Done.

10. Connect the Nodes in this order:

Like this:

11. Give the automation a name (ex. Retention Automation Reclaim), and click Save.

Note: If you modify anything, you must deactivate the automation and email that was created, make the necessary changes, and then reactivate them.

Did this answer your question?