Skip to content

Instantly share code, notes, and snippets.

View JWDobken's full-sized avatar
🌻

Joost Döbken JWDobken

🌻
View GitHub Profile
@zjeaton
zjeaton / _Google Analytics 4 with Hugo.md
Last active March 28, 2024 14:34
Google Analytics 4 (with Measurement ID) in Hugo

Google Analytics 4 in Hugo

Blog post with slightly more detail can be found here. If you want to just get to it, read on.

I (very) recently decided to reimplement GA in my site, and found that existing implementation in Hugo was not compatible with GA4's new Measurement ID. This is an easy way to drop your Measurement ID into your site. I'm not going to go into how to sign up for GA.

This implementation requires that you create a site parameter for analytics, create a partial, and call the partial. I tweaked the names of the parameters and files so they didn't collide with the built-in hugo code.

Place the GoogleAnalyicsID (Measurement ID) in config.toml within [params].

@neilgaietto
neilgaietto / gist:0e73043d38653c98e366897c13e7e333
Created August 30, 2020 21:53
gitlab CI for deploying a quasar app to gitlab
Copied from Quasar Discord
gitlab CI for deploying a quasar app to gitlab
# Modified from https://knasmueller.net/vue-js-on-gitlab-pages
pages:
image: node:latest
stage: deploy
script:
- npm install -g @quasar/cli
- npm install --progress=false