Skip to content

Restore the gtag JavaScript function to re-enable metrics#188

Open
carljparker wants to merge 1 commit into
masterfrom
carljparker/restore-gtag-function
Open

Restore the gtag JavaScript function to re-enable metrics#188
carljparker wants to merge 1 commit into
masterfrom
carljparker/restore-gtag-function

Conversation

@carljparker

Copy link
Copy Markdown

The associated issue is in the pytorch/tutorials repository:

Issue #2696 · [BUG]
No longer collecting star-rating data...since transition to GA4 pytorch/tutorials#2696

The gtag function is used by metrics such as star-rating in the tutorials repository (which leverages pytorch_sphinx_theme).

The definition for the gtag function was deleted in the transition to Google Analytics 4 (GA4) in PR#182, which in-turn broke our metrics.

This commit restores the definition of the function to re-enable these metrics.

The associated issue is in the pytorch/tutorials repository:

Issue #2696 · [BUG]
No longer collecting star-rating data...since transition to GA4
pytorch/tutorials#2696

The gtag function is used by metrics such as star-rating in the
tutorials repository (which leverages pytorch_sphinx_theme).

The definition for the gtag function was deleted in the transition to
Google Analytics 4 (GA4) in PR#182, which in-turn broke our metrics.

This commit restores the definition of the function to re-enable these
metrics.

@svekars svekars left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not have a way to test this but approving to unblock. Make sure to verify that this is indeed working.

@meta-cla

meta-cla Bot commented May 20, 2026

Copy link
Copy Markdown

Hi @carljparker!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants