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

Add GA4 Tracking events #457

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Add GA4 Tracking events #457

wants to merge 13 commits into from

Conversation

TuukkaIkius
Copy link
Contributor

@TuukkaIkius TuukkaIkius commented Apr 30, 2024

Changes

  • Added TrackingEvent helper function for Datalayer events
  • Added Page View event
  • Added 30s Page View Event
  • Added InternalLinkClick tracking events to components/Link

Next PR: https://github.com/gravitational/next/pull/2479
Blog PR: https://github.com/gravitational/blog/pull/532

Merge checklist

  • Disable Events on GTM
    • GA4 - Main - Custom Scroll
    • GA4 Pageview
    • GA4Event - 30s Page View
    • GA4Event - Form Submission - Cloud Trial Signup
    • GA4Event - Form Submission - Contact Sales
    • GA4Event - Form Submission - Contact Us Form
    • GA4Event - Form Submissions - Resource Download
    • GA4Event - Form Submissions - Subscribe
    • GA4Event - Internal Link Click
    • GA4Event - Pricing => Contact Sales Conversion
    • GA4Event - Pricing => Trial Signup
    • GA4Event - Self Service Sign Up from /pricing/ page
    • GA4Event - Teleport Downloads
  • Merge the PRs

Testing Checklist

  •  Pageview events fire on page load
  •  30s Pageview fires after spending 30s on the same page
  • Internal Link Clicks should send tracking data

Copy link

vercel bot commented Apr 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2024 7:57am

Copy link
Contributor

@avatus avatus left a comment

Choose a reason for hiding this comment

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

Something might be tangled in the recent PRs. they all have this same engaged code instead of only the pixel code. Could you take a look?

@TuukkaIkius
Copy link
Contributor Author

Something might be tangled in the recent PRs. they all have this same engaged code instead of only the pixel code. Could you take a look?

Yes this is on purpose. For convenience I based these tracking PRs off the Initial GTM Migrations branch as they all use the same logic for tracking their respective engaged view events. In hindsight probably a bad move but that PR will be merged before these other tracking event PRs so I don't imagine there will be issues.

@avatus
Copy link
Contributor

avatus commented Jun 24, 2024

Ah ok, no worries. In the future, if you open the PR against the branch that another PR is open for, when that base branch merges, all the other PRs automatically get rebased to master. Makes it easier on you!

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