Add body data elements for pageview context
What does this MR do?
Adds 3 new body data elements for page_type_id
, project_id
, and namespace_id
Related to: https://gitlab.com/gitlab-org/telemetry/issues/110
Additional body data elements are needed in order to construct the Snowplow pageview context:
{
schema: "iglu:com.gitlab/pageview_context/jsonschema/1-0-0",
data: {
page_type: 'projects:issues:show', --example uses existing body element 'page' value
page_type_id: 1317, --the ID of the issue in this page_type example
namespace_id: 4347861, --the namespace ID of the project
project_id: 4409640, --the Project ID for the issue
}
}
page_type
- will use the value of the existing body data element page
page_type_id
- will return the ID of the controller type being viewed
namespace_id
- will return the ID of the namespace for the controller object
project_id
- will retun the Project ID for the controller object
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Jackie Fraser