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

Omit UA- part in GA template #11802

Closed
ytrepidorosonomous opened this issue Dec 13, 2023 · 3 comments · Fixed by #12299
Closed

Omit UA- part in GA template #11802

ytrepidorosonomous opened this issue Dec 13, 2023 · 3 comments · Fixed by #12299

Comments

@ytrepidorosonomous
Copy link

ytrepidorosonomous commented Dec 13, 2023

With UA- deprecated, I think this part can be omitted?

https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/google_analytics.html#L14

cc @jmooring

@coliff
Copy link
Member

coliff commented Feb 6, 2024

I agree that it can be removed. This part can be removed too:

{{ if $pc.AnonymizeIP }}ga('set', 'anonymizeIp', true);{{ end }}

Such an option does not exist at all with GA4 - all hits are anonymized by default and it's impossible to change that.
REF: https://support.google.com/analytics/answer/2763052?hl=en#:~:text=In%20Google%20Analytics%204%2C%20IP%20masking%20is%20not%20necessary%20since%20IP%20addresses%C2%A0are%20not%20logged%20or%20stored.

@saikadaramakaisosjupita

Related to #10093 . This looks like a simple fix.

jmooring added a commit to jmooring/hugo that referenced this issue Mar 23, 2024
Google Analytics 4 (GA4) replaced Google Universal Analytics (UA)
effective 1 July 2023.

See https://support.google.com/analytics/answer/11583528.

Changes:

- Update tpl/tplimpl/embedded/templates/google_analytics.html
- Remove tpl/tplimpl/embedded/templates/google_analytics_async.html
- Remove extraneous config settings

Closes gohugoio#11802
Closes gohugoio#10093
jmooring added a commit to jmooring/hugo that referenced this issue Mar 23, 2024
Google Analytics 4 (GA4) replaced Google Universal Analytics (UA)
effective 1 July 2023.

See https://support.google.com/analytics/answer/11583528.

Changes:

- Update tpl/tplimpl/embedded/templates/google_analytics.html
- Remove tpl/tplimpl/embedded/templates/google_analytics_async.html
- Remove extraneous config settings

Closes gohugoio#11802
Closes gohugoio#10093
jmooring added a commit to jmooring/hugo that referenced this issue Mar 23, 2024
Google Analytics 4 (GA4) replaced Google Universal Analytics (UA)
effective 1 July 2023.

See https://support.google.com/analytics/answer/11583528.

Changes:

- Update tpl/tplimpl/embedded/templates/google_analytics.html
- Remove tpl/tplimpl/embedded/templates/google_analytics_async.html
- Remove extraneous config settings

Closes gohugoio#11802
Closes gohugoio#10093
bep pushed a commit that referenced this issue Mar 26, 2024
Google Analytics 4 (GA4) replaced Google Universal Analytics (UA)
effective 1 July 2023.

See https://support.google.com/analytics/answer/11583528.

Changes:

- Update tpl/tplimpl/embedded/templates/google_analytics.html
- Remove tpl/tplimpl/embedded/templates/google_analytics_async.html
- Remove extraneous config settings

Closes #11802
Closes #10093
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants