In the header of every page of a Qualifio campaign is a small script. This script is the Qualifio data layer (qlfDataLayer). A data layer is an object that contains all of the information that you might want to pass to various tools for analytics and/or marketing tags. The data layer is the source of a vast amount of customer interaction data, website-related data and campaign data, which can fuel a tag management system such as Google Tag Manager and power additional tracking vendors like Google Analytics.
What does a data layer look like?
<script>qlfDataLayer = [{"device":"desktop","optins":[],"form_submitted":0,"isWinner":"null","domain":"demo.qualifioapp.com","query_string":"","channel_guid":"B4221247-9CE4-4F3C-8255-1DB9FA3BE552","step":"questionset","thematics":[],"campaign_id":123456,"campaign_guid":"54973303-E076-4C85-94FA-63F68D780181","pgi":1,"parentURL":"https://qualifio.com/product/campaign-formats/quiz/","isIdentified":1,"lg":"en","title":"My demo campaign","score":0,"preview":false,"page_path":"/123456/en/1/questionset/1","pg":1}]</script>
This data layer can be used by any JavaScript (for instance the ones of Google Analytics or Tag Manager).
What information is stored in the Qualifio data layer?
Information | Attribute | Type | Example value |
Participant's device | device | Text | desktop, mobile |
Acceptation of opt-ins | optins | Array of numbers (IDs of the accepted opt-ins) | [10, 24, 56] |
Submitting of forms | form_submitted | 0, 1 | On the screen right after the form was completed, the value will be 1. On all other screens of the campaign, the value will be 0. |
Winner participant | isWinner | Text | null |
Campaign hostname | domain | Provides the hostname portion of the current page | demo.qualifioapp.com |
UTM parameters | query_string | Provides the UTM parameters of the current page | ?utmsource=test&utmmedium=test |
Globally Unique Identifier of the channel | channel_guid | String of 36 characters, divided by 4 hyphens, specific per channel | B4221247-9CE4-4F3C-8255-1DB9FA3BE552 |
Campaign step name | step | Text |
intro = welcome screen |
Campaign thematics | thematics | Array of numbers (IDs of the thematics selected in the campaign) | [10, 24, 56] |
Campaign ID | campaign_id | Numeric value (6 digits) | 123456 |
Globally Unique Identifier of the campaign | campaign_guid | String of 36 characters, divided by 4 hyphens, specific per campaign | 54973303-E076-4C85-94FA-63F68D780181 |
Campaign page number | pgi | Numeric value | 2 for the second question (although it could be the third screen of your campaign) |
Campaign URL | parentURL | Returns the URL of the page loaded | https://qualifio.com/product/campaign-formats/quiz/ |
Campaign mode | isIdentified | 0, 1 | 0 in anonymous campaigns, 1 in identified campaigns |
Campaign language | lg | Two-letter ISO code | "en" for English |
Campaign title | title | As provided in Qualifio | "My demo campaign" |
Score | score | Numeric value | 15 |
Preview mode | preview | True, false | false |
Page path | page_path | Provides the path portion of the current page (/campaign_id/lg/pg/step/pgi) | /123456/en/1/questionset/1 |
Campaign screen number | pg | Numeric value | 1 for the welcome screen, 2 for the first question, 3 for the second question, etc. |