Skip to content

Add event tracking use GA #6940

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

Merged
merged 10 commits into from
Jul 22, 2025
Merged

Add event tracking use GA #6940

merged 10 commits into from
Jul 22, 2025

Conversation

yangw-dev
Copy link
Contributor

@yangw-dev yangw-dev commented Jul 17, 2025

Desription

Add google analytics utils to track UI usage.

By default, each page will have a sessionId to track the user interaction flow for targeting UI components (such as click button, scroll etc). If user navigate to another page in a new tab, Or close the page and reopen, it will create a new session id,

This pr provides two ways to target ui components:

  1. add method
  2. add attribute

Please see the pr for more details.

Signed-off-by: Yang Wang <[email protected]>
Copy link

vercel bot commented Jul 17, 2025

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

Name Status Preview Updated (UTC)
torchci ✅ Ready (Inspect) Visit Preview Jul 21, 2025 10:31pm

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 17, 2025
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev changed the title setup link Add event tracking use GA Jul 18, 2025
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev requested a review from clee2000 July 21, 2025 21:35
@yangw-dev yangw-dev marked this pull request as ready for review July 21, 2025 21:38
@yangw-dev yangw-dev requested a review from wdvr July 21, 2025 21:38
@yangw-dev
Copy link
Contributor Author

Added some example use cases for this in pr @clee2000

@@ -103,6 +103,10 @@ function WorkflowJobSummary({
<JobButton
variant="outlined"
href={`/utilization/${m.workflow_id}/${m.job_id}/${m.run_attempt}`}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

how to us the data-ga atrributes

- TorchCI front-end development environment is set up and running locally
- Chrome browser installed
- Install chrome extension [Google Analytics Debugger](https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna)
- Make sure you have permission to the GCP project `pytorch-hud` as admin. If not, reach out to `oss support` or `pytorch dev infra team` to add you
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably add that oss support is internal

pytorch dev infra team can use @pytorch/pytorch-dev-infra and I think GH will be link our team automatically

Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev merged commit 2baa712 into main Jul 22, 2025
5 checks passed
@yangw-dev yangw-dev deleted the analyze branch July 22, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants