ISTrends

Marketing Cloud Personalization Trends (ISTrends) uses the power of social validation to increase conversions. Most consumers are overwhelmed by the product choices available to them and can find it challenging to confidently buy products online. Leverage the “wisdom of the crowd” to influence visitors on your site in real time and build confidence in products viewed by using view and purchase counters. These view and purchase counters drive both validation and urgency ultimately influencing conversions on your site.

By enabling this feature, you are allowing Personalization to return catalog object purchase and view data via a public API.

What does the API do?

Given one or more catalog object IDs and a number of lookback minutes, the ISTrends API is designed to return the number of views and recent purchases for those catalog object IDs within that lookback period.

How is the API called?

Requests to the ISTrends API can be made to URL endpoints that adhere to the following basic structure.

For your API requests to work correctly, your request URLs need to include your Personalization account name and instance identifier.

The following table lists the required and optional request URL parameters included in the preceding example.

Request URL Parameters

URL ParameterRequired?Description
accountNameYesYour Personalization account name. You can retrieve it by accessing Gears from the Personalization UI and reviewing the URL. For example, if your Gears URL is demo.us-1.evergage.com, then your account name is demo.
instanceYesYour Personalization instance identifier. You can retrieve it by accessing Gears from the Personalization UI and reviewing the URL. For example, if your Gears URL is demo.us-1.evergage.com, then your instance identifier is us-1.
datasetYesThe name/identifier of the Personalization dataset you are sending data to.
itemIds: stringYesProvide either a singular item ID or a comma-separated list of item IDs.
lookbackMins: integerNoAn integer representing the number of minutes to be used for a lookback period. This value cannot exceed 2880 minutes (2 days).

Example Requests

Given parameters:

  • Single ID: https://example.us-1.evergage.com/api/dataset/engage/social/smartTrends/Product?itemIds=4100323&lookbackMins=120
  • Multiple IDs: https://example.us-1.evergage.com/api/dataset/engage/social/smartTrends/Product?itemIds=1010263,1050855,1031064,1050946&lookbackMins=120

What data can it return?

Returns an object with keys representing the itemID(s). The value for these keys each have an object containing stats for visitViews and purchases within the lookback period provided in the request.

The stat values in the response reflect the stats that have been tracked against only the specific catalog objects within the lookback period, meaning that the stat values do not account for views and/or purchases of the catalog object through a relationship to another catalog object. For instance, if a purchase is tracked for Product X and Category Y is related to it, a request to the ISTrends API with the itemId for Category Y results in a response with 0 purchases.

With the preceding note in mind, it is expected that the value for purchases is only greater than 0 when sending itemIds for the Product catalog object.

Example Responses

  • Single ID: {"4100323":{"visitViews":1,"purchases":0}}
  • Multiple IDs: {"1050946":{"visitViews":0,"purchases":0},"1010263":{"visitViews":0,"purchases":0},"1050855":{"visitViews":0,"purchases":0},"1031064":{"visitViews":0,"purchases":0}}

Use one of the following links to download a ZIP file containing the sample ISTrends template for your SDK namespace.

While the default configuration of the example template is for Products, you can use it with other catalog types by making the following changes.

  1. Change the value of settings.id to reference the desired Catalog Object type.
  2. Change the URL string returned by settings.url to reference the desired Catalog Object type.

For example, if you are customizing this template for Articles, you would make the following changes to the properties in settings.

  • SalesforceInteractions namespace

  • Evergage namespace

Full Sample Template Code

Handlebars code

CSS

Client-side JavaScript

  • SalesforceInteractions namespace

  • Evergage namespace

Server-side TypeScript