Capturing Visitor Attributes in Acquire from Your Website
You have tons of data about your visitors. Sync it into Acquire by capturing visitor attributes from logged-in website visitors using a script. You’ll have to make a few edits in the script, but don’t worry—no heavy custom coding required.
In this article:
- What are Visitor Attributes?
- Locating the Script
- Mapping Your Fields in the Script
- Installing the Script
What are Visitor Attributes?
Visitor attributes are data points about an individual such as:
- Account status
- And more
The capture script contains standard attributes and you can create your own custom visitor attributes. Use this data to send custom messages, route priority customer inquiries, and more.
Locating the Script
Locate the script by navigating to Settings > Installation and Setup > Widget Code. Click the caret next to 'Capture Customer Details' to expand the section. Copy the script and paste it into your favorite text editor.
Note: We provide the script in PHP, Ruby on Rails, and Django. Choose the language that works best with your existing codebase.
Mapping Your Fields in the Script
Make sure Acquire speaks the same language you do by mapping your visitor attribute fields.
The script already has common attributes listed in it such as name, email, and phone number. To map these fields, replace the value with the IDs used in your codebase. Delete any default fields you won’t be using.
Interested in mapping custom fields? First, you’ll need to create the Custom Attribute in Acquire. Learn how to do that here. After adding the Custom Attribute, add the key to the script and proceed with mapping.
Once you’ve added all of the attributes you want to pass into Acquire, the script is ready to be installed.
Note: The default language in your Chat Widget can also be updated in this code snippet using the lang attribute. For example, replace language_code with en-US for American English.
Installing the Capture Code
Copy and paste the script into the <head> tag on any page the Widget is installed. Any time a logged-in visitor visits your website, that information is passed into Acquire, showing you what page they’re active on and other important account details like recent orders or membership tier.