Updating site privacy settings

Working with Hugo privacy configuration.

James Montgomery

2 minute read

TL; DR

I’ve been reviewing the available Hugo privacy settings.

You can review the latest configuration on my site project page. Below I discuss the purpose of the changes.

Do not track

I’ve updated my Hugo site configuration to respect “do not track” (DNT) browser settings in Google Analytics. The effect is similar to browsing a site in private or incognito mode, which if you used previously blocked Google Analytics.

If you have DNT enabled as part of your usual browser configuration, Google Analytics on this site will not run when you visit.

If you would like to configure DNT in your browser, check out the following guides:

Previous when visiting this site, if your browser did not block cookies, the Google Analytics integration would drop a cookie to store the GA Client ID. Following the enablement of useSessionStorage = true this is no longer the case. When a tab is closed in your browser removes the associated session storage.

Normal vs simple mode tweet

YouTube

The Hugo YouTube integration has the privacy-enhanced setting configured. Quoting Hugo documentation:

When you turn on privacy-enhanced mode, YouTube won’t store information about visitors on your website unless the user plays the embedded video.

Twitter content

I’ve configured the Hugo Twitter integration to do not track. Quoting Hugo documentation:

the tweet and its embedded page on your site are not used for purposes that include personalized suggestions and personalized ads.

Making use of the mirror

Up until now, I’ve used my “www.mesmontgomery.co.uk” mirror of “ja.mesmontgomery.co.uk” as just another location for hosting.

The “www” mirror is now differentiated by entirely disabling Google Analytics.

What remains is the YouTube and Twitter integration. The Twitter configuration is changed to use simple mode for a static content representation of the Tweet. The YouTube settings are unchanged.

The most visible change will be to tweets on the mirror. Here is a comparison of the two render modes:

Normal vs simple mode tweet

Conclusion

It has been interesting to see the impact of external content integration and enhanced privacy configuration for the above service integrations. I’m happy to have found additional controls to further respect visitor privacy choices.

Acknowledgements