Repository navigation
Send GA hits through the Google tag, keep the deploy going, and version asset URLs - #73
Merged
Merged
Conversation
…t URLs A refused stats call stopped the whole deploy. The stats script now keeps last week's numbers when GitHub refuses or fails. Each deploy adds its commit to script and style URLs, so browsers holding the previous files for ten minutes do not run old scripts against new pages. CONTRIBUTING notes that deleting gh-pages takes the site down.
Loading the script from the Google tag was not enough: with only the measurement ID configured, gtag still waited on that ID's missing script and sent nothing. Configuring the Google tag itself, as GA's install guide for the stream does, delivers the page view and events to the hub property; a test event from the live hub showed up in its realtime report.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happened on 10/25
gh-pages.gh-pagesalong with the merged branches.The site is back: I re-ran the push deploy to recreate
gh-pagesand set Settings → Pages togh-pages/ root again.This PR keeps the same thing from taking the site down again.
Changes
ga.jsnow configures the Google tag (G-BEBVKYH8HL), which is the snippet GA's install guide gives for the hub stream.G-C5V0X2SGD3configured gtag kept waiting on that ID's missing script and still sent nothing.ga_check3), the page view and session_start appear in the hub property's realtime report. Before that, the deployed page sent nothing.update_stats.py: a refused or failed GitHub call keeps last week'sstats.jsonand exits normally, so the rest of the deploy still runs.?v=<commit>to everyassets/js/*.jsandassets/css/*.cssURL in the published HTML. This covers the home page, article, game, lab, 404 and Builder pages.hub.jsandga.js.gh-pages.Checked
?v=, including the/assets/...paths on Builder pages.Generated by Claude Code