-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: remove deprecated google analytics reference in head.html #435
Conversation
ERROR deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.133.0. Use .Site.Config.Services.GoogleAnalytics.ID instead.
✅ Deploy Preview for hugo-hextra ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
<!-- Google Analytics --> | ||
{{- if and (eq hugo.Environment "production") .Site.Config.Services.GoogleAnalytics.ID }} | ||
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin /> | ||
{{ partial "google-analytics.html" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also need to update this place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the change is completely sufficient. Previously there was only a warning. Now, however, there is an error and the project crashes. The change is therefore necessary.
See here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be fair, I only made the change I described. I then tested my private project. As there was no warning and no error, the issue was closed for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eskopp as I pointed out above, this PR didn't address all the locations where Site.GoogleAnalytics
is referenced, thus it will not close the issue for me.
anyway, I will open a following PR to address this.
Fix: