sul-dlss / wallscreens

📺 curated experiences for touch-screen installations on the stanford campus
Other
1 stars 0 forks source link

Use GA debug mode for non-prod deployments #189

Closed thatbudakguy closed 2 years ago

thatbudakguy commented 2 years ago

fixes #121 mutually exclusive with #181

opened this because i discovered an alternative way to separate development/production traffic, which seems in keeping with the "new" (v4) google analytics, and doesn't use the poorly documented "custom dimensions" feature. GA4 has what it calls "data filters", which out of the box can look for "internal traffic" and "developer traffic". the former isn't meaningful to us, but the latter is interesting because it enables the "debugview" (under "configure") which provides near-live feedback (see below screenshot).

this approach, which is simpler than #181, just turns on "debug mode" if JEKYLL_ENV isn't set to "production", which will mark all events triggered from that session/deploy as "developer traffic". for the moment this doesn't exclude them from analytics, but we can later change the filter's state to "active" if we want and it will exclude the traffic. even when traffic is excluded, you can still use the live debugview.

Screen Shot 2021-11-10 at 10 04 21 AM

netlify[bot] commented 2 years ago

✔️ Deploy Preview for sul-wallscreens ready!

🔨 Explore the source changes: 8740ad11626ada32d46900e36b0d44c1308717bf

🔍 Inspect the deploy log: https://app.netlify.com/sites/sul-wallscreens/deploys/618c0adbcd96c4000856e6b4

😎 Browse the preview: https://deploy-preview-189--sul-wallscreens.netlify.app

cbeer commented 2 years ago

Worth trying out at least 🤷‍♂️