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

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

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

andybons opened this issue Aug 21, 2020 · 4 comments

Comments

@andybons
Copy link
Member

@andybons andybons commented Aug 21, 2020

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).

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 31, 2020

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

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 31, 2020

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

@gopherbot gopherbot commented Sep 2, 2020

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

@gopherbot
Copy link

@gopherbot gopherbot commented Sep 8, 2020

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>
@gopherbot gopherbot added the go.dev label Sep 18, 2020
@julieqiu julieqiu removed the go.dev label Sep 19, 2020
@gopherbot gopherbot added the go.dev label Sep 19, 2020
@julieqiu julieqiu removed the go.dev label Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.