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. 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 a Cordial integration.
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">
document.getElementsByClassName("AddToCart").addEventListener('click',function (){
geq.addToCart(item)
});</script>
Once you have the Add to Cart script added to your site, you will need to set up your HTML content and flows in Cordial.
1. Go to Content > HTML Content. Search for your current cart content. Then, click the drop-down next to its name, and click Copy.
2. Name the copy Add to Cart Reclaim, set the key as reclaim-add-to-cart, and click Continue.
3. Find your existing Add to Cart event name (ex. 'cart-add'):
4. Replace that code with the name 'Add to Cart Reclaim' and Save.
5. Go to Message Automation > Podium Orchestrations and then search for your existing cart abandonment flow. Next, click the drop-down next to it > Duplicate.
6. Click Trigger.
7. Choose Add to Cart Reclaim from the trigger drop-down list, and click Continue.
8. Save Draft, and then click Delay.
9. Add 15 minutes to your current delay. For example, if your current Add to Cart flow delay is 30 minutes, change it to 45 minutes. Then, click Continue.
10. Next, go to Filter > Edit Audience.
11. Leave the existing filter criteria, and add this rule:
System Events > Email > Sent > By automation
By message name > [Name of the first cart abandonment email]
Recency > Within the past > 7 > days
Note: This 'recency' is a general guideline that can be adjusted to best fit your marketing efforts.
12. Repeat above until all of the emails in your original cart flow have been added to the logic for ALL Actions/Emails in the entire flow.
13. Once that's set up, click Continue. Then, click Continue again.
1. From the flow chart, click Action > Edit.
2. Click the Block Name that contains your Add to Cart content, and click Message Markup.
3. Search for '{include 'content:' to find the Add to Cart content:
4. Replace the existing code after '{include 'content:' with the key you created earlier:
reclaim-add-to-cart
5. So, that will look like this:
Once everything is properly set up, Add to Cart Reclaim events will appear in Analytics > Event Data Reports in Cordial.
Note: Your client success manager can send test events through for you when you're ready.
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.
Have questions? Message us on chat or email us at support[at]retention.com!
Reclaim can identify product views for both unknown, non-logged in users (Grow contacts) and known, non-logged in customers (emails in your suppression list).
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 first ensure that you’re using the most recent version of our script on your website. The base script must fire before the Product Views script. You can find your script in your Retention.com 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.
There are two options for updating your Viewed Product events for Reclaim if you aren’t using our custom Shopify Integration app:
1. Locate your Viewed Product tracking snippet (if one is already installed). The Viewed Product tracking snippet that you need to locate looks like this:
_learnq.push(['track', 'Viewed Product', item]);
Here’s an example of the full snippet with an item’s image URL, price, etc:
{% if product %} <script type="text/javascript"> var _learnq = _learnq || []; var item = { "ProductName": "The Wonderful Wizard of Oz", "ProductID": "1111", "SKU": "WIZARDOFOZ", "Categories": ["Fiction", "Children"], "ImageURL": "http://www.example.com/path/to/product/image.png", "URL": "http://www.example.com/path/to/product", "Brand": "Kids Books", "Price": 9.99, "CompareAtPrice": 14.99 }; _learnq.push(["track", "Viewed Product", item]); </script> {% endif %}
Note: If you do not have a Viewed Product tracking snippet installed, skip to Step 3 below.
2. Add the following script to the your existing Viewed Product tracking snippet:
<script>geq.event('Viewed Product Reclaim', item);</script>
So the whole thing should look like this (we’ve not included the additional details for price, image URL, etc here):
_learnq.push(['track', 'Viewed Product', item]); geq.event('Viewed Product Reclaim', item);
3. 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>
Once this script update has been implemented properly and you've set up your flows, and the event is triggered, you will see this new metric populate in your ESP.
You can integrate your Retention.com account directly with Attentive.
**This integration is specifically built to be used with our Reclaim product. It does not work for our Grow product.**
1. Click on Integrations from the left navigation panel in Retention.com. Then, click Available Integrations at the top and choose the Attentive icon.
2. Enter your Attentive API Key.
To create an API Key in Attentive you will need to Create a custom app.
In Attentive:
Click Create and copy your API key - make sure you save it somewhere!
3. Click Connect.
4. Enable the integration.
The below steps can be set up by Attentive's whiteglove team. We will contact them on your behalf to request that they set this up for you.
This feature can identify category views for both unknown, non-logged in users (Grow contacts) and known, non-logged in customers (emails in your suppression list).
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 first ensure that you’re using the most recent version of our script on your website. The base script must fire before the Category Views script. You can find your script in your Retention.com 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 Category Views script will automatically be installed. For those not using this app, view the "On your website" section at the bottom.
Once our custom Shopify Integration app is set up and we have enabled this feature, it's time to create or clone your Viewed Category Flow in Klaviyo.
4. Now, add your Viewed Category abandonment emails.
There are two options for updating your Viewed Product events for Reclaim:
1. Locate your Category tracking snippet from Klaviyo. If you are using Shopify, this should be located in the liquid template for the category page(s). The Viewed Category tracking snippet that you need to locate should look something like this:
_learnq.push(['track', 'Viewed Category', categoryItem]);
Note: If you do not have a Viewed Category tracking snippet installed, skip to Step 3 below.
Here’s an example of what a full snippet with category data might look like if there's an existing Viewed Category Tracking Script:
<script type="text/javascript"> var _learnq = _learnq || []; var categoryInfo = { "CategoryName": "Puzzles", "CategoryURL": "http://www.example.com/category", }; _learnq.push(["track", "Viewed Category", categoryItem]); </script>
2. Add the following script to the your existing Viewed Category tracking snippet in Klaviyo:
<script>geq.event("Viewed Category Reclaim', categoryItem);</script>
So the whole thing should look like this if you have an existing Viewed Category tracking script (we’ve not included the additional details for price, image URL, etc here):
_learnq.push(['track', 'Viewed Category', categoryItem]); geq.event('Viewed Category Reclaim', categoryItem);
3. If you do not have an existing Viewed Category tracking script, add this script to the theme:
{% if product %}
<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 Category Reclaim', categoryItem);
</script>
{% endif %}
Once this script update has been implemented properly, and the event is triggered, you will see this new metric populate in Klaviyo.
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 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.
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:
Here are an examples if you're adding the script to Klaviyo:
Snippet 1: For buttons without redirects
You should update your script from this:
<script type="text/javascript">
var _learnq = _learnq || [];
function addedToCart() {
fetch(window.location.origin + '/cart.js')
.then(res => res.clone().json().then(data => {
var cart = {
total_price: data.total_price/100,
$value: data.total_price/100,
total_discount: data.total_discount,
original_total_price: data.original_total_price/100,
items: data.items
}
if (item !== 'undefined') {
cart = Object.assign(cart, item)
}
_learnq.push(['track', 'Added to Cart', cart])
}))
}
(function (ns, fetch) {
ns.fetch = function() {
const response = fetch.apply(this, arguments);
response.then(res => {
if ((window.location.origin + '/cart/add.js').includes(res.url)) {
addedToCart()
}
});
return response
}
}(window, window.fetch))
$(document).ajaxComplete(function(event, request, settings){
if((typeof settings != "undefined") && settings.url == "/cart/add.js"){
addedToCart()
}
})
</script>
to this:
<script type="text/javascript">
var _learnq = _learnq || [];
function addedToCart() {
fetch(window.location.origin + '/cart.js')
.then(res => res.clone().json().then(data => {
var cart = {
total_price: data.total_price/100,
$value: data.total_price/100,
total_discount: data.total_discount,
original_total_price: data.original_total_price/100,
items: data.items
}
if (item !== 'undefined') {
cart = Object.assign(cart, item)
}
_learnq.push(['track', 'Added to Cart', cart])
geq.addToCart(item);
}))
}
(function (ns, fetch) {
ns.fetch = function() {
const response = fetch.apply(this, arguments);
response.then(res => {
if ((window.location.origin + '/cart/add.js').includes(res.url)) {
addedToCart()
}
});
return response
}
}(window, window.fetch))
$(document).ajaxComplete(function(event, request, settings){
if((typeof settings != "undefined") && settings.url == "/cart/add.js"){
addedToCart()
}
})
</script>
Snippet 2: For buttons with redirects defined by a button ID
You should update your script from this:
<script type="text/javascript">
var _learnq = _learnq || [];
document.getElementById("AddToCart").addEventListener('click',function (){
_learnq.push(['track', 'Added to Cart', item]);
});</script>
to this:
<script type="text/javascript">
var _learnq = _learnq || [];
document.getElementById("AddToCart").addEventListener('click',function (){
_learnq.push(['track', 'Added to Cart', item]);
geq.addToCart(item);
});</script>
Snippet 3: For buttons with redirects defined by class notation
You should update your script from this:
<script type="text/javascript">
var _learnq = _learnq || [];
var classname = document.getElementsByClassName("add-to-cart");
var addToCart = function() {
_learnq.push(['track', 'Added to Cart', item]);
}; for (var i = 0; i < classname.length; i++) {
classname[i].addEventListener('click', addToCart, false);
}
</script>
to this:
<script type="text/javascript"> var _learnq = _learnq || []; var classname = document.getElementsByClassName("add-to-cart"); var addToCart = function() { _learnq.push(['track', 'Added to Cart', item]);
geq.addToCart(item); }; for (var i = 0; i < classname.length; i++) { classname[i].addEventListener('click', addToCart, false); } </script>
If you're using our custom Shopify Integration app with Klaviyo, you will see our additional unique identifier: CartSource: GE, as seen below in a contact profile in Klaviyo:
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:
Copy your existing Add to Cart abandonment flow in Klaviyo (not Abandoned checkout or Product/browse abandonment!) and name it Reclaim Add to Cart.
Edit the Trigger Filter to include Dimension where CartSource> Equals > GE and Save. If you're creating a new flow from scratch, use the Added to Cart event and use the same Trigger Filter specified in the previous sentence.
If you don't already have them, you should also add flow filters to exclude anyone who has Started Checkout or Placed Order (ie, what someone has/has not done > placed order > 0 times) before landing in this flow, eg:
Add a 30-minute delay after the Trigger.
Modify your original abandoned cart flow to exclude any contacts with CartSource equals GE. This will be a Trigger Filter where the Dimension should be set to CartSource is not set:
Contact us at support[at]retention.com and request that we enable Add to Cart events for your account. If you're working with our onboarding team, this will already be enabled.