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

MPP-2822: add gtag to Layout and update gaEvent hook to ping both GA endpoints #4796

Merged
merged 4 commits into from
Jun 24, 2024

Conversation

groovecoder
Copy link
Member

@groovecoder groovecoder commented Jun 18, 2024

Add GA4

Screenshot

image

How to test

  1. Checkout this branch
  2. In frontend/ run npm run dev
  3. Go to http://localhost:3000/
  4. Go to https://analytics.google.com/analytics/web/#/p314403930/realtime/overview
    • Verify you see your traffic in the realtime report
  5. In frontend/ run npm run build
  6. In app root, run python manage.py collectstatic
  7. In app root, run python manage.py runserver
  8. Go to http://127.0.0.1:8000/
  9. Go to https://analytics.google.com/analytics/web/#/p314403930/realtime/overview
    • Verify you see your traffic in the realtime report

Checklist (Definition of Done)

  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • Customer Experience team has seen or waived a demo of functionality.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • I've added or updated relevant docs in the docs/ directory
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.
  • All UI revisions follow the coding standards, and use Protocol tokens where applicable (see /frontend/src/styles/tokens.scss).
  • Commits in this PR are minimal and have descriptive commit messages.
  • l10n changes have been submitted to the l10n repository, if any.

@groovecoder groovecoder changed the title Simple ga4 MPP-2822: add gtag to Layout and update gaEvent hook to ping both GA endpoints Jun 18, 2024
@groovecoder groovecoder marked this pull request as ready for review June 20, 2024 18:50
@groovecoder groovecoder requested a review from rafeerahman June 20, 2024 18:50
Copy link
Contributor

@rafeerahman rafeerahman left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM, verified that the ga events and googletagmanager show up locally.

@@ -59,7 +60,6 @@ We collect data for the following extension events:

- When panel navigation arrow icons are clicked


### In-page events:

- When the Relay icon is injected into an email input
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we need to make any updates in the add-on?

Copy link
Member Author

Choose a reason for hiding this comment

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

Wow good catch. I'd like to get this part merged so we can test it ASAP, since the website more directly supports the Firefox integration, which is our current priority. I filed https://mozilla-hub.atlassian.net/browse/MPP-3831 as a follow-up to update the metrics_event endpoint for GA4.

*
* @param props
*/
export const GoogleAnalyticsWorkaround = (
Copy link
Contributor

Choose a reason for hiding this comment

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

curious, whats the purpose of this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copied from Monitor code, TBH. Sounds like it's the same as GoogleAnalytics but it accepts a nonce parameter. I'll dig in to see if we can remove that.

@groovecoder groovecoder added this pull request to the merge queue Jun 24, 2024
Merged via the queue into main with commit 5384161 Jun 24, 2024
29 checks passed
@groovecoder groovecoder deleted the simple-ga4 branch June 24, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants