Knowledge Base

Grab Visitor Attributes from Site Containers

Created: February 28, 2018

/Author:
Admin

Guide to Grabbing Data from Site

This page will guide you in how to set Personyze to grab visitor attributes, such as cart value, number of items in the cart, visitor email, account value, etc., from your site. Once Personyze has extracted the information from the predefined element, it is just as available for segmentation as every other visitor characteristic (such as their geographic location or behavioral data), and can be used for more powerful personalization.

Use cases for grabbing visitor data:

1. Targeting – You can target based on a container value; for instance, if you wanted to show a piece of targeted content only to visitors who have a cart value over $100, you will need to grab their cart value container.

2. Dynamic Variable – You can also grab data to be used as a dynamic variable, for instance, grabbing a visitor’s name in order to insert it into a personalized popup.

URL Path:

Account Settings > Visitor Attributes

There are two primary types of data which you can set Personyze to grab from your site:

Session AttributesData which changes from session to session, such as cart value or number of items in the cart.

Visitor AttributesRelatively permanent data such as account type, email, or phone number which might be grabbed from an input field.

This wiki page explains how to improve tracking, by setting Personyze to grab data of either type from pages on your site.

Personyze allows you to define custom grab data containers to extract information from any element of a web page, such as:

An input box

A search box

The shopping cart bottom line

Hidden fields

Metatags

Cookies

URL Parameters

Local storage or DB, etc.

How to Set Personyze to Grab Session Attributes

Personyze grab data values are based on the HTML selector, javascript variable, or cookie name of the container from which the data is being grabbed. If you’re not familiar with containers, you can think of them as locations on the page (or in the code that makes up the page) where a data variable such as cart value or visitor’s name might be stored.

The easiest way to select where Personyze should grab the data is to use the Personyze simulator interface, to visually select an element. To do so, go to:

In unusual cases where the simulator is not working on that page in proxy mode, you can also insert the name of the selector/cookie manually.

Advanced Settings are available on the selector for fine tuning; for example, tell Personyze to grab only numbers (great for cart value, to avoid unnecessary currency symbols), or tell Personyze to override previous values whenever there is a new data entry, or tell Personyze to grab container value only if the visitor clicked on a button (very useful for grabbing transaction value or email submission on send form button).

Grabbing User Profile Data

If you want to set Personyze to grab data that will be kept long-term as part of the user profile across sessions, such as Name, Age, Gender, Industry, Role, Account Type, etc., then the process is the same as what is described above for Session Data, but you will simply follow a slightly different path:

UI Path: Account Settings > Visitor Attributes > Visitor Attributes

(You can also do so from the Visitor Attributes rule in Campaign Targeting)

From this page, you will be able to add as many custom profile fields as you want, and then use the simulator to set up where to grab the data.

Grabbing Values Using Personyze Simulator:

You can tell Personyze where to grab data by opening your site in the Personyze Preview Mode, and then select the type of data that you wish to grab in the menu (the tracking code is not necessary for this step).

If you choose to select visually, once the preview mode of your site is open you can use the mouse to point and click on the value you want to grab. This can be a text input field, text in the page, or dynamic text like cart value. After you point and click, you should see the value as Personyze grabs it.

Be aware that the way Peronsyze grabs values is based on HTML selectors. In most cases, Personyze will automatically choose the right selector; for example, if it’s the page title, the selector will be “H1”.

In some cases, your site generates a selector with a unique dynamic ID, that is changing from one visitor to another; in that case, when Personyze goes to grab content from the selector you have set, it will not work, because there is no such selector for anyone else besides the current user. To solve this issue, please use the “select parents” option, to choose a better selector, which may look more generic (e.g. div-cart instead of div-cart-SS4443).

Grabbing Values by Manually Setting the Selector

When creating new grab data containers, you can choose the “I Know the Selector” option on the Grab Dynamic Data interface. When you do so, you will see a field to type in the selector. You should type the selector, and make sure your settings are correct by using the Q/A Campaign simulator or going to Live Visits, to see real-time data on the new container.

Don’t Know the Selector?

You can find the selector using your web browser console. To do this, right-click on any element, and then click “Inspect Element,” which should open the browser console, and visually show you the element selected. Then, right mouse click inside the console where it shows you the selected element, and this should open a menu with one of the options being to copy the “Selector Path”

How to check if Personzye is set correctly to grab the data

In Live Visits, if you click on visitor container data, a small popup with all values will display his data

2. Testing Mode – if your IP is set to be the test IP, or you entered Personzye testing mode, you can view containers value in the console