Relevance by Segment Integration Overview - Bloomreach Experience - Open Source CMS

Relevance by Segment Integration Overview

Relevance by Segment integration requires you to send the segment name and segment value through the pixel and API.

A segment is a way to group users on one or more defining properties (dimensions), such as country or occupation. Each segment will have an associated value. For example, you could have a segment named “country” with a value of “Australia”, or a segment named “customer tier” with a value of “Platinum”. To learn more about this feature, go to the Relevance by Segment Page.
Note on caching:
Bloomreach recommends you to turn off caching completely to ensure accurate results. If caching cannot be turned off all the way, we suggest caching results at a per query-segment level.

Pixel

Add pixel parameters containing segment name and values to capture analytics for those segments. Segment information must be added to all pixel event types. Currently, the following segments are supported:

Segment name

Description

Sample values

customer_tier

Tier that the user belongs to.

Premium

Gold

Base

customer_country

Country that the user belongs to or is accessing the site from.

US

Australia

customer_geo

Geography or Region that the user belongs to.

Florida

Asia

customer_profile

Profile of the user.

Healthcare

Cleaning

Using an existing pixel parameter as a segment
In addition to the above segments, you may also use any existing pixel parameter, such as view_id, user_id, etc., as a segment. If you choose an existing pixel parameter as a segment, then additional pixel integration is not required. 

Defining Segments

Add your segment parameter in the following format: 

br_data.<segment_name> = “<value>”

Where <segment_name> is the name of the segment, and <value> is a string containing the segment value.

The value string may only contain alphanumeric characters (a-z, A-Z, 0-9), hyphens (“-”), or underscores (“_”). It is case sensitive.

A segment can have up to 5000 unique values, though we don’t recommend using a segment with so many values since it can thin out the data used for ranking. If you do have a use case for using more than 5000 unique value, please consult a member of the Bloomreach team.

Example Segment

For a segment named customer_tier with a value of premium, the pixel parameter is:

br_data.customer_tier = "premium"

API

In your brSM Search/Category API calls, add a new parameter, segment, to specify the segment name and value that you want to use for Relevance by Segment. 

&segment=<segment_name>:<value>

If you are using an existing pixel parameter as a segment, such as view_id, user_id, etc., then use it as the segment_name. For example, segment=view_id:AU.

Sample API Request - Product Search

GET http://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach provided account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8438674018839
&_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55
&ref_url=http://www.example.com/home
&url=http://www.example.com/index.html?q=dresses
&request_type=search
&search_type=keyword
&q=dresses
&fl=pid,title,brand,price,sale_price,thumb_image,url,description
&rows=10
&start=0
&segment=customer_geo:NorthAmerica //Segment parameter with name "customer_geo" and value "NorthAmerica"

Sample API Request - Category Search

GET http://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach Provided Account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8830241055597
&_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55
&ref_url=http://www.example.com/home
&url=http://www.example.com/index.html?q=cat000922
&request_type=search
&rows=20
&start=0
&fl=pid,title,brand,price,sale_price,colors,sizes,thumb_image,price_range,sale_price_range
&q=cat000922
&search_type=category
&segment=view_id:AU //Using an existing pixel parameter as the segment   

Sample API Request - Content Search

GET http://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach Provided Account ID>
&auth_key=jazzhands
&domain_key=example_com
&request_id=8830241055597
&catalog_name=content_na_en
&_br_uid_2=uid=7797686432023:v=11.5:ts=1428617911187:hc=55
&ref_url=http://www.example.com/home
&url=http://www.example.com/index.html?q=cat000922
&request_type=search
&rows=20
&start=0
&fl=pid,title,brand,price,sale_price,colors,sizes,thumb_image,price_range,sale_price_range
&q=cat000922
&search_type=keyword
&segment=customer_geo:NorthAmerica //Segment parameter with name "customer_geo" and value "NorthAmerica"  
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?