Understanding Lytics / Product Documentation / Data Onboarding and Management

Onboarding Web Data

Lytics provides two ways to onboard data from your website, email marketing, and online advertising. The Lytics JavaScript Tag, once installed on your website, will send user activity data. The Lytics pixel can be embedded in email or ads and configured to send user data back to Lytics on load.

Lytics JavaScript Tag

The Lytics JavaScript Tag sends page view and any custom events you have configured to the default stream (unless configured otherwise). This event data will be translated, via Lytics Query Language (LQL) queries, into predefined user fields. For example, the following request would send a user's email address, first name, and last name to Lytics:

jstag.send({
  "email": "[email protected]",
  "first_name": "Forrest",
  "last_name": "Gump",
})

Using a tag manager

Our tag can be installed manually or with a tag manager such as Google Tag Manager or Segment. If the Lytics JavaScript Tag is installed using a tag manager, the jstag.send command may not be the correct function to call.

Lytics Image Pixel

When the Lytics JavaScript Tag cannot be installed the Lytics Image Pixel can be used to onboard user data from any source that allows an image to be loaded, such as email and online ads.

Building the pixel

There are three key variables that need to be defined when sending information to Lytics using the Lytics Image Pixel. The account ID (found in account settings), the name of the receiving data stream, and the event data in the form of query parameters. For example, this pixel will send the user’s email address and Google Universal Tag Manager (UTM) medium and source variables to the default stream of account 24546133b65465413w9.

<img src="https://c.lytics.io/c/12324546133b65465413w9/[email protected]&&utm_medium=email&utm_source=welcome" />

This image tag can be inserted into any HTML document including advertisements and emails and will send the event data on load.

<html>
    <head />
    <body>
        <h1>Welcome to Hanks Roles!</h1>
        <p>Thanks for signing up for all the Tom Hanks news you handle.</p>

        <!-- lytics pixel at bottom of email -->
        <img src="https://c.lytics.io/c/12324546133b65465413w9/[email protected]&utm_medium=email&utm_source=welcome" />
    </body>
</html>

Predefined user fields

Lytics does not have a fixed schema, any key-value pair can be passed using the JavaScript tag or pixel. However, only data which has been mapped to user fields will be available for use in audiences. Out of the box, the Lytics JavaScript Tag and Image Pixel have the ability to onboard the following information when using the default data stream:

General Visit Data

NameIdentifier
Time of Last Visitlastvist_ts
Time of First Visitfirstvisit_ts
Total Number of Visitsvisitct
All Channels Usedchannels
Web Events By Hourhourly
Web Events By Weekweekly
Domains Visiteddomains
Domains Referred Fromrefdomain
Devices Useddevices
Has Accessed Mobile Webis_mobile
Last Visit Countryvisit_country
Last Visit Cityvisit_city
Last Visit State/Provincevisit_region
Timezonetimezone
User is a botis_bot
User Agentuser_agent
Hashed URLs Visited and Total View Count (used for content affinity)hashurls

User Identity

NameIdentifier
Web Cookie ID_uid
User IDuser_id
Full Namename
First Namefirst_name
Last Namelast_name
Emailemail
Titletitle
Companycompany
Phone Numberphone
Cell Numbercell
Ageage
Gendergender
Citycity
Statestate
Zipzip
Countrycountry
Originorigin
User Statusstatus

Event Data

Events regarding specific user actions such as a CTA click can also be sent to Lytics. In addition to any of the parameters identified above you can append event specific data to the send request resulting in a few more fields on the profile:

NameIdentifier
Total Pageview Countpageviewct
Event First Time Seenevent_first_seen
Event Last Time Seenevent_last_seen

Campaign Data (Google UTM)

Google UTM campaign parameters are automatically pulled in and added to profiles as well. For more details on Google UTM parameters and how to use them visit the Google help docs. The following fields will be added to the profile when UTM parameters are received:

NameIdentifier
UTM Campaigns Referred Byutm_campaigns
UTM Sources Referred Byutm_sources
UTM Mediums Referred Byutm_mediums
UTM Contents Referred Byutm_contents
Last UTM Campaign Referred Byutm_campaign_last
Last UTM Source Referred Byutm_source_last
Last UTM Medium Referred Byutm_medium_last
Last UTM Contents Referred Byutm_content_last

Form Data

In order to collect data entered on a form, you will need to use jstag.send() when a user submits that form. The fields below will be available as user fields if the form name is sent as form_name, and any fields in the form need to start with formdata_, for example formdata_country.

NameIdentifier
Last Time Web Form Submittedlast_form_submitted_by_date
Web Forms Submittedform_submitted
Web Form Dataform_data

Conversion Data

As a convenience, a standard conversion event has been defined in order to surface some useful conversion related aggregates such as most recent conversion value or the oldest conversion time. When passing conversion events the event name must be "conversion" for the following mapping to occur:

NameIdentifier
Most Recent Conversion Timecvt_last_time
Oldest Conversion Timecvt_first_time
Most Recent Campaign Attributed to Conversioncvt_last_campaign
All Campaigns Converted Fromcvt_campaigns
Most Recent Variation Attributed to Conversioncvt_last_variation
All Variations Converted Fromcvt_variations
Most Recent Currency Usedcvt_currency
Most Recent Conversion Valuecvt_value
Conversion Values By Campaigncvt_history