Populate dataset identifier into GA4 data
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 200
- Avg merge
- 4h 56m
- Merged PRs (30d)
- 5
Description
## User Story
In order to allow agencies to better consume data.gov's metrics reports, and tie them directly to metrics on the agency side, datagovteam wants to add populate the dataset identifier into the GA4 data layer.
## Acceptance Criteria
[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using [BDD](https://en.wikipedia.org/wiki/Behavior-driven_development#Behavioral_specifications).]
- [ ] GIVEN I am on a dataset page,
AND I make a call to GA4 data layer
THEN I want to add the dataset identifier as an additional property in the payload
- [ ] GIVEN I am modifying the metrics report code
AND I want to update the "most viewed dataset pages per organization" report
THEN I want to add the dataset identifier as an additional dimension [[link](https://github.com/GSA/data.gov/blob/main/metrics/datagov_metrics/ga.py#L57C11-L57C60)]
- [ ] GIVEN I on an organizations metrics page
THEN I want to see the dataset identifier listed as an additional column in the Most Viewed Dataset Pages
report
## Background
[Any helpful contextual notes or links to artifacts/evidence, if needed]
## Security Considerations ([required](https://nvd.nist.gov/800-53/Rev4/control/CM-4))
[comment]: # "Our SSP says 'The Data.gov team ensures security implications are considered as part of the agile requirements refinement process by including a section in the issue template used as a basis for new work.' so please don't remove this section without care."
[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]
## Sketch
- [ ] Add dataset identifier to GA4 payload for dataset pages
- [ ] Modify dataset report to include the identifier as an extra dimension in the Most Viewed Dataset Pages report
- [ ] Modify org metrics template to surface this additional dimension in the appropriate table
Contributor guide
Assessment
This issue has not been assessed yet.