|
This article covers the following: |
Overview
When a visitor lands on your website, they are typically anonymous. Visitor identification helps you identify anonymous visitors using known user data, such as email addresses or other unique identifiers available in CRM records. This enables you to create custom segments and deliver tailored experiences to your target audience.
Let us understand the two methods to configure visitor identification on your website.
Configure Visitor Identification using CRM Integration
VWO supports integration with CRM tools such as HubSpot, Salesforce, and Marketo for visitor identification. If you use either of these tools, refer to the following articles. They provide instructions on integrating VWO with your CRM tool.
- Salesforce: Use Salesforce Data in VWO for Account-Based Marketing
- Marketo: Use Marketo Data in VWO for Account-Based Marketing
- HubSpot: Use HubSpot Data in VWO for Account-Based Marketing
How a CRM Integration in VWO Helps You Identify Anonymous Visitors
Here’s how visitors are identified in VWO once you integrate your CRM tools with VWO:
- Visitors are initially tracked anonymously using VWO cookies.
- When a user submits a form, for example, a lead form, their email gets captured in your CRM.
- VWO syncs with the CRM or marketing tool and maps an anonymous visitor to a known user using identifiers such as email addresses.
- This allows you to:
- Track user journeys across sessions
- Build advanced audience segments
- Measure the experiment's impact on actual leads or revenue
If you don’t use any supported CRM or marketing tools, you can manually configure a visitor identification script on your website. This will allow you to capture a user’s ID, email (or any other unique identifier) and send it to VWO.
The following section explains how to configure visitor identification scripts on your website.
Configure a Custom Visitor Identification Script on Your Website
You can configure a custom visitor identification script in different scenarios, beyond those listed below. For example, you may choose to implement a custom visitor identification script when:
- You are using a custom backend logic or an unsupported CRM
- You want more control over how users are identified
- You already have user data available on login or signup
Before configuring the visitor identification script, it is important to understand when you must pass the captured user data to VWO.
When Should You Pass User Data to VWO?
You should pass user information to VWO immediately after a user is identified, such as when they:
- Sign up for your SaaS product
- Log in to their account
- Update their profile details
- Complete an important lifecycle action, for example, plan an upgrade.
This ensures that VWO can associate all future page views, conversions, and experiment participation with the correct user profile.
Use the identityVisitor Method to Identify Visitors on Your Website
To identify incoming visitors on your website, call the identifyVisitor JavaScript method during key user interactions. These interactions include, but are not limited to, instances where a user logs in and performs actions such as updating their profile or upgrading their subscription.
The identifyVisitor method accepts two primary arguments: the User ID and an Attributes Object. If your primary goal is to identify users via email, you can pass just the email in the JavaScript method as follows:
window.VWO = window.VWO || [];
window.VWO.identifyVisitor("unique-identification-id", {
email: "brian@airbnb.com",
});
If the user has not registered or logged in yet, just leave the parameters in your JavaScript method empty. VWO will automatically track them as an anonymous user.
For example:
window.VWO = window.VWO || [];
window.VWO.identifyVisitor(null, {
viewedPricing: true,
});
You can pass more user context to VWO by including user attributes such as Name and Job title, along with the unique ID, in the script, as shown in the following example:
window.VWO = window.VWO || [];
window.VWO.identifyVisitor("unique-identification-id", {
email: "brian@airbnb.com",
name: "Brian Chesky",
title: "CEO",
randomParam: "randomValue",
});
These user attributes are captured as variables in VWO. Once these variables are available in VWO, you can:
- Create Custom Segments in VWO
- Target experiments only to specific user roles or plans
- Analyze conversion performance by user attributes
Note: It is recommended that you pass the User ID as the primary value to VWO. This should be the same ID you use for a user in your own database, for example, a customer ID or account ID.
Import Company-Level (Account) Attributes in VWO
For B2B SaaS companies, personalization often works better at the company or account level rather than for individual users. You can pass company-related attributes along with user data in the identifyVisitor method, as shown in the following code snippet, and use them for:
- Account-based targeting
- B2B personalization
- Segmenting results by company size, plan, or industry
window.VWO = window.VWO || [];
window.VWO.identifyVisitor("unique-identification-id", {
email: "brian@airbnb.com",
name: "Brian Chesky",
title: "CEO",
randomParam: "randomValue",
company: {
id: "b4c64565-adc1-4ba1-9a0f-d9639615e68c",
domain: "airbnb.com",
name: "AirBnb",
industry: "Information Technology",
employeeCount: 6100,
plan: "premium",
randomParam: "randomValue",
},
});Using these identification methods allow you to effectively bridge the gap between anonymous traffic and known accounts, ensuring your ABM campaigns are data-driven and highly personalized.
Need more help?
For further assistance and more information, contact VWO Support.