Integrate Lytics Audience Sync App

  • Updated

Import your Lytics audiences into Optimizely Data Platform (ODP) as real-time audiences. You can use these audiences across different Optimizely products, such as Optimizely Web Experimentation, Feature Experimentation, and Content Management System (CMS) Visitor Groups. 

This integration uses the Lytics ODP connector to sync your Lytics audiences and convert them into real-time audiences in ODP. You can choose which customer identifiers to transfer and keep your segmentation current with near real-time audience updates.

Prerequisites

  • A Lytics account
  • An ODP account

Update API app consent setting

You only need to complete the instructions in this section if your app consent setting for the API channel is set to Opted Out. This setting must be set to Opted In for this app to successfully send data.

  1. Go to Settings > App Consent Settings in ODP.
  2. Set the Api app's Default Consent to Opted In.

  3. Click Update Consent in the confirmation prompt.

Configure the integration

  1. Go to Data Setup > App Directory in ODP.
  2. Select the Lytics app.

  3. Click Install App.
  4. Go to the Settings tab.
  5. Expand Install Instructions and copy the webhook URL and the request header authorization token. This is necessary to trigger audience webhooks in Lytics.  

  6. (Optional) Enter a name for the customer identifier in the Customer profile identifier field name section. ODP uses this name to recognize and store the customer's unique ID in its internal records, specifically as fs_user_id and web_user_id. If you save the default name _id for the unique customer ID, select Lytics ID in the Exports Fields section when configuring your job in the Lytics app. This ensures Lytics sends the correct unique customer ID that ODP expects to receive under the _id label.   

  7. Click Save.

Configure the audience triggers webhook in Lytics

  1. Open the Lytics app.
  2. Go to Jobs and click + Create New

  3. Select Webhook > Audience Triggers Webhook as the job type on the Select job page.

  4. Enter the job Label and click + New Authorization on the Expiration & Auth > Set job details page

  5. Select Provide authorization as request header or paramater as the authorization method on the Authorization method page.

  6. Enter the authorization Label in the Details section on the Configure authorization page. In the Configuration section, copy and paste the webhook request authorization header you viewed in step 5 of Configure the integration.

  7. Click Save and Continue.

  8. Complete the following steps to select the audiences you want to sync on the Configuration page:

    • Paste the webhook URL you viewed in step 5 of Configure the integration. Select POST from HTTPMethod drop-down list. 

    • Select Existing Users to sync existing records. Select Enters and Exits from the Audience Trigger Events and Lytics ID from the Exports Fields drop-down lists. Only select Lytics ID if you saved the default value in the Customer profile identifier field name in step 6 of Configure the integration

      The Lytics app supports array-type identifiers. If your customer identifiers are stored as arrays, you must select the same array field in both the Export Fields and Fields to Trigger sections. The selected fields must reference the same identifier array to ensure correct audience syncing.

    • Select Batch Events. Follow the recommended batch pattern:
      • Batch Size – 300
      • Batch Send Duration – 3
      • Simultaneous Calls – 20

  9. Click Complete to complete the configuration. For additional details, see the Lytics webhook documentation.

If a related real-time audience does not exist in ODP during the sync, the Lytics app automatically creates it with the new audience ID lytics_<slug> and the name and description Lytics - <slug>.

Use your Lytics audiences in Optimizely products

You must configure the ODP integration with your desired Optimizely product before you can access your Lytics audiences. See the following documentation:

Access your Lytics audience in Optimizely Web and Feature Experimentation

To access your Lytics audience in Optimizely Web or Feature Experimentation, complete the following:

  1. Open the Web or Feature Experimentation app.
  2. Go to Audiences.
  3. Edit an audience or click Create New Audience.
  4. Expand Real-Time Audiences, then drag and drop the Custom Segments condition into the Audience Conditions section.
  5. Expand the Custom Segments drop-down list and select the audience you connected from Lytics.
  6. Click Save Audience.
If you enabled unified audiences, you are redirected to the Audiences page in ODP. You can create or update an Experimentation audience in ODP, which displays under Data Platform Audiences, and add it to your Lytics audience. Add the audience to an experiment afterwards.