1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Add new fields to analytics event context: status, page_type, page_document_type (#21115)

* Add new fields to analytics event context: status, page-type, page-document-type

* Update schema-event.js

* Typescript

* Add status meta to error pages

* Update DefaultLayout.tsx

* Update DefaultLayout.tsx

* Update building-and-testing-nodejs-or-python.tsx
This commit is contained in:
Kevin Heis
2021-08-26 14:58:45 -07:00
committed by GitHub
parent 5cf83e524d
commit 4d0e9c70a3
12 changed files with 55 additions and 30 deletions

View File

@@ -63,6 +63,22 @@ const context = {
description: 'The language the user is viewing.',
enum: Object.keys(languages),
},
page_document_type: {
type: 'string',
description: 'The generic page document type based on URL path.',
enum: ['homepage', 'early-access', 'product', 'category', 'mapTopic', 'article'], // get-document-type.js
},
page_type: {
type: 'string',
description: 'Optional page type from the content frontmatter.',
enum: ['overview', 'quick_start', 'tutorial', 'how_to', 'reference'], // frontmatter.js
},
status: {
type: 'number',
description: 'The HTTP response status code of the main page HTML.',
minimum: 0,
maximum: 999,
},
// Device information
os: {