Expand my Community achievements bar.

SOLVED

Create audience based on cart contents

Avatar

Level 2

I'm looking to create an audience based on a customer's cart contents. The cart contents are stored in the adobeDataLayer and also in local storage. How can I create an audience using this data? I'm using at.js 2.10.0.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @deakin96

This is a great use case. Any data you have on the page or in a cookie you can send to Target for creating an audience that Target uses then or later for that visitor to decision experiences and activities off of. Here's one way to capture cart info from local storage and send to Target.

  1. Before your at.js inclusion to the page, grab the cart info from local storage or a datalayer.
  2. Use the targetPageParams() function to define key and value pairs to capture the cart information. For cart info you probably want to send them as profile parameters so they will persist with the visitor from page to page.
  3. The attributes you send to Target will need to be formatted as strings or numbers so if you are trying to capture a list of product IDs in a cart you might just send them as a delimited string ",prod1,prod2,prod3,". I'd use a leading and trailing delimiter and then in the audience rule you can use the "contains" evaluator to key off of a specific product id.
  4. Create the Target audience rule using the "visitor profile" dimension, presuming you named the profile attribute "cartProductList" an audience rule might look like this:
    1. E.g., cartProductList contains ",prod3,"

Hope that helps!

-Ryan

View solution in original post

2 Replies

Avatar

Community Advisor

Hi @deakin96 

 

As per my understanding, for your use case Adobe Target stand alone would not be sufficient to generate audience based on cart content. Adobe Target provide a way to create the audience but mostly it's very basic and it's based on geolocation, OS, Page etc. You can try generating some Audience based on Profile script but it would be tough to implement.

 

You would either need Audience Manager or Adobe Experience Platform/ RTCDP segments to generate the Audience based on your cart. These segments would be passed back to Adobe Target to generate the audience to run any kind of targeting activity.

Avatar

Correct answer by
Employee Advisor

Hi @deakin96

This is a great use case. Any data you have on the page or in a cookie you can send to Target for creating an audience that Target uses then or later for that visitor to decision experiences and activities off of. Here's one way to capture cart info from local storage and send to Target.

  1. Before your at.js inclusion to the page, grab the cart info from local storage or a datalayer.
  2. Use the targetPageParams() function to define key and value pairs to capture the cart information. For cart info you probably want to send them as profile parameters so they will persist with the visitor from page to page.
  3. The attributes you send to Target will need to be formatted as strings or numbers so if you are trying to capture a list of product IDs in a cart you might just send them as a delimited string ",prod1,prod2,prod3,". I'd use a leading and trailing delimiter and then in the audience rule you can use the "contains" evaluator to key off of a specific product id.
  4. Create the Target audience rule using the "visitor profile" dimension, presuming you named the profile attribute "cartProductList" an audience rule might look like this:
    1. E.g., cartProductList contains ",prod3,"

Hope that helps!

-Ryan