Skip to main content


Optimizely Knowledge Base

Integrate Optimizely with Salesforce: Install the Data and Attribution app

  • Install and authenticate the Optimizely Data and Attribution for Salesforce app

The Optimizely Data and Attribution for Salesforce app (DNA) enables you to track down-funnel metrics and conversions by associating a user’s online experience to a specific lead or contact, and to send events between Salesforce and Optimizely.

Salesforce users can use DNA to see the experiment history—that is, a combination of visitor IDs and experiments, as well as the specific variations within that experiment—of a lead or contact to understand how that visitor experienced your site. For example, your sales or support team could see if a customer was offered a coupon or exposed to a different service experience as part of an experiment.

You can also use DNA to measure the impact of an experiment on valuable, down-funnel events by tracking Salesforce events associated with an Optimizely experiment. For example, instead of using an experiment to drive more leads, you can use it to drive more qualified leads or new opportunity creation.

experiment history top level view.png

This article describes the installation and authentication steps in the process of getting the DNA app up and running. Once you've completed these, you'll need to configure the app before it will run.

Install the DNA app

First, please invite your Salesforce account Admin to your Optimizely account with Optimizely Admin privilege before getting started following this user collaboration guide. Your Salesforce admin can complete installation once they have accepted the Optimizely admin collaborator invitation and can successfully log in to your team's account at

Below is a draft email you can share with your Salesforce admin to complete installation:

Email Subject: Please Help Install Salesforce App

Email Body:

Hi [SFDC Admin],

We’re using a digital experimentation platform called Optimizely, and we’d like to install their Salesforce app to enable data syncing and advanced experimentation. Can you help install it in our Sandbox environment this week? It should take less than 30 minutes.

You'll first need to join our Optimizely account. We'll share an email invite with you shortly. Once you accept the invite and are able to log in to, please install the Optimizely Data and Attribution App following these instructions.

If you have any questions along the way, you can file a support ticket here, or let me know, and I'll reach out to our customer support contact. We really appreciate your help.

There are additional configuration steps to complete after finishing installation. Your Salesforce Admin should familiarize themselves with the configuration steps when installing the app into your Salesforce Sandbox environment, but your Admin does not need to complete the configuration steps until your admin installs the app in your Salesforce Production environment. 

Installation Steps

If you have any questions along the way, please contact your Optimizely support contact or file a support ticket.

The DNA app requires the Salesforce Enterprise, Unlimited, or Performance edition, as well as either the Salesforce Sales or Service Cloud product. Additionally, you will need to use the Lightning interface and support Lightning apps.

  1. Log in to Optimizely.

  2. Log in to your Salesforce Sandbox environment, visit Salesforce AppExchange and install the app. We recommend installing the app in your Sandbox environment before production. 

If you find yourself in a loop where Salesforce asks you to login, install, login, install then try opening a new browser (e.g. if you normally use Chrome, open Firefox) to proceed with installation. Alternately, try clearing your cache, opening an incognito window, and then installing. 

  1. Select the group of users you want to have access to the installation. We recommend installing for admins only at this point.


  1. Click Install.

This part of installation usually takes about ten minutes. You’ll receive a notification email when the process is complete.

Assign Optimizely App Permission to Salesforce Admins

Your Salesforce Admin will now need to grant themselves (and optionally other Admins) "Optimizely App Admin" permission. Completing this step ensures that the Optimizely app will be accessible for the Salesforce Admin to configure.

  1. Open Salesforce Setup

  2. Search for and click “Permission Set”

  3. Scroll to the Optimizely permissions, then click the “Optimizely App Admin” permission

  4. Click the “Manage Assignments” button

  5. Select which Admins should have access, then click “Add Assignments”

You can confirm that the permissions have been assigned by clicking on a given User’s record — you should see the "Optimizely App Admin" permission under “Permission Set Assignments”

Authenticate the DNA app

Once the app is installed, follow these steps to authenticate the DNA app.

Collect authentication details

  1. Find the Optimizely app in the Salesforce App Launcher.

  1. In the Instructions tab that appears after you select the Optimizely app, click Get Started or Next to begin.

The Authentications tab is where you will connect to your Optimizely instance. This is a critical part of the authentication process. But before that can happen, you will need to collect three authentication details from within Optimizely itself: account ID, client ID, and client secret. You must be an Optimizely account admin to collect this information.

authentication view - install.png

  1. To collect the account ID, click Account Settings in the bottom-left corner of Optimizely. Then click the Plan tab. Finally, copy the account ID number and paste it into the Account ID field in the Salesforce Authentication tab.

  2. To create a client ID and client secret, you’ll have to register a new app in Optimizely’s platform:

    1. Click Account Settings in the bottom-left corner of Optimizely.

    2. Click the Registered Apps tab.

    3. Click the Register New Application… button. The Application Settings modal will appear.



  1. Type in a name for the application (e.g. Sandbox Salesforce App).

  2. In your Salesforce Authentication tab, click the copy icon next to the Salesforce Redirect URI.

  3. In Optimizely’s app registration view, paste the URI into the Redirect URI field.

  1. Under Client Type, click Confidential.

  2. Click Apply to apply these settings.

  3. In Optimizely’s Registered Apps tab, click the clipboard icon next to Client ID to copy it to the clipboard. Then paste the client ID into the Client ID field in Salesforce’s authentication window. Repeat this process for client secret.

  4. Ensure you are still logged in to Optimizely in another browser tab.

  5. In the Salesforce Authentication tab, click the Connect to Optimizely button.

  6. When asked to connect with your Optimizely account, click Accept.

  7. You’ll be returned to the Authentication tab. Click Next in the bottom-right of your screen.

Assign Permission Sets

Next, you’ll assign one of these available permissions options to your Salesforce users:

  • Optimizely App Admin: Can install app, modify Optimizely records, and view experiment history related to Salesforce records.

  • Optimizely App User: Can modify Optimizely records and view experiment history related to Salesforce records.

  • Optimizely Experiment History User: Can view experiment history related to Salesforce records. This is the recommended permission setting for most users.

At a minimum you, the Salesforce admin installing the app, should have Optimizely App Admin permission. If you are not sure who else to assign permissions to at this point, no problem. You can always complete the rest of installation and revisit this at a later time.

Follow these steps to assign permissions:

  1. In the Permission Sets tab, click the Select a Permission to Assign drop-down menu choose the permission level you want to begin assigning to users.

perm set 2.png

  1. Select an appropriate subset of users from the Select Profile to Assign Permissions to drop-down menu. The users in that subset will be listed in the table below. Check the box next to each user you’d like to set Optimizely app permissions for.

  2. Click the Add Selected button below the list of available users to add the designated users to the permission set you selected in step one above.

  3. Repeat steps one through three above for each permission set you’d like to assign.

  4. To remove a user from a permission set, check the box next to their name in the Assigned to section and click the Remove Selected button.

  5. When you are finished, click “Next” at the bottom right of your screen.

To change permission assignments, an Optimizely admin can do so from the Permission Sets section within the Optimizely app. Alternately, follow these steps:

  1. Navigate to Settings > Permission Sets.

  2. Click the desired Optimizely app permission.

  3. Click Manage Assignments.

  4. Update the assignments for your users as needed.


Schedule Jobs

Completing this step of configuration ensures your team has fresh data needed to power the experiment history display and valuable reports — for example, you can create a report that highlights the rate at which experimented leads convert to opportunities over time.

You will schedule jobs for both Leads and Contacts. Select your desired Frequency in the option picklist, then click "Schedule". We recommend setting Frequency to hourly or daily.

jobs 1.png

After you schedule the jobs, you will see the next run time and have the option of manually running the job by clicking "Run Now".

If you would like to modify the job schedule, click "Stop Job". You will then have access to the schedule configuration options again.

jobs 2.png

Your team can alternately schedule jobs using Salesforce's standard scheduler. While Salesforce's standard scheduler provides more granular control, it is more time intensive to configure and manage. For example, if you wanted to schedule an Apex job to update Lead experiment data every hour, you would need to schedule 24 separate jobs via Salesforce's standard scheduler. In contrast, with Optimizely's app, you can accomplish this same outcome in a few clicks. If you would like to use Salesforce's standard scheduler instead of Optimizely's easy scheduler described above, please visit "Schedule Apex Jobs" in the configuration guide.

Regardless of which scheduling approach is used, in this initial version of the DNA app, experiment data for Leads and Contacts is updated for just the first 7 days after a Lead or Contact is bucketed into an Optimizely experiment, which is determined by the time a visitor ID is assigned to a given Lead or Contact. In subsequent versions of the DNA app, Optimizely will extend the available timeframe for data updates. We discuss data updates in more depth in the configuration guide.

Configure the DNA App

That’s it for the installation phase! Next, you will need to configure the DNA app to tailor the app for your team and ensure information is communicated between Optimizely and Salesforce.