How It Works

Find out how our solution helps you turn browsers into buyers.

Integrations

From Shopify to Klaviyo, explore over 80 integrations.

Support

Access guides, troubleshooting, and expert assistance.

About Us

Hear our origin story and meet our team.

Partnership

Become an official Retention.com Partner.

Affiliate Program

Learn more about our Affiliate Program.

Careers

Explore career opportunities with Retention.com.

Events

See upcoming events we’re hosting or attending.

Referrals

Got a referral? Let us know here.

Product Support

privacy-red-circle

Create Add to Cart and Viewed Product events for Sendlane

Using Reclaim Add to Cart Feature

The Reclaim feature can identify abandoned cart and viewed product 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 and/or Viewed Product events to 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.

Set up Add to Cart script

1. In your site builder, add the Add to Cart script— 'geq.addToCart(item)' —to the on-click event for adding an item to your cart, such as an "Add to Cart" button. Below is the generic code for buttons.

Remember: The name of the button should match what is in quotes below ( "AddToCart" ) to fire properly. So, if your button isn't "AddToCart", you'll need to update that in the script provided below.

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">
document.getElementsByClassName("AddToCart").addEventListener('click',function (){
geq.addToCart(item)
});</script>

Set up Viewed Product script

If you have an existing Viewed Product tracking script installed on your site, add this below it:

<script>geq.event('Viewed Product Reclaim', item);</script>

If you do not have an existing Viewed Product tracking script, add this to your theme:

<script type="text/javascript">
var item = {
Name: {{ product.title|json }},
ProductID: {{ product.id|json }},
ImageURL: "https:{{ product.featured_image.src|img_url:'grande' }}",
URL: "{{ shop.secure_url }}{{ product.url }}",
Brand: {{ product.vendor|json }},
Price: {{ product.price|money|json }},
CompareAtPrice: {{ product.compare_at_price_max|money|json }}
};
geq.event('Viewed Product Reclaim', item);
</script>

Setup Sendlane integration

If you don't already have a Sendlane V2 integration setup in Retention.com, follow the steps in this tutorial. If you do have a Sendlane V2 integration setup, you will need to add the Custom Integration Token inside your Integration Settings. (Reference the tutorial for how to find the custom integration token in Sendlane.)

Create flows in Sendlane

1. Once your existing snippet is modified/edited to include our script and the Sendlane V2 integration is setup, you will see our custom events in Sendlane by going to Integrations > Events.

2. That will show you the Custom Events for Add to Cart Reclaim and/or Viewed Product Reclaim.

3. Additionally, you can see these events successfully passing through in your Retention.com account when you see the Added to Cart option populate under Event Details. This is an easy way to confirm that our events have been successfully implemented:

Contact us at support[at]retention.com and request that we enable Add to Cart and Viewed Product events for your account. If you're working with our onboarding team, this will already be enabled.

chevron-down