close this to read article
Feature Availability: The VWO - BigQuery integration is available in Enterprise for VWO Testing, Feature Management & Experimentation (FME), and Personalize.
This article covers the following: |
Overview
Integrating your VWO account with BigQuery (BQ) allows you to leverage data stored in your BigQuery tables for pre-segmentation targeting in VWO campaigns. By importing specific lists of user identifiers (like UUIDs, etc.) from BigQuery into VWO, you can precisely target your VWO Testing or Personalization campaigns to visitors whose identifiers are present in those lists.
Enable the Integration
Enabling this integration is a multi-step process:
Step 1: Create a Service Account for your BQ Data
- Log in to your Google Cloud account and select the project containing the BigQuery data you want to use for your VWO campaign.
- From the main menu panel on the left, go to IAM & Admin > Service Accounts.
The Service Accounts page appears. - Click on the Create service account, enter the service account name and account ID and click Create and Continue.
- You can skip the next steps and click on Done to save your changes. Upon successful creation, the new service account will be listed on the Service Accounts page.
- Now, click on the newly created service account and go to the Keys tab.
- Click Add Key > Create New Key, select JSON as the key type option, and click Create. The service JSON file will start downloading in your browser. Keep this file secure as you will need it later.
Step 2: Create a Custom Role with Required Permissions
- In the Google Cloud console, go to IAM & Admin > Roles.
-
Click Create Role and enter the following details:
- Title: VWO Custom Role
- ID: vwo_custom_role
- Stage: General Availability (GA)
- Under Permissions, click Add Permissions and search for the permission bigquery.jobs.create.
- Click Add and then Create to save the role.
Step 3: Assign the Custom Role to your Service Account
- Go to IAM & Admin > IAM.
- Click Add and enter the email ID of the service account created earlier.
- Under Role, select VWO Custom Role (created in Step 2) and click Save.
Step 4: Create BigQuery Datasets and Assign Permissions
- In the Google Cloud console, go to BigQuery.
- Choose the dataset from which you want to pull data.
- Go to the dataset permissions, click Add Principal, and assign the following roles to your service account:
- BigQuery User
- BigQuery Data Editor
Step 5: Turn On the Integration in VWO
- Log in to your VWO account.
- From the left panel of your VWO dashboard, go to Configurations > Integrations. This menu provides integrations that can be enabled at the account level.
- Browse for the BigQuery integration, click on it and turn on the toggle switch to enable it.
- You are auto-navigated to the Config tab to connect your BigQuery account with VWO.
- Check Pull data from BigQuery to VWO and save it.
- Click Connect BigQuery.
-
Enter the details in the following fields and click Create Connection:
Which Field? What is it for? Project ID Specify the Google Cloud Project ID, where the required BigQuery dataset is present. Dataset ID Specify the ID of your selected BigQuery dataset. Service Account Paste the content of the service account JSON file.
Once the connection is established, you can seamlessly import your BigQuery data into VWO.
NOTE: Only a single column of values can be imported, and these values must be identifiers that are available in the browser, such as a JavaScript variable, cookie value, or any other accessible format.
Step 6: Add an Attribute List from BigQuery
After enabling data pull, you need to define which lists to import:
- On the BigQuery Config tab (after saving the Pull data setting), scroll down to the Attributes lists added to VWO BigQuery section.
- Click + Add attributes list from BigQuery.
An Add Attributes List modal will appear. -
Enter the following details:
- Name the attributes list: Give a descriptive name that you will recognize later when setting up campaign targeting (e.g., "High Value User IDs", "DemoUUID").
- Select table: Choose the BigQuery table (from your configured dataset) that contains the user identifiers. VWO will load the available tables.
- Select column: Choose the specific column within the selected table that holds the user identifiers (e.g., uuid, email, customer_id). VWO will load the columns for the selected table.
- Click Add.
The newly created list will appear in the Attributes lists added to VWO BigQuery section. Its Sync status will likely show Sync in progress initially. VWO will periodically fetch the data from the specified BigQuery column and update this list.
NOTE: VWO syncs data from BigQuery every 24 hours.
Step 7: Access and Use the Feature (Campaign Targeting)
Once an attribute list is created and has synced successfully, you can use it in VWO campaign targeting:
- Create or edit a VWO Testing (e.g., A/B) or Personalize campaign.
- Navigate to the Audience and Traffic section.
- Click Custom Segment to define your target audience.
- Click Add another condition.
- Select the condition type that corresponds to the identifier stored in your BigQuery list (e.g., if your list contains UUIDs and you push the user's UUID into a JS variable named uuid on your site, select JavaScript Variable).
- Enter the name of the variable (e.g., user_id).
- Select the operator In list.
- Click the value dropdown. You should see the Attributes List category, containing the names of the lists you created from BigQuery (e.g., "Paid Users").
- Select the desired attribute list name (e.g., "Paid Users").
- Click Save Changes (or finish configuring the segment and save the campaign).
- The VWO campaign will now only target visitors whose identifier (available in the specified JS variable in this example) matches an entry in the synced "Paid Users" list pulled from BigQuery.
Need more help?
For further assistance or more information, contact VWO Support.