- Deliver 1-1 personalization to customers with Dynamic Customer Profiles
- Display content attributes directly in a customer's browser
With dynamic customer profiles (DCP), you can directly expose content attributes in the browser to deliver 1-1 personalization to your customers.
Attributes describe what you know about your individual customers: their favorite products, lifetime value scores, loyalty memberships, and other information. In general, attributes help you create tightly tailored experiences for every known customer who comes to your site with DCP.
Content attributes are the attributes that you mark Content-enabled in DCP. These attributes values can be displayed in the browsers of customers who visit your site.
Imagine that you'd like to use your customers' membership levels to personalize a greeting on the landing page. By enabling the "membership level" attribute, you can create messages like: "Welcome, gold level member!" The “membership level” greeting would change according to the visitor’s membership level.
Content attributes allow you deliver personalized messages based on what you know about an individual customer.
Dynamic customer profiles are available with the Web Enterprise package in Optimizely X. To learn more, check out Optimizely personalization.
You can also read more about DCP on the Optimizely blog.
Remember, your terms of service prohibit you from collecting or sending any personally identifiable information (such as names, social security numbers, email addresses, or any similar data) to Optimizely's services or systems through Dynamic Customer Profiles or any other feature.
Please read the article on PII to learn more about sending data to Optimizely and handling personally identifiable information.
1. Set up DCP
To begin, set up dynamic customer profiles in Optimizely.
2. Enable content attributes
The next step is to mark the attributes you'd like to display as Content-enabled in the Add Attributes dialog.
Navigate to Audiences > Attributes and click the actions icon () for the table that contains the attributes you want to edit, and select Edit Attributes from the drop-down menu.
Check Content-enabled next to any attribute that you'd like to display in the customer's browser. Below, we've made the “membershipLevel” value available for display in the browser.
3. Set the JavaScript API
Provide your developer with the following Javascript API:
optimizely.get('dcp').getAttributeValue({datasourceId: 012345678910, attributeName: 'membershipLevel'})
You’ll also want to give your developer the data source ID and the attribute name.
In the example above, the data source ID is 012345678910. The attribute name is “membership level”. See our developer documentation to learn more.
4. Create a Campaign
Next, create a campaign.
Make sure to include an audience that uses a condition which references at least one table attribute. This ensures that the Optimizely snippet will make a targeting request whose response will include the values of all content-enabled attributes. If no such audience conditions exist, the Optimizely snippet will not make any targeting requests, and therefore content-enabled attributes will never be returned to the browser.
5. Expose the content attribute
Create your 1-1 personalized experience by exposing the content attribute to visitors.
Navigate to the custom code box in the experience that you’re creating.
In the custom code box, use the JavaScript API from step 2 to display the attribute you want your customer to see. The datasourceID
value and the attributeName
value are the same values you provided to your developer in Step 2.
Here's what the code might look like in the custom code box:
Because the content attribute you display might not be available for all visitors to your site, add the following code to create a default experience:
optimizely.get('dcp').getAttributeValue({datasourceId: 123, attributeName: 'Attribute Name'}) || default_value
Pick a default_value
that can replace the content attribute for a generic experience. In the example below, the platinum level value is also the default value. The code would then be:
optimizely.get('dcp').getAttributeValue({datasourceId: 012345678910, attributeName: 'membershipLevel'}) || 'bronze'
Not all visitors to the site have a membership level to display. So, instead of saying “Welcome, platinum level member!” the default experience might be designed to say: “Welcome!”
6. QA and publish
QA your campaign. Then publish it live to the world!