- Deliver 1-to-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 let you deliver personalized messages based on what you know about an individual customer.
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 Web Experimentation's services or systems through Dynamic Customer Profiles or any other feature.
See the article on PII to learn more about sending data to Optimizely Web Experimentation and handling personally identifiable information.
Set up DCP
Set up dynamic customer profiles in Optimizely Web Experimentation.
Enable content attributes
The next step is to mark the attributes you want to display as Content-enabled in the Add Attributes view.
Go 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 want to display in the customer's browser. The following image shows the “membershipLevel” value available for display in the browser.
Set the JavaScript API
Provide your developer with the following JavaScript API:
optimizely.get('dcp').getAttributeValue({datasourceId: 012345678910, attributeName: 'membershipLevel'})
You also want to give your developer the data source ID and the attribute name. In the following example, the data source ID is 012345678910. The attribute name is “membership level”. See our developer documentation to learn more.
Create a Campaign
See Six steps to create a campaign in Optimizely Web Personalization.
Make sure to include an audience that uses a condition that references at least one table attribute. This ensures that the Optimizely Web Experimentation 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 Web Experimentation snippet will not make any targeting requests, and therefore content-enabled attributes will never be returned to the browser.
Expose the content attribute
Create your 1-to-1 personalized experience by exposing the content attribute to visitors.
Go to the custom code box in the experience that you created.
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 Enable content attributes.
The code might look similar to the following 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 following example, 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!”
Test and publish
Test your campaign. Then publish it live to the world.