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

x/pkgsite: track JS errors and latency metrics via Google Tag Manager #40958

Closed
andybons opened this issue Aug 21, 2020 · 4 comments
Closed

x/pkgsite: track JS errors and latency metrics via Google Tag Manager #40958

andybons opened this issue Aug 21, 2020 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite

Comments

@andybons
Copy link
Member

https://philipwalton.com/articles/the-google-analytics-setup-i-use-on-every-site-i-build/ has some good info for tracking JS errors and latency metrics via Google Analytics. Since we use GTM we have to pipe the info through there.

As a note, we should not implement all recommendations in the doc above like recording client and window IDs.

Also worth looking into https://web.dev/vitals/ to see if those are more appropriate to record as well.

The implementation details can be outlined in this issue or a public doc (plus the CL will be public).

@andybons andybons added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite labels Aug 21, 2020
@andybons andybons added this to the pkgsite/design-2020 milestone Aug 21, 2020
@gopherbot
Copy link

Change https://golang.org/cl/251537 mentions this issue: content,internal,third_party: adds web vitals script for metrics tracking

@gopherbot
Copy link

Change https://golang.org/cl/251918 mentions this issue: content/static,internal/middleware: add unhandled exception tracking

gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 2, 2020
…king

Adds the web vitals script built from source to track web vitals metrics
with Google Tag Manager. This will give us more insight into how pkgsite
is performing in the wild and allow us to track changes in performance
before and after the redesign.

Updates golang/go#40958

Change-Id: Ieba237150b6a7056b5dee57911432678bb914b19
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251537
Reviewed-by: Andrew Bonventre <andybons@golang.org>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 2, 2020
Adds a handler to catch unhandled exceptions and report them to
Google Analytics.

Updates golang/go#40958

Change-Id: I9d9a501da4fea2e95a36809535b234a7d2537f02
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/251918
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/252823 mentions this issue: cmd,content,internal: create a flag to disable CSP

@gopherbot
Copy link

Change https://golang.org/cl/253597 mentions this issue: content/static: add rejected promise tracking

gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 8, 2020
Adds a handler to capture rejected promises and
report them to Google Analytics.

For golang/go#40958

Change-Id: Ic0a48d03acbe238bedb2b4eeac7dfb31a8e26d25
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/253597
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
gopherbot pushed a commit to golang/pkgsite that referenced this issue Sep 15, 2020
Adds a flag to disable CSP during local development.
Useful for debugging Google Tag Manager configuration.
Does not cause security risk because its only for local
development and you can't use runtime flags in App Engine.

For golang/go#40960
For golang/go#40958

Change-Id: I9669bd745d1bb3f78472d91142053992dde2cc6b
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/252823
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Trust: Julie Qiu <julie@golang.org>
@julieqiu julieqiu removed the website label Sep 19, 2020
@julieqiu julieqiu removed the website label Sep 19, 2020
@andybons andybons removed their assignment Oct 2, 2020
@jamalc jamalc closed this as completed Dec 2, 2020
@golang golang locked and limited conversation to collaborators Dec 2, 2021
@hyangah hyangah added the pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development label May 20, 2022
@rsc rsc unassigned jamalc Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite/frontend Issues related to pkgsite HTML/CSS/JavaScript and frontend development pkgsite
Projects
None yet
Development

No branches or pull requests

5 participants