---
title: "Using the Conversion Optimization by VWO connector"
date: "2025-12-30T07:42:25+00:00"
summary:
image:
type: "page"
url: "/customer-data-platform/using-conversion-optimization-vwo-connector"
id: "b76cbf80-bb1a-43c3-9a7e-d0fdb71cd9d0"
---

This page provides information about how to use the Conversion Optimization by VWO connector feature for the following scenario:

Marketers and data analysts aim to efficiently create, manage, and synchronize audiences through Customer Data Platform (CDP) for Conversion Optimization by VWO connector to transform manual processes and enhance campaign efficiency.

Prerequisites
-------------

Before you configure segment fetching, you must:

*   Install the VWO [Smartcode](https://help.vwo.com/hc/en-us/articles/360019422834-Configuring-the-VWO-SmartCode-for-Your-Website) on your website.
    
*   Deploy CDP WebTag 2.0, as legacy WebTag does not support segment fetching.
    
*   An active Acquia Conversion Optimization subscription.
    

Configuring the CDP - Global Tag
--------------------------------

You must use WebTag 2.0 to perform this configuration because the legacy WebTag does not support this parameter. To configure CDP Global Tag:

1.  Locate the CDP Global Tag.
    
2.  Ensure the `segments` parameter is set to `true`. This setting loads the `window.AcquiaCdpSegments` API necessary to configure the Conversion Optimization fetching tag.
    
3.  If the parameter is not present, manually update the Global Tag with the **Segments** parameter.
    

    <script>
        var $A1Config = {
            webtagId: "your-webtag-id", // Paste your webtagId value provided by Acquia.
            tenantId: 999, // Example set the static tenant ID.
            host: "//url.endpoint.com", // Set the service endpoint URL according to your  hosted environment and cloud region.
            segments: true // Set the service endpoint to True if you have an Acquia Convert Optimization subscription with us for VWO access.
        };
    </script>
    <script src="https://scripts.agilone.com/latest/acquia-cdp-webtag.js"></script>

Configuring the Conversion Optimization Fetching Tag
----------------------------------------------------

You must add the tag that retrieves segments based on the visitor identity defined in the configuration for CDP visitor tag. To configure the fetching tag:

1.  Create a new tag configuration.
    
2.  Set the **Tag Type** to `Custom HTML.`
    
3.  Copy the following code into the HTML editor:
    

    <script> 
      if (window.AcquiaCdpSegments && window.AcquiaCdpSegments.fetchSegments) { 
      window.AcquiaCdpSegments.fetchSegments({'key': 'value'}); // Fetch segments the visitor identity from data layer based on your CDP visitor object. 
      } 
    </script>

The parameters in `fetchSegments()` must exactly match the key and value structure defined in the Customer Data Platform (CDP) visitor WebTag.

### Conversion Optimization parameters

Before you implement segment fetching, you must understand three key decisions:

*   Identify which attribute identifies visitors, such as a default attribute or custom attribute.
    
*   Determine if this attribute must be visible in CDP UI, as custom attributes require specific configuration.
    
*   Determine if the data must be encrypted in transit, which requires the use of the email key.
    

Component 

Description

Fetching tag

Key 

The parameter name in the fetching script.

*   Determines if data is encrypted
    
*   Must match your encryption requirements
    
*   Controls how CDP processes the identifier
    

Value

The actual visitor identifier for the person.

*   Email address, VWO UUID, or custom ID
    
*   Populated by CDP campaign
    
*   Retrieved dynamically by fetching script
    

### Understand encryption in transit requirements

To encrypt data in transit, the fetching script must use the email key regardless of the attribute selected in the campaign.

*   Encryption in transit is active: The fetching script recognizes email as a special key that triggers automatic encryption to meet security requirements for Personally Identifiable Information (PII) protection.
    

JavaScript

    window.AcquiaCdpSegments.fetchSegments({
      'email': 'user@example.com' // PII Encrypted
    });

    window.AcquiaCdpSegments.fetchSegments({
     'email': 'user@example.com' // PII Encrypted
    });

*   Encryption in transit is not active: If you use any other key name, even for email data, the system sends data unencrypted.
    

JavaScript

    window.AcquiaCdpSegments.fetchSegments({
      'CUSTOMERSUMMARY_EMAIL': 'user@example.com' // PII Unencrypted
    });

    window.AcquiaCdpSegments.fetchSegments({
     'CUSTOMERSUMMARY_EMAIL': 'user@example.com' // PII Unencrypted
    });

*   Hashed data: You can pass a CDP compatible SHA-256 hashed value.
    

JavaScript

    window.AcquiaCdpSegments.fetchSegments({
      'CUSTOMERSUMMARY_EMAILHASH': 'aSc34Erv' // SHA-256
    });

    window.AcquiaCdpSegments.fetchSegments({
     'CUSTOMERSUMMARY_EMAILHASH': 'aSc34Erv' // SHA-256
    });

*   Non-PII custom attributes: The value remains unencrypted when you use a CDP Studio custom attribute or any key other than the default.
    

    window.AcquiaCdpSegments.fetchSegments({
     'CUSTOMER_C_CUSTOMERSTRINGATTRIBUTE30': 'ABC123' // Exact Value eg. VWO_UUID
    });

The `fetchSegments` method accepts only one visitor value type per call. Your team and Acquia must agree on the identifier type.

Configuring Convert segment manually
------------------------------------

This section provides instructions for manually configuring the conversion optimization fetching tag. Add the following scripts to the `<head>` section of your website:

*   ****CDP Global Tag****: This script enables the segment fetching features.
    
*   ****Segment Fetching Script****: This script retrieves segments for the visitor.
    

### Define the CDP Global Script

Add or modify this script as early as possible in the `<head>` section of your pages:

    <script>
     var $A1Config = {
       webtagId: "your-webtag-id", // Paste the webtagId value provided by Acquia.
       tenantId: 999, // Set the static tenant ID.
       host: "//url.endpoint.com", // Set the service endpoint URL for your hosted environment and cloud region.
       segments: true // Set to true for Acquia Convert Optimization subscription with VWO access.
     };
    </script>
    <script src="https://scripts.agilone.com/latest/acquia-cdp-webtag.js"></script>

### Configure Parameters

Parameters 

Description 

`webtagId`, `tenantId`, `host`

Follow the instructions [here](/customer-data-platform/configuring-webtag-20-manually "Configuring WebTag 2.0 manually").

`segments`

If the parameter exists in the global script, set the value to ****true****. If the parameter is missing, update the global tag to include the default parameter `segments`. 

This setting loads the `window.AcquiaCdpSegments` API required to configure the conversion optimization fetching tag. Without `segments: true`, the segment fetching script cannot work.

### Define the the fetching script

To retrieve segments based on the visitor identity defined in the CDP visitor tag, add the following tag:

    <script>
     if (window.AcquiaCdpSegments && window.AcquiaCdpSegments.fetchSegments) {
       window.AcquiaCdpSegments.fetchSegments({'key': 'value'}); // Fetch segments the visitor identity from data layer based on your CDP visitor object.
     }
    </script>

### Understand conversion optimization parameters

Before you implement segment fetching, you must understand these three key decisions:

*   Identify the attribute to identify visitors, such as a default attribute or custom attribute.
    
*   Determine if this attribute must be visible in the CDP User Interface (UI), as custom attributes require specific configuration.
    
*   Determine if the data must be encrypted in transit, which requires the use of the email key.
    

Component

Description

Fetching tag

Key

The parameter name in the fetching script.

*   Determines if data is encrypted
    
*   Must match your encryption requirements
    
*   Controls how CDP processes the identifier
    

Value

The actual visitor identifier for the person.

*   Email address, VWO UUID, or custom ID
    
*   Populated by CDP campaign
    
*   Retrieved dynamically by fetching script
    

### ****Understand encryption in transit requirements****

To encrypt data in transit, the fetching script must use the email key regardless of the attribute selected in the campaign.

*   Encryption in transit is active: The fetching script recognizes email as a special key that triggers automatic encryption to meet security requirements for Personally Identifiable Information (PII) protection.
    
        window.AcquiaCdpSegments.fetchSegments({
         'email': 'user@example.com' // PII Encrypted
        });
    

JavaScript

    window.AcquiaCdpSegments.fetchSegments({
      'email': 'user@example.com' // PII Encrypted
    });

*   Encryption in transit is not active: If you use any other key name, even for email data, Customer Data Platform (CDP) sends data unencrypted.
    
        window.AcquiaCdpSegments.fetchSegments({
         'CUSTOMERSUMMARY_EMAIL': 'user@example.com' // PII Unencrypted
        });
    

JavaScript

    window.AcquiaCdpSegments.fetchSegments({
      'CUSTOMERSUMMARY_EMAIL': 'user@example.com' // PII Unencrypted
    });

*   Hashed data: You can pass a CDP-compatible SHA-256 hashed value.
    
        window.AcquiaCdpSegments.fetchSegments({
         'CUSTOMERSUMMARY_EMAILHASH': 'aSc34Erv' // SHA-256
        });
    

JavaScript

    window.AcquiaCdpSegments.fetchSegments({
      'CUSTOMERSUMMARY_EMAILHASH': 'aSc34Erv' // SHA-256
    });

*   Non-PII custom attributes: The value remains unencrypted when you use a CDP Studio custom attribute or any key other than the default.
    
        window.AcquiaCdpSegments.fetchSegments({
         'CUSTOMER_C_CUSTOMERSTRINGATTRIBUTE30': 'ABC123' // Exact Value eg. VWO_UUID
        });
    

The `fetchSegments` method accepts only one visitor value type per call. Your team and Acquia must agree on the identifier type.

Configuring VWO for Conversion Optimization
-------------------------------------------

To create an event in the Convert account:

1.  Navigate to ****Data 360**** and go to the ****Events**** section.
    
2.  Click ****+Create**** to create an event.
    
3.  Enter the event name as `cdpSegmentsEvent`.
    
    The event name is case-sensitive. You must not change the event name or enter a different name to ensure that CDP segments function correctly.
    
    ![Web interface for creating an event with fields for "Event Name" and "API Name," and options to add descriptions and properties.](https://acquia.widen.net/content/a52b6cd5-f067-4e9f-be17-9c33badf9e5d/web/cdp-vwo-event-name.png?w=720&itok=-hPJazjb)
    
4.  Click **Create** to finalize the event setup.
    

To create a trigger:

1.  Navigate ****Data 360**** and go to the ****Triggers**** section.
    
2.   Click ****+Create**** to create a trigger.
    
3.  Enter the trigger name as `cdpSegmentsTrigger`.
    
    ![Screenshot of a web interface for creating a trigger, showing fields for trigger name and conditions, with options to save or cancel.](https://acquia.widen.net/content/5b3e16a2-a071-437c-8de7-1a3428fa4373/web/cdp-trigger_name.png?w=720&itok=-GV31evJ)
    
4.  Click **Create** to finalize the trigger setup.
    

Create a CDP/Conversion Optimization Triggered Campaign
-------------------------------------------------------

1.  Create a CDP campaign and name it as `Acquia Conversion optimization - CategoryBrowsed Follow U`p.
    
    ![Campaign setup interface showing fields for name, description, and folder path. Navigation steps are numbered at the top.](https://acquia.widen.net/content/bca6b8d0-566d-455b-8b39-c64be6f8530a/web/cdp-vwo-create-campaings.png?w=720&itok=zXCxpMfp)
    
2.  In ****Include customers****, select the ****Add group**** icon and do the following:
    *   Add the ****Performed an event**** rule for ****CategoryBrowsed**** within the last 30 minutes.
        
    *   Add the ****Email Status**** rule as **V-verified** or **U-unknown**.
        
    *   Select the ****in**** operator and set the values to ****V**** for verified and ****U**** for unknown.
        
3.  In ****Exclude customers****, select the ****Add group**** icon and do the following:
    
    *   Add the ****Performed an event**** rule for ****checkout**** within the last 15 minutes.
        
    *   Add the ****Place a transaction**** rule.
        
    *   Select the ****between**** operator and set the range to ****1-2 days****.
        
        ![Campaign audience setup interface showing filters for including and excluding customers based on email status and transaction events.](https://acquia.widen.net/content/7b4207b8-771b-4eeb-8473-bb6d68196aa1/web/cdp_vwo-campaings-audience.png?w=720&itok=qVQdBCLm)
        
4.  Click **Next**.
    
5.  In ****Content Attributes****, select the ****Add**** icon to search for and add ****Email Address - SHA256 Hash****.
    
    ![Campaigns+ interface showing email attributes and segment details for an abandoned browse follow-up campaign. Options include save and next steps.](https://acquia.widen.net/content/14c85adb-306e-45d4-a714-65e03582c5a3/web/cdp_vwo-segments.png?w=720&itok=orXNvk8q)
    
6.  Ensure that the Professional Services team finalizes the custom attributes so that they are visible in the Child Customer Details tables. To add customer attributes:
    
    1.  In the ****Content**** section, click ****Add****.
        
    2.  Search the ****Child Customer Details**** tables.
        
    3.  Search for and select the new attributes.
        
        ![Interface with a search bar and content list, including "Child Customer Details" highlighted. Options to cancel or apply changes are visible.](https://acquia.widen.net/content/44e39e61-9aeb-4ede-9eff-4cd4e1265fd2/web/cdp-vwoid.png?w=720&itok=oDFZYjn3)
        
7.  Click **Apply**.
    
    ![Interface showing fields for customer attributes and details, including email address and output attributes, with a table labeled "Echo" below.](https://acquia.widen.net/content/c9daa067-d538-4f25-8196-16b9f4838761/web/cdp_vwo-customer-attributes.png?w=720&itok=QSEOYElg)
    
8.  Select ****Add new content****.
    
9.  Search for the content ****Echo****.
    
    ![Dropdown menu with options: Customer Attributes, Last Products Purchased, Last Products Browsed, Last Abandoned Products, Calculated Content. "Echo" is typed in a search bar.](https://acquia.widen.net/content/42c1d9be-84ae-4bd6-b557-502e14eaf83d/web/cdp_vwo-echo.png?w=720&itok=Sz-Sa9H0)
    
10.  In the ****Echo**** content section, perform the following actions:
     
     *   In the ****Header name**** field, enter the value `segmentname`.
         
     *   In the ****Value name**** field, enter the value `my-aqconvert-seg-cabrowse`.
         
         ![Table displaying a header with "segmentname" and "my-qaconvert-se" as the value, alongside an icon for deletion.](https://acquia.widen.net/content/61187703-8f9c-4924-bdc2-30a931672b8a/web/vdp_vwo-echo-attributes.png?w=720&itok=5BTeuN8E)
         
11.  Click **Next**.
     
12.  In **Destination**, select the connector Acquia Conversion Optimization by VWO.
     
     ![Campaign setup interface showing "Conversion Optimization by VWO" with options for destination table and preview.](https://acquia.widen.net/content/47554f96-f461-4bab-9219-a6b07b753f85/web/cdp-vwo_destinations.png?w=720&itok=0UprY0YE)
     
13.  Click **Send Now**.
     

Verify the segment in Convert
-----------------------------

After you create a VWO campaign, you can use CDP segments through the following methods:

1.  Explore ****Personalized**** and select ****Create segment****.
    
2.  Rename the segment as `CDP/conversion optimization Segment Category: Browse`.
    

#### Use targets

1.  Explore ****Targets**** and move through to ****Custom Segment****.
    
2.  Select the list and choose ****Cookie value****.
    
3.  Set the value to `_vwo_segments -> my-aqconvert-seg-cabrowse`.
    

### Best practices

Consult with Acquia Professional Services or a Support team representative to perform these actions:

*   Ensure proper implementation and configuration.
    
*   Address specific integration requirements.
    
*   Troubleshoot potential issues.
    
*   Optimize performance and use according to best practices.
    

### Troubleshooting tips

If segments do not load, perform these steps:

*   Check the browser console for warning messages.
    
*   Ensure that the `visitor` is properly defined before the script executes.
    
*   Ensure that CDP library loads on the page.
    
*   Contact an Acquia representative to validate the configuration.