Through the pageview event you can collect additional data on every page, such as the article category. The data points you collect, and their structure, is determined by the pageview event schema.
In this article we explain how our pageview event schema works, list some examples and share our recommended process for deciding your schema.
About the Pageview Schema
Every time a user views any page on your site (where Permutive is live), Permutive will collect a pageview event. This event includes our default information and can also be enriched, automatically, with location and contextual information about that page. You can also choose to include additional info, from what is available on the page. You can choose to make a data point optional so that it is collected on same pages, and not others.
Every Permutive event is collected as a JSON object. This event contains the properties (data points) that are being collected. The structure of these properties is the event schema. This structure, the schema, describes the objects each properties fall into (how they are grouped) and their type (integer/ string etc.).
Permutive allows optional properties, so if the data is not available the event will be collected and that property will be null.
Note: Permutive enforces schema validation, so if the event comes in with the wrong structure, or the properties have the wrong type then the event will not be collected.
Add New Data and Stop Collecting Data
You can always start collecting new data points, and stop sending in data for existing data points. This is possible because Permutive events supports schema migration.
To add new properties, please email firstname.lastname@example.org with the objects/ properties you want to add, and their types. You must then update the Permutive script to send in those properties, on the sites where you want to collect this data.
The following examples look at different properties a publisher wishes to collect, and how they choose to structure these in their pageview event schema. To see examples of what other publishers have used as their schemas, see here.
Example 1: Contextual Data
This publisher wants to collect all the editorial data available on their page. To do this, they collect the following variables:
- Author (String)
- Category (String)
- Date Published (Timestamp)
- Description (String)
- Section (String)
- Tags (List of Strings)
- Type (String)
As all these data points are related to the page content, it makes sense to group them into a single 'content' object. So when selecting the properties in the segment builder they are prefixed by “content."
Example 2: Product Data
The same publisher has some pages that contain product information. They only want to collect product information on those pages. To do this they simply collect additional 'product' properties:
- Price (Integer)
- Name (String)
- Brand (String)
As these data points are part of the page content it makes sense to create a product object, within the content object. So when selecting the properties in the segment builder they are prefixed by “content.product.”
Example 3: Site Data
The same publisher wants to collect the category of each site on every pageview. To do this, they collect an additional property
- Site Category (String)
As this data point is not related to content it makes sense to create a new site object, separate to the content object. So when selecting the property in the segment builder it is prefixed by “site.”
Recommended Process for Deciding Your Schema
Here are the steps we recommend for choosing your pageview event schema:
- Create a document of each of the variables you would like to collect on each site, in each platform
- List all of your sites, and the platforms you will be deploying Permutive in (web/ fia/ amp)
- For each site, in each platform, list all the variables that are available on the page
- Highlight the variables you would like to collect
- Meet with your CSM to review this document and agree on the best schema to begin with. For publishers, we usually recommend beginning with a single content object that contains editorial meta-data from your page.
Once you have chosen your pageview event schema, we will work with you to set up the tag and continue your deployment.