Settings

Parsers (Data Parsing Engine)

2min

The data parsing engine is a tool that allows you to automatically parse data from various sources into Personizely's website data object or visitor's profile in Personizely. Every parser can parse a single value to one of the possible destinations.

Every parser has a destination (and destination key) and a source (and a source key).

Source

The source defines where should the data be parsed from, there are 5 sources:

  1. Browser Local Storage - takes the value from the visitor's browser local storage and is the equivalent of calling localStorage.getItem(key)
  2. URL Query String - takes the value from the visitor's URL address. Example: https://site.com?name=Jim, where Jim can be parsed by using name as the source key.
  3. Cookies - takes the value from the visitor's cookies where the cookie name is the source key.
  4. CSS Selector - parses the inner text from an element from the page where the source key is a valid CSS selector used to find that element. Is the equivalent of calling document.querySelector(key).innerText.
  5. JS Variable - parses the value from a JS variable that should be available in the global context where the source key is the variable name (can also use don notation for accessing deeper nested values).

Destination

The destination defines where the parsed data should be saved. There are 2 destinations:

  1. Data - website data - this data only lives for the duration of a session and should generally include information about the current session or website.
  2. Visitor - the visitor's profile - this data is saved into the visitor's profile inside the Personizely database and is persistent between sessions.



Updated 25 Mar 2024
Doc contributor
Did this page help you?