Hugothemes: Theme Demos with third party tracking

Created on 9 Jan 2019  路  7Comments  路  Source: gohugoio/hugoThemes

The following themes have third party tracking (Google Analytics, Disqus) in their demos:

  1. Castanet
     \castanet\exampleSite\config.toml:
        googleAnalytics = "UA-100789009-1"
        disqusShortname = "arresteddevops"
  1. Hugo Pacman
     \hugo-pacman-theme\exampleSite\config.toml:
        [Params.GoogleAnalytics]
        ID = "UA-10147768-2"

        [Params.Disqus]
        ShortName = "coderzh"
  1. Conference
     \hugo-conference\exampleSite\config.yml
        GoogleAnalytics: "UA-9232216-1"
  1. Hugo-Bootstrap
     \hugo-bootstrap\exampleSite\config.toml:
        # Google analytics
        googleAnalytics = "UA-47268287-3"
  1. Dopetrope
     \hugo-theme-dopetrope\exampleSite\config.toml:
        [params.settings]
        googleanalytics = "UA-113904582-2"
        disqus = "hugo-dopetrope"
  1. Massively
     \hugo-theme-massively\exampleSite\config.toml:
        googleanalytics = "UA-113904582-3"
        disqusShortname = "hugo-massively"
  1. Vec
     \hugo-theme-vec\exampleSite\config.toml:
        disqusShortname = "yiiim"
        googleAnalytics = "UA-57408564-1"
  1. W3.CSS
     \hugo-theme-w3css-basic\exampleSite\config.toml:
        # Enable Google Analytics by entering your tracking code
        googleAnalytics = "UA-113314068-2"
  1. Travelify
     \hugo-travelify-theme\exampleSite\config.toml:
        GoogleAnalytics = "UA-68204765-1"
  1. Reveal Hugo
     \reveal-hugo\exampleSite\layouts\partials\reveal-hugo\body.html:
        <script async src="https://www.googletagmanager.com/gtag/js?id=UA-24132749-1"></script>
        <script>
         window.dataLayer = window.dataLayer || [];
         function gtag(){dataLayer.push(arguments);}
         gtag('js', new Date());
         gtag('config', "UA-24132749-1");
        </script>
  1. Simple Hugo Theme
     \simple-hugo-theme\exampleSite\config.toml:
        # Google analytics
        googleAnalytics = "UA-47268287-4"

In the coming days I will be opening issues to notify theme authors about the need to remove the third party tracking from their themes' Example Sites.

There will be a 30 day grace period so that authors can respond with a fix. Beyond this time frame, I will be sending Pull Requests to have these demos disabled in the Themes Site Build Script, until the tracking is removed.

Stale

Most helpful comment

@dzello

We don鈥檛 see this issue often in theme submissions (and if we do we make sure tracking is disabled) but I will send a Pull Request to add a note in the repository鈥檚 README later today.

Thanks for the hint.

All 7 comments

I don't have any issue removing the code, just wondering if this is documented somewhere for future theme authors?

@dzello

We don鈥檛 see this issue often in theme submissions (and if we do we make sure tracking is disabled) but I will send a Pull Request to add a note in the repository鈥檚 README later today.

Thanks for the hint.

There are also themes that have enabled the default Share Plugins by various Social Media platforms -that track users- so far I have found the following:

  1. Simple IT
\simpleit-hugo-theme\layouts\partials\share_buttons.html:

  1. HugoTube
https://github.com/marcanuy/hugotube/blob/484cc7aaf8159b4c2bd6394ae89a05436619f57b/layouts/partials/share.html

https://github.com/marcanuy/hugotube/blob/484cc7aaf8159b4c2bd6394ae89a05436619f57b/layouts/partials/share/twitter.html

https://github.com/marcanuy/hugotube/blob/484cc7aaf8159b4c2bd6394ae89a05436619f57b/layouts/partials/share/facebook.html

https://github.com/marcanuy/hugotube/blob/484cc7aaf8159b4c2bd6394ae89a05436619f57b/layouts/partials/share/google.html
  1. Whiteplain
\whiteplain\layouts\partials\share.html
  1. Code Editor
\hugo-code-editor-theme\layouts\partials\share.html
  1. Athena
\athena-hugo-theme\layouts\partials\footer.html:

<li class="inline-block mr-1">
<a href="https://twitter.com/share" class="twitter-share-button" data-hashtags="{{ .Title }}">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</li>
  1. Material Lite
/hugo-material-lite/layouts/partials/footer.html
<script src="/js/share.min.js"></script>

NOTE
It is needed to add another note in the README instructing theme authors not to use the readymade sharing buttons that come with tracking.

I will publish a Theme Component that theme authors can use as a guide in their themes.
It will be built on top of the following snippets:
https://discourse.gohugo.io/t/share-buttons-for-blog-posts/12384/6
https://github.com/mnunes/marcusnunes.me/blob/dbf651482a8881796c2a0ca11872cec632e14749/themes/ananke/layouts/partials/share-links.html


I will start opening issues to notify theme authors about the tracking in their themes' demos after I publish the sharing buttons theme component.

Again there will be the same 30 day grace period, for theme authors to respond with a fix after notification, beyond that time frame I will be sending a few Pull Requests to have these demos disabled, until their authors remove the tracking.

cc: @digitalcraftsman

@onedrawingperday Could you point out which portion of my code I need to modify? I still don't understand much of this issue. A short explanation would be helpful.
My theme: hugo-dream-plus

Thanks for notifying me on the forum.

@UtkarshVerma

I had a better look and the code in your theme does not use the JS provided by the various social media platforms. There is an inline JS script for the pop-up preview and no tracking.

So feel free to enable the sharing partial in your theme.

And sorry for the false alarm.


I still don't understand much of this issue. A short explanation would be helpful.

This issue is about themes that have enabled third party services in their demos such as:

  • Google Analytics or Google Tag Manager
  • Disqus (and other comment providers)
  • Sharing buttons provided by Facebook, Twitter etc.

The JS files provided by these platforms track page visitors and send the data to these third party services. This type of tracking requires opt-in for visitors from the European Union.

Since these demos appear on the Hugo website these services should not be enabled. We do not have the means to know which Example Sites require an opt-in mechanism and which don't, since authors update their themes after they are accepted in this repo.

Also we have an open issue about creating an opt-in banner across the Hugo websites for the Hugo project's Google Analytics' report.

This issue has been automatically marked as stale because it has not had recent activity. Feel free to ask questions. We're glad to help.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

Closing this issue because a large part of it is resolved.

The remaining part moved to #564

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DirtyF picture DirtyF  路  7Comments

rmaguiar picture rmaguiar  路  7Comments

heyarviind picture heyarviind  路  7Comments

janraasch picture janraasch  路  3Comments

serg picture serg  路  4Comments