User stories
- As a data analyst, I want to be able to categorize the different page types
- As a data analyst, I want to use the same pageType standards for the Planet 4 websites
Problem:
The dataLayer values for ‘pageType’ must be fixed. The rule today is not complete, so we are getting a lot of blank or unknown values.
Check a few screenshots (examples attached) on this ticket or the table below:
Page | Value |
Homepage | Front page |
Post pages | Post pages |
Tags | <category related to the tag> |
Category | Unknown page |
Post type pages | <blank> |
Evergreen | <blank> |
Other pages (e.g Act) | Unknown page |
Suggestion:
Define the ‘pageType’ value based on the wordpress structure (e.g tags, post types), the admin choices on the Planet 4 WP Settings (homepage, act, explore, issues) or the page template used (default, evergreen).
Page | Value | Comment |
Homepage | Homepage | If not possible to categorize as Homepage, use ‘Default page’ |
Act | Act | This is defined on the Planet 4 Admin Settings. If not possible to categorize as Act, use ‘Default page’ |
Take Action | Take Action | This is defined by the child pages of the Act page. If not possible to categorize as Take Action, use ‘Default page’ |
Explore | Explore | This is defined on the Planet 4 Admin Settings. If not possible to categorize as Explore, use ‘Default page’ |
Category (Issue) | Issue Page | This is defined by the child pages of the Explore page. If not possible to categorize as Issue, use ‘Default page’ |
Post pages | Post Page | |
Tags | Tag Page | |
Post type pages | Post Type Page | |
Evergreen | Evergreen Page | |
Pages | Default Page | |
Campaign | Campaign Page | (CPP Project) |
Instructions:
- Update the script that is defining the rules for the ‘pageType’ value
- Insert the pagetype datalayer.push on all Planet 4 pages:
dataLayer.push({
'pageType' : '[value should be according to the rules above]',
});