GDPR Compliance and NEW WEBSITE!

Today I found some interesting code for the GA integration that respects the DNT settings and uses GA without cookies (everything is stored in the session storage):

<script>
  var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
  var doNotTrack = (dnt == "1" || dnt == "yes");
  if (!doNotTrack) {
    window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
    if (window.sessionStorage) {
      var GA_SESSION_STORAGE_KEY = 'ga:clientId';
      ga('create', 'UA-xxxx-x', {
        'storage': 'none',
        'clientId': sessionStorage.getItem(GA_SESSION_STORAGE_KEY)
       });
       ga(function(tracker) {
        sessionStorage.setItem(GA_SESSION_STORAGE_KEY, tracker.get('clientId'));
       });
     }
    ga('set', 'anonymizeIp', true);
    ga('send', 'pageview');
  }
</script>
<script async="" src="//www.google-analytics.com/analytics.js"></script>

This code is generated by Hugo for GA integration. I will test it now on my own website.

@ysc, @kai What do you think?

@ysc I think I found another todo

If you put a link to the new docs in the community forum, it does not yet show a nice card, but only the plain text link.

Not so easy, it would require the site to support oEmbed or writing a plugin for GitHub - discourse/onebox: (DEPRECATED) A gem for turning URLs into website previews

Interesting. Currently it simply uses VuePress’ built-in support (with the anonymizeIp option on top), using custom code instead is probably possible though - or proposing the option in a PR to VuePress itself.

1 Like

OK, I thought that we have full control about the GA integration. The code seems to work really good. I have tested it today and it really works without any cookies.

Done & done!

Legacy bindings also show a warning banner on the page:

https://www.openhab.org/addons/bindings/knx1/

They don’t appear in the side navigation, only in the search page when “show legacy add-ons” is checked:

You can also search for them: they will have a “(1.x)” suffix.

6 Likes

calling all designers out there: Plz come up with a cool Logo for the Design Patterns of @rlkoshak so they pop up nicely on Showcase & How-tos | openHAB

The current images are not so… great :lollipop: lol

06fb4fbd6581cc4412bb048a1a13b1e7c7ce43ca_1_690x436 + image + image

I’m just playing around as I go through and update the DPs to reflect the changes added in 2.3. Now that we have https://www.openhab.org/about/showcase.html I wanted the DPs that show up there to at least have something to distinguish them.

Though the “123” is specific to that DP. I call that approach the 1-2-3 Rule Structure. The second one is probably too obtuse. The DP is about encoding data so there is a Morse Code paddle.

I thought I had removed the image from about DPs posting though.

I am rather happy with the Time of Day image though.

Of course I’m open to any improvements. Graphic Designer I am not. :smiley:

2 Likes

Out of curiosity, what is the criteria for how to articles showing in the showcase? Is it based on the some tag, like the HabPanel widgets?

I think it is based on number of likes.

2 Likes

I see that now - the articles I have >10 likes on show up, while the remainder doesn’t. Thanks!

It’s actually the same list as
https://community.openhab.org/c/tutorials-examples/l/top/all
(top topics in Tutorials & Examples of all time)
Not sure about the order though.

I see the new images for the design pattern topics have messed up the showcase list a little - it overflows to 4 columns. That’s because I cheated a little :slight_smile: will fix later.

By the way, in case you haven’t seen it:

I finallly finished it, for those interested:

7 Likes

Sorry about that. I was just trying to fit in with all the cool images the other posts had. I can remove them.

No worries and no need, I fixed it already.

1 Like

One question on new website. Can you fix the links in google?

For example if I google “tradfri binding openhab”

It shows the link to the old site?

Congratulations for the new website.
I really do like that the old documentation automatically notifies with a link to the new documentation page.

In case of the icons (https://docs.openhab.org/addons/iconsets/classic/readme.html) the link that points to the new documentation points to 404: https://www.openhab.org/addons/iconsets/classic/

I think the correct link should be https://www.openhab.org/docs/configuration/iconsets/classic/

The old docs have a better PageRank so they’re still presented first. This will get better over time as new pages are linked from elsewhere, but it’s probably going to stay that way for a while and until they are completely removed.
If you only want results from the new website add site:www.openhab.org to the query

For instance tradfri site:www.openhab.org - Google Suche

Thanks.

why not just use 301 redirects? so the ranking will stay the same and the users get a bit smoother experience?

jm2c

This is also being discussed.

I think 301 could be a valid solution when all contents are moved/merged finally into the New process. (which still has to be developed for some parts)

For example there are currently some of the basic docs articles missing due to a structural change.
So there currently would be no article to redirect to.