Qualifio data layer

Olivier de Lamotte -

In the header of every page of a Qualifio campaign is a small script. This script is Qualifio data layer (qlfDataLayer). A data layer is an object that contains all of the information that you might want to pass to third-party tools, such as Google Tag Manager. It gives you the opportunity to know exactly at which stage of a campaign a participant is at, mainly for reporting purposes.

What types of data are in there?

This data layer (= QlfDatalayer) is composed of the following components:

  • ‘title’ = Title of the campaign 
  • ‘campaign_id’ = Identifier of the campaign (= 6 numbers)
  • ‘campaign_guid’ = Globally Unique Identifier of the campaign (= String of 36 characters, divided by 4 hyphens, specific per campaign)
  • ‘channel_guid’ = Globally Unique Identifier of the channel (= String of 36 characters, divided by 4 hyphens, specific per channel)
  • 'parentURL' = URL of the campaign (or URL where the campaign is integrated for an iframe)
  • 'domain' = Domain of the campaign (given in Qualifio)
  • ‘device’ = Device used
  • ‘lg’ = Language of the campaign
  • ‘pg’ = Page in the global flow of the campaign (eg: Welcome screen = 1, 1st question = 2, etc.)
  • ‘step’ = Name of the step the user is in (eg: intro = welcome screen, questionset = questionnaire, identityset = form, exit = exit screen)
  • ‘pgi’ = Internal page of the game flow (eg: Question 2 = 2, although it can be the third screen)
  • ‘page_path’ = Path of the page of the user (replacing data from the session). The standard path is: /‘campaign_id‘/‘lg’/‘pg’/’step’/’pgi’.
  • 'optins' = Array of IDs of the opt-ins and co-registrations that were accepted by the participant. E.g. [87, 189, 1001].
  • 'form_submitted' = 1 in the screen right after the form was completed. In all other screens, the value will be 0.
  • 'isIdentified' = 0 in anonymous campaigns, 1 in identified campaigns.

What does a data layer look like?

<script>qlfDataLayer = [{'title': 'Your Survey Title','campaign_id': '705182','campaign_guid': '72D8EE15-101F-436C-AA86-E1C9B4A8ECF4','channel_guid': '212B4155-4E9C-4E7F-A4AB-955416FC1E48','parentURL': 'https://events.qualifioapp.com//705183_1/index.html','domain': 'events.qualifioapp.com','device': 'desktop','lg': 'en','pg': '1','step': 'alreadyplayed','pgi': '1','page_path': '/705182/en/1/alreadyplayed/1','optins': [],'form_submitted': 0,'isIdentified': 1}];</script></head>

This data layer can be used by any JavaScript (for instance the ones of GTM or GA).