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

Implementing Google Analytics #74

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

SergioCasCeb
Copy link
Contributor

This is a new implementation of Google Analytics as well as the required consent banner to handle the necessary Google tags and therefore comply with any Eclipse Google Analytics Policy.

  • The default state is always set to deny all tags.
  • The consent banner will always show on screen if no previous preferences have been set.
  • After accepting or denying the consent banner, the respective Google tags are updated as well as saving the user's preferences on local storage.
  • The User can change their preferences anytime by clicking on the "Manage Cookies" link found on the footer.

Copy link

netlify bot commented Apr 16, 2024

Deploy Preview for thingweb-preview ready!

Name Link
🔨 Latest commit
🔍 Latest deploy log https://app.netlify.com/sites/thingweb-preview/deploys/662258a9b03528c7b34b88bd
😎 Deploy Preview https://deploy-preview-74--thingweb-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@SergioCasCeb SergioCasCeb changed the base branch from master to egekorkan-patch-2 April 16, 2024 15:22
@danielpeintner
Copy link
Member

FYI: I just noticed that the header image lays over the consent banner. I think it should be the other way around...

image

@SergioCasCeb
Copy link
Contributor Author

FYI: I just noticed that the header image lays over the consent banner. I think it should be the other way around...

image

Interesting, I didn't notice that while testing. But most likely because my viewport is too big for the banner to even reach the header. I will fix it. Thank you 😁

@SergioCasCeb
Copy link
Contributor Author

That should do the trick, nonetheless. If the plan is to stick to Hugo, I believe it would be really necessary to refactor the project, not just in regards to utilizing the newest version of Hugo but also revising how the styling is being handled.

@egekorkan
Copy link
Member

The PR looks good. It is not going to the main branch anyways but to my existing PR. If some give the OK, I will merge it and then trigger Eclipse Webmaster on the other PR.

@SergioCasCeb
Copy link
Contributor Author

Google Analytics and Consent Process

  • As a default, if the user has not set any consent preferences, the local storage should be empty and therefore all the Google Tags are set to denied as a default. Meaning that nothing is tracked.

Screenshot 2024-04-16 215204
Screenshot 2024-04-16 215233

  • If the user decides to decline tracking, the banner is then hidden, Google Tags remain in their default denied state, and the user's preference is saved in Local Storage for future reference.

Screenshot 2024-04-16 221546
Screenshot 2024-04-16 221623

  • Finally, if the user decides to allow tracking, as before, the banner is then hidden, Google Tags are updated to allow only analytics_storage, and the user's preference is saved to be used as the new default state.

Screenshot 2024-04-16 233108
Screenshot 2024-04-16 233127

  • Of course, the user can change their preferences anytime by clicking on the "Manage Cookies" link found on the footer.

@danielpeintner
Copy link
Member

danielpeintner commented Apr 17, 2024

The PR seems fine to me as well 👍.

Once the consent banner is hidden it might be difficult for users to find the "Manage Cookies" link in the footer. Anyhow, I don't have a good alternative other than creating a dedicated cookie button in the bottom right corner or so... not sure if this might work better.

An example what I mean can be seen on
https://www.cookieyes.com/documentation/change-cookie-consent-using-cookieyes/

@SergioCasCeb
Copy link
Contributor Author

The PR seems fine to me as well 👍.

Once the consent banner is hidden it might be difficult for users to find the "Manage Cookies" link in the footer. Anyhow, I don't have a good alternative other than creating a dedicated cookie button in the bottom right corner or so... not sure if this might work better.

An example what I mean can be seen on https://www.cookieyes.com/documentation/change-cookie-consent-using-cookieyes/

That could be a nice, simple solution. For the moment we could also specify on the banner that the user preferences can always be changed/updated on the link below.

@egekorkan
Copy link
Member

For the moment we could also specify on the banner that the user preferences can always be changed/updated on the link below.

This would be actually good. Could you add it to the PR?

@danielpeintner
Copy link
Member

BTW, the name of the PR "Implementing Google Analytics" does not convey the actual content. I think it should rather say "Implementing Consent Banner"

@@ -57,9 +59,24 @@
</div>
</footer>

<div class="analytics-banner hidden">
<div class="analytics-banner__disclaimer">
<h4>Google Analytics Consent</h4>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h4>Google Analytics Consent</h4>
<h4>Site Analytics Consent</h4>

<p>We are an open-source project under the Eclipse Foundation. This means that without your consent
we don't track anything at all and even with consent we don't track any personal information, we
only look at the website usage statistics. For more details, check out the <a
href="https://www.eclipse.org/legal/privacy.php">Eclipse Foundation Privacy Policy.</a></p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
href="https://www.eclipse.org/legal/privacy.php">Eclipse Foundation Privacy Policy.</a></p>
href="https://www.eclipse.org/legal/privacy.php">Eclipse Foundation Privacy Policy.</a></p>
<p>You can change your preference later at the <b>Manage Consent</b> link in the footer.</p>

@egekorkan
Copy link
Member

We checked in the commiter's call and after those two small changes, we can merge and ping Webmaster

@egekorkan egekorkan merged commit e94d750 into eclipse-thingweb:egekorkan-patch-2 Apr 19, 2024
1 check passed
@SergioCasCeb SergioCasCeb deleted the patch-1 branch April 22, 2024 09:58
@danielpeintner
Copy link
Member

@egekorkan the PR goes againts eclipse-thingweb:egekorkan-patch-2

@egekorkan
Copy link
Member

@egekorkan the PR goes againts eclipse-thingweb:egekorkan-patch-2

Yes this is just updating the PR I already had. That PR is linked in the Eclipse helpdesk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants