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

Update Reporter to output both UA and GA4 data in reports #769

Merged
merged 200 commits into from
Feb 8, 2024

Conversation

scottqueen-bixal
Copy link
Contributor

@scottqueen-bixal scottqueen-bixal commented Jan 31, 2024

This is the complete work of our MVP for migrating from UA reporting to GA4.

Summary

The new repo structure places v1, or UA reporting under the ua directory and updates the application in src to report on v2, or new GA4 data using the BETA Google Data Client.

Other changes/updates in this PR includes:

  • Adds a .nvmrc file for easy node version management in local development.
  • Updates the node run time to v20.x which will be the long term support version of nodejs until Q1 2026.
  • Updates node package dependencies for new v2.0 version of the application
  • Updates AWS SDK dependency to version 3.x because version 2.x will be deprecated in the near future.
  • Updates README.md to reflect impacts from migration
  • Updates cron.js to support monorepo set up for running both UA(legacy) and GA4(new) reporter applications
  • Updates ENV values in our <agency>.env files to support new GA4 properties
  • Updates ENV example to include required GOOGLE_APPLICATION_CREDENTIALS
  • Updates knex file to support reporter tests
  • Includes new migration to create analytics_data_ga4 table for GA4 data. UA will continue to use analytics_data table
  • Updates reports/, api.json, reports.json, and usa.json to use GA4 query schema and allowed values
  • Updates src/* to handle changes in Google Data Client API requirements
  • Removes unused files from legacy v1 app and moves the app into the ua directory
  • Updates testing suite to include both v1 and v2 app unit tests
  • Updates docker set up for local testing in docker database
  • Enables Circle CI test in build
  • Consolidates and improves application logging

scottqueen-bixal and others added 17 commits February 2, 2024 06:12
Multiple loggers were initialized throughout the app with differring config.  Replace with calls
to the application logger .initialize method.  Also adds an application log level which can be set
with ANALYTICS_LOG_LEVEL env var.
Catch execution errors in index.js and log them appropriately.
Remove duplicate log level tags from being output in cron.js
Replace missed logger in ua/index.js
Handle totals correctly when report data is empty
Copy link
Contributor

@XavierMetichecchia XavierMetichecchia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@XavierMetichecchia XavierMetichecchia merged commit 228e7d3 into stage Feb 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment