Zephr has the ability to integrate with your web analytics platform and third party systems by writing user information to a data layer.
A data layer is a JSON data object found within a user’s browser for integration with third-party systems, commonly analytics platforms such as Google Analytics and Adobe Analytics. By writing to a user’s data layer, Zephr is able to share vital behavioural, journey and usage information. The data layer is user and browser-specific and is written to with each page view. This is known as a data layer push.
A data layer is made up of a list of key/value pairs. A key is a category of things – for example, the user attribute ‘City’. Each key can have different values – so a user may have a key/value pair of City: London, or of City: New York, depending on the details they have provided. Likewise, when using a Zephr meter count as a key, you will see varying values for each user.
Why use Zephr Web Analytics?
Zephr Web Analytics can be incredibly helpful for recording and analysing core user behaviour and consumption patterns. Some examples of how our clients are using Web Analytics include:
- Monitoring meters and credits remaining to examine how free trials are being consumed
- Using Test Group analytics to monitor results of A/B testing within Zephr Rules
- Monitoring the number of active sessions to track fair use of subscriptions
Configuring your Data Layer with Zephr
To configure your data layer with Zephr, navigate to Settings > Web Analytics within your Zephr Admin Console.
Within this page, you will see two sections. The first section, Configuration, is where you name your data layer. By default, this is set to dataLayer – the name commonly used with Google Analytics. Enabling Data Layer Fetch calls the Zephr datalayer end point and pushes the information to windows.dataLayer for a tag manager to pick up.
The second section is Fields. In this section you will configure the information you wish Zephr to write to the data layer, to be ingested by your analytics platform.
To add a variable, click Add Field then choose the variable you would like written from the Selector Type field. Selector Types include:
Choose a specific bundle to write data on, including options for the following attributes:
- isAssigned: whether the user has the Bundle assigned or not
- startDate: the date the Bundle was assigned to the user
- endDate: the expiration date of the Bundle grant
Choose a specific entitlement to write data on, including options for the following attributes:
- isAssigned: whether the user has the Entitlement assigned or not
- startDate: the date the Entitlement was assigned to the user
- endDate: the expiration date of the Entitlement grant
Choose a specific attribute from your Zephr User Schema. The data layer will populate the value as the information stored against that users. For example, choosing a First Name as your user attribute could write to the data layer as first-name: Gwen.
Choose to write data on the following activities:
- loggedIn: delivers a true/false on whether the user is logged in at the time of the data layer being written
- activeSessions: states the number of active sessions the user currently has
- trackingId: writes the user’s Zephr Tracking ID to the data layer
Choose a specific meter to write data on, including options for the following attributes:
- remainingCredits: states the number of credits a user has remaining on their meter
- refreshTime: states the amount of time until the meter refreshes
- usedCredits: states the number of credits a user has consumed with their meter
Choose a specific credit to write data on, including options for the following attributes:
- remainingCredits: states the number of credits a user has remaining
- usedCredits: states the number of credits a user has consumed
Choose a specific Test Group per field, with the data layer specifying whether the user falls into Group A or Group B.
Following your field selection, you will need to enter a Label and a Key for the Selector Type you have chosen. Your label is for internal use, whilst your Key will be used by the system that is reading the data layer – for example Google Analytics. As such, these keys will also need to be set up as variables within your analytics platform. Consult the help section of your analytics platform for more information.
Once you have added your full list of data layer fields, click Save. Following this, the fields you have specified will be written to a user’s data layer with every page load.