Target known visitors with Dynamic Customer Profiles

  • Updated
  • Optimizely Web Experimentation
  • Optimizely Performance Edge

With dynamic customer profiles (DCP), you can directly expose content attributes in the browser to deliver 1-on-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. Content attributes let you deliver personalized messages based on what you know about an individual customer.

For example, if you want to use your customers' membership levels to personalize a greeting on the landing page, you can enable the membership level attribute to create a messages such as "Welcome, gold-level member!" The membership level greeting changes according to the visitor’s membership level.

Dynamic customer profiles are available with the Optimizely Web Experimentation Scale package. To learn more, see Optimizely Personalization. You can also read more about DCP on the Optimizely blog.

The Experimentation terms of service prohibit you from sending any personally identifiable information (PII) such as names, social security numbers, email addresses, or any similar data to the Experimentation system through list attributes or other features.

Set up DCP

Set up dynamic customer profiles in Optimizely Web Experimentation.

Enable content attributes

Mark the attributes you want to display as Content-enabled in the Add Attributes view.

Go to Audiences > Attributes and open the actions menu (...) 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”. 


Create a campaign

See 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.

Click Variation Code Editor to open 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.  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 your campaign. Then publish it live to the world.