Skip to content

Comments

Support privacy improvements for Google Analytics#55

Open
mthmulders wants to merge 1 commit intoenten:masterfrom
mthmulders:apply-google-analystics-improvements-from-hugo
Open

Support privacy improvements for Google Analytics#55
mthmulders wants to merge 1 commit intoenten:masterfrom
mthmulders:apply-google-analystics-improvements-from-hugo

Conversation

@mthmulders
Copy link
Contributor

This pull requests copies the internal Google Analytics template that ships with Hugo 0.41 and higher. It supports a few improved privacy options.

Alternatively, instead of copying (and slightly modifying it), we could do

{{ template "_internal/google_analytics.html" . }}

But this does not work with Hyde currently. It would mean that the Google Analytics key needs to move:

# new location
googleAnalytics = "UA-XXXXXXXX-X"

# old location
[params]
googleAnalytics = "UA-XXXXXXXX-X"

This would break for existing users of Hyde, so it might or might not be a good idea. The benefit is that Hyde will automatically use improvements in the Hugo built-in Google Analytics integration, the drawback is that users need to update their config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant