Skip to main content
All CollectionsIntegrationsBloomReach
Set up Reclaim for Add to Cart and Viewed Product in Bloomreach
Set up Reclaim for Add to Cart and Viewed Product in Bloomreach
Updated over 10 months ago

This feature can identify abandoned cart and browse abandonment 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 and Viewed Product 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 Bloomreach 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.


Install Add to Cart and Viewed Product scripts

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

Add to Cart

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 below snippet based on the Button on your site.

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>

Viewed Product

Inside of your site builder, add our Viewed Product script to fire when someone views a product:

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

The Retention Reclaim scripts require an "item" parameter. This parameter is meant to be an object with relevant information for the product that is being sent in the event.

If you do not have an existing Product tracking script, add the following code to your theme:

<script type="text/javascript">
var item = {
Name: ##{{ product.title|json }},
ProductID: ##{{ product.id|json }},
ImageURL: "https:##{{ product.featured_image.src }}",
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>

Exponea Segment considerations

If you are using the Exponea segment, you will need to append a cookie to the product tracking script. By adding the cookie to the Reclaim payload, the cookie will automatically be used as the customer_ids for the event.

If no cookie is appended to the payload, we will default to ​using the email as identifier for the events.

Please see the example below:

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


Set up flows

Once you have the Add to Cart and/or Viewed Product scripts added to your site, you will need to set up flows for each in Bloomreach.

1. Request a Test Event from your client success manager.

2. In Bloomreach, go to Campaigns > Scenarios.

3. Search for your existing Abandoned Cart and/or Browse Abandonment scenarios (depending on which one you're setting up), and click on it.

4. Select All of the existing flow, and Copy.

5. Paste it below the original. Double click the "On Event" trigger in the pasted flow.

6. In the event drop-down, choose Add To Cart Reclaim and click Done for the Add to Cart flow.

For your browse abandonment flow, choose Viewed Product Reclaim and click Done.

7. Add a Condition. Click 'N' to set: Select customers not matching funnel.

Then, use this criteria to exclude contacts already in your Abandoned Cart flow, and click Done.

campaign > campaign_id > equals > [Abandoned Cart campaign ID]
AND action_type > equals > email
AND status > equals > enqueued

For your Viewed Product flow, use this criteria to exclude contacts already in your browse abandonment flow, and click Done.

campaign > campaign_id > equals > [Browse Abandonment campaign ID]
AND action_type > equals > email
AND status > equals > enqueued

8. Update the existing Wait time in the flow to be longer than the current one. For example, if your current flow has a 30-minute wait time, increase it to 45 minutes. Click Done.

9. Add a Condition to exclude contacts who have made a purchase (if one doesn't already exist in the flow). Click 'N' to Select customers not matching funnel. Then, choose purchase as the step. Set the Funnel completion period for Last 7-14 days (the number of days will depend on how often your customers make purchases). Click Done.

10. Add (or edit the existing) Email to the flow. When you're finished, connect all of the triggers/actions/operators in the flow by dragging a line from one circle to the next.

11. When you're finished, click Save or Start in the right-hand corner.


See Add to Cart and Viewed Product events

Once everything is properly set up, Add to Cart Reclaim and Viewed Product Reclaim events will appear in Bloomreach.

1. Go to Data & Assets. Paste the customer's email address in the search bar.

2. Click on the customer's details.

3. You will see the event details in the Events section for Add to Cart Reclaim and Viewed Product Reclaim.

4. You can also see 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.

You can also see the Viewed Product Reclaim option populate under Event Details.

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

Did this answer your question?