Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create GA4 Reports using API #4807

Closed
1 task
tdlowden opened this issue Jul 10, 2024 · 0 comments
Closed
1 task

Create GA4 Reports using API #4807

tdlowden opened this issue Jul 10, 2024 · 0 comments
Assignees
Labels
metrics Stats, metrics and data visualizations of catalog

Comments

@tdlowden
Copy link
Member

tdlowden commented Jul 10, 2024

User Story

In order to populate a metrics dashboard datagov team wants API query reports structured to feed into a UI.

Acceptance Criteria

  • GIVEN datagov GA4 is collecting web analytics data
    WHEN a nightly job happens
    THEN a set of configured API queries to create the reports outlined here should run and return data. Reports shown in sketch.

Background

These queries are needed to populate the charts in the metrics UI and agency pages

Security Considerations (required)

At some point, the connection to the GA4 API may need to be added into the system diagram

Sketch

TBD by @robert-bryson

Reports

“Global site reports”
These reports represent metrics across the site, and will not be filterable by organization.

My thought on these is that they would be at the top of the (or every) page, sort of “pinned” above the org-specific charts/viz.

Report: Total pageviews
Description: Total pageviews to catalog.data.gov and data.gov in the last 30 days
Format: Number
Exploration Report - “Dashboard - Pageviews”

Report: Top search terms
Description: Most used search terms in the last 30 days
Format: Table with search terms and number of searches, and potentially a bar chart to represent volume
Exploration report - “Dashboard - Search Terms”

Report: Device Breakdown
Description: Breakdown of visits by device type in the last 30 days
Format: Pie chart with % of visits from desktop, mobile, tablet
Exploration Report - “Dashboard - Device Breakdown”

“Agency-specific reports”
All below metrics will be filtered by a dropdown that defaults to “All Data.gov” data, and contains choices to display data for a given organization. Also, an option to download a larger set of data must be available (either for each report individually or as a single, collated downloadable file).

In theory, these would all sit below the global site reports at the top. The default /metric page, unfiltered for org, could show all these reports in aggregate.

Report: Total Current Datasets
Description: Total datasets and/or collections discoverable on catalog.data.gov
Format: Number
Report - This is NOT from GA; it is data we have currently at https://catalog.data.gov/report/metrics-dashboard

Report: Total Current Harvest Sources
Description: Total metadata harvest sources
Format: Number
Report - This is NOT from GA; it is data we have currently at https://catalog.data.gov/report/metrics-dashboard

Report: Most viewed dataset pages
Description: Top 10 dataset pages by pageviews in the last 30 days
Format: Table with dataset name, URL (possibly hyperlinked?), pageviews, and potentially a bar visualization to represent volume
Filter: limit to dataset pages and not search pages or documentation on catalog
Exploration Report - “Dashboard - Top Datasets” (will need to be filtered by datagov_organization when possible)

Report: Most downloaded files
Description: Top 10 files by download count in the last 30 days
Format: Table with file URL, downloads count, and potentially a bar visualization to represent volume
Exploration Report - “Dashboard - File Downloads” (will need to be filtered by datagov_organization when possible)

Report: Most clicked outbound links
Description: Top 10 external link clicks
Format: Table with link URL, clicks count, and potentially a bar visualization to represent volume
Exploration Report - “Dashboard - Outbound Links” (will need to be filtered by datagov_organization when possible)

@tdlowden tdlowden added the metrics Stats, metrics and data visualizations of catalog label Jul 10, 2024
@tdlowden tdlowden moved this to 🏗 In Progress [8] in data.gov team board Jul 10, 2024
@btylerburton btylerburton moved this from 🏗 In Progress [8] to 👀 Needs Review [2] in data.gov team board Jul 30, 2024
@btylerburton btylerburton moved this from 👀 Needs Review [2] to ✔ Done in data.gov team board Jul 31, 2024
@Bagesary Bagesary moved this from ✔ Done to 🗄 Closed in data.gov team board Aug 1, 2024
@github-project-automation github-project-automation bot moved this from 🗄 Closed to ✔ Done in data.gov team board Sep 3, 2024
@btylerburton btylerburton moved this from ✔ Done to 🗄 Closed in data.gov team board Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics Stats, metrics and data visualizations of catalog
Projects
Archived in project
Development

No branches or pull requests

3 participants