In this article
We explain custom events, how our pageview event schema works, list some examples and share our recommended process for deciding on your custom schema.
These events are set up by your Solutions Architect on a case by case basis. If you have further questions, please reach out to firstname.lastname@example.org or message your Customer Success Manager.
About the Pageview Schema
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.
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 the 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 or 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 email@example.com 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.
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 cohort builder they are prefixed by “content."
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 cohort builder they are prefixed by “content.product.”
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 cohort 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.
If you have any questions, please contact customer support by emailing firstname.lastname@example.org or chat to the Customer Operations Team via the LiveChat icon in the bottom right corner of your screen.