Skip to content

Commit

Permalink
feat: ✨ switch from google analytics to umami
Browse files Browse the repository at this point in the history
  • Loading branch information
megasanjay committed Aug 3, 2022
1 parent 310fc0f commit 8bf4717
Show file tree
Hide file tree
Showing 10 changed files with 225 additions and 376 deletions.
31 changes: 0 additions & 31 deletions .releaserc.json

This file was deleted.

28 changes: 4 additions & 24 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
const types = [
'build',
'chore',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
];
// eslint-disable-next-line import/no-extraneous-dependencies
const { commitlintConfig } = require('@fairdataihub/config');

const scopes = ['app', 'library', 'backend', 'authentication', 'settings'];
const config = commitlintConfig();

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', types],
'scope-case': [2, 'always', ['camel-case']],
'scope-enum': [2, 'always', scopes],
'subject-empty': [2, 'never'],
'subject-case': [2, 'always', ['lower-case']],
'header-max-length': [2, 'always', 72],
},
};
module.exports = config;
6 changes: 6 additions & 0 deletions devmoji.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const { devmojiConfig } = require('@fairdataihub/config');

const config = devmojiConfig();

module.exports = config;
46 changes: 3 additions & 43 deletions docs/cookiepolicy.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,23 @@
---
sidebar_position: 10
pagination_prev: null
pagination_next: null
title: Cookie Policy
---

## What Are Cookies?

As is common practice with almost all professional websites this site uses cookies, which are tiny files that are downloaded to your computer, to improve your experience. This page describes what information they gather, how we use it and why we sometimes need to store these cookies. We will also share how you can prevent these cookies from being stored however this may downgrade or 'break' certain elements of the sites functionality.
A cookie is a file that is downloaded to a device (computer or mobile phone) when accessing certain web pages. Cookies allow a web page, among other things, to store and retrieve information about the browsing habits of a user or a computer and, depending on the information they contain and the way they use their equipment, they can be used to recognize to user.

For more information, please visit [AllAboutCookies.org](https://www.allaboutcookies.org/).

## How We Use Cookies

We use cookies for a variety of reasons detailed below. Unfortunately in most cases there are no industry standard options for disabling cookies without completely disabling the functionality and features they add to this site. It is recommended that you leave on all cookies if you are not sure whether you need them or not in case they are used to provide a service that you use.

## Disabling Cookies

At the moment we do not have the functionality to disable cookies from the website. In order to prevent any tracking by third party analysis and measurement tools we use, please follow the steps provided below for your specific browser.

## Find out how to manage cookies on popular browsers

- [Google Chrome](https://support.google.com/accounts/answer/61416)
- [Mozilla Firefox](https://support.mozilla.org/en-US/kb/enable-and-disable-cookies-website-preferences)
- [Apple Safari](https://support.apple.com/en-gb/guide/safari/sfri11471/mac)
- [Microsoft Edge](https://support.microsoft.com/sr-latn-rs/help/4468242/microsoft-edge-browsing-data-and-privacy-microsoft-privacy)
- [Microsoft Internet Explorer](https://support.microsoft.com/en-gb/help/17442/windows-internet-explorer-delete-manage-cookies)
- [Opera](https://help.opera.com/en/latest/web-preferences/#cookies)

To find information relating to other browsers, visit the browser developer's website.

To opt-out of being tracked by Google Analytics across all websites, visit http://tools.google.com/dlpage/gaoptout
We do not use third-party cookies or send any information to third-parties. We do collect website usage information via the privacy focused, self hosted and open source [Umami](https://umami.is/) platform. Umami lets us gather the data we need while respecting your privacy. Umami does not collect any personal information, does not use cookies, does not track users across websites, and is GDPR compliant. All data collected is anonymized, making it impossible to identify any individual user. To see exactly what information we collect you can preview our public dashboard [here](https://umami.fairdataihub.org/share/ku67mIG9/docs.fairshareapp.io).

You can also visit the trade body representing these advertising platforms for more information: [Network Advertising Initiative](https://www.networkadvertising.org/choices/;).
## Additional Information

When you access third party sites on our Sites, or when you are reading integration or social media links, cookies can be created by the companies disseminating these links. These third parties may be able to use cookies in the context of Fair Data Innovations Hub's Services (partners or other third parties supplying content or services available on the Fair Data Innovations Hub site) and are responsible for the cookies they install, and it is their conditions on cookies which apply. For more information, you are advised to check the cookie policy directly on these third-party sites concerning their use of cookies.

## The Cookies We Set

Site preferences cookies - In order to provide you with a great experience on this site we provide the functionality to set your preferences for how this site runs when you use it. In order to remember your preferences we need to set cookies so that this information can be called whenever you interact with a page is affected by your preferences.
##Third Party Cookies
In some special cases we also use cookies provided by trusted third parties. The following section details which third party cookies you might encounter through this site.

- This site uses Google Analytics which is one of the most widespread and trusted analytics solution on the web for helping us to understand how you use the site and ways that we can improve - your experience. These cookies may track things such as how long you spend on the site and the pages that you visit so we can continue to produce engaging content. For more information on Google Analytics cookies, see the official [Google Analytics](https://policies.google.com/privacy?hl=en-US) page.
- Third party analytics are used to track and measure usage of this site so that we can continue to produce engaging content. These cookies may track things such as how long you spend on the - site or pages you visit which helps us to understand how we can improve the site for you.
- From time to time we test new features and make subtle changes to the way that the site is delivered. When we are still testing new features these cookies may be used to ensure that you - receive a consistent experience whilst on the site whilst ensuring we understand which optimisations our users appreciate the most.
- As we sell products it's important for us to understand statistics about how many of the visitors to our site actually make a purchase and as such this is the kind of data that these cookies - will track. This is important to you as it means that we can accurately make business predictions that allow us to monitor our advertising and product costs to ensure the best possible price.
- We also use social media buttons and/or plugins on this site that allow you to connect with your social network in various ways. For these to work the following social media sites including - Twitter, Facebook, Instagram, etc., will set cookies through our site which may be used to enhance your profile on their site or contribute to the data they hold for various purposes outlined in their respective privacy policies.

## Questions and complaints

Please feel free to contact us if you have any questions or complaints about Fair Data Innovation Hub's Cookie Policy.

**Address**: 11107 Roselle St. Ste #211 San Diego, CA 92121

**Contact form**: https://fairdataihub.org/contact-us

**Email**: info@fairdataihub.org

import PageFeedback from '@site/src/components/PageFeedback';

<PageFeedback />
12 changes: 8 additions & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ const config = {
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
gtag: {
trackingID: 'G-N2B19HF19W',
anonymizeIP: true,
},
}),
],
],

plugins: ['docusaurus-plugin-umami'],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
Expand Down Expand Up @@ -155,12 +153,18 @@ const config = {
content: 'Fair Data Innovations Hub',
},
],

algolia: {
appId: 'GD7SXR5V16',
apiKey: 'a3dc9a3cc59523cd37850a7480ab26b7',
indexName: 'fairshareapp',
contextualSearch: true,
},

umami: {
websiteid: 'a0d89633-5053-41a1-ab20-08ea4214c798',
src: 'https://umami.fairdataihub.org/mushroom.js',
},
}),
scripts: [
{
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@
"*.{js,jsx,css,md}": "prettier --write"
},
"dependencies": {
"@docusaurus/core": "2.0.0-rc.1",
"@docusaurus/preset-classic": "2.0.0-rc.1",
"@docusaurus/core": "^2.0.1",
"@docusaurus/preset-classic": "^2.0.1",
"@emotion/react": "11.10.0",
"@emotion/styled": "11.10.0",
"@mdx-js/react": "1.6.22",
"@mui/material": "5.9.2",
"@svgr/webpack": "6.3.1",
"axios": "0.27.2",
"clsx": "1.2.1",
"docusaurus-plugin-umami": "^2.0.0",
"express": "4.18.1",
"file-loader": "6.2.0",
"prism-react-renderer": "1.3.5",
Expand All @@ -47,6 +48,7 @@
"@babel/eslint-parser": "7.18.9",
"@commitlint/cli": "17.0.3",
"@commitlint/config-conventional": "17.0.3",
"@fairdataihub/config": "^1.2.0",
"@semantic-release/changelog": "6.0.1",
"@semantic-release/commit-analyzer": "9.0.2",
"@semantic-release/git": "10.0.1",
Expand Down
6 changes: 6 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const { releasercConfig } = require('@fairdataihub/config');

const config = releasercConfig('default', 'fairdataihub', 'FAIRshare-Docs', false);

module.exports = config;
54 changes: 1 addition & 53 deletions src/theme/Footer/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
/* eslint-disable max-len */
/* eslint-disable react/jsx-no-comment-textnodes */
import React, { useState, useEffect } from 'react';
import React from 'react';
// eslint-disable-next-line import/no-unresolved
import Link from '@docusaurus/Link';
import Lottie from 'react-lottie';
import { useCookies } from 'react-cookie';
import CookiesLottieJSON from './cookies.json';

export function ExternalLinkSVG() {
return (
Expand All @@ -27,31 +24,6 @@ export function ExternalLinkSVG() {
}

export default function FooterWrapper() {
const animationOptions = {
loop: true,
autoplay: true,
animationData: CookiesLottieJSON,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice',
},
};

const [showCookieBanner, setShowCookieBanner] = useState(false);
const [cookies, setCookie] = useCookies(['cookieConsent']);

const handleCookieBannerClose = () => {
setShowCookieBanner(false);
setCookie('cookieConsent', true, { path: '/', maxAge: 60 * 60 * 24 * 60 });
};

useEffect(() => {
if (cookies.cookieConsent) {
setShowCookieBanner(false);
} else {
setShowCookieBanner(true);
}
}, [cookies]);

return (
<div>
<footer className="bg-[color:var(--footer-background-color)]">
Expand Down Expand Up @@ -491,30 +463,6 @@ export default function FooterWrapper() {
</a>
</div>
</div>

{/* Cookie notification container */}
{showCookieBanner && (
<div className="fixed bottom-20 right-3 hidden max-w-[280px] scale-95 rounded-lg border-2 border-green-200 bg-zinc-50 shadow-md transition-all hover:scale-100 hover:shadow-xl sm:flex">
<div className="mb-2 flex flex-col items-center justify-center py-2 px-4">
<Lottie options={animationOptions} height={150} width={150} />
<p className="mb-1 text-left text-sm text-gray-600">
We use cookies to understand how you use our website and make your experience
better.
</p>
<p className="mb-3 text-left text-sm text-gray-600">
To learn more read our <Link href="/docs/privacypolicy">privacy policy</Link> and{' '}
<Link href="/docs/cookiepolicy">cookie policy</Link>.
</p>
<button
className="cookie-button cookie-button-yes !text-base"
onClick={handleCookieBannerClose}
type="button"
>
Okay, I Agree
</button>
</div>
</div>
)}
</div>
</footer>
</div>
Expand Down
46 changes: 3 additions & 43 deletions versioned_docs/version-1.4.0/cookiepolicy.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,23 @@
---
sidebar_position: 10
pagination_prev: null
pagination_next: null
title: Cookie Policy
---

## What Are Cookies?

As is common practice with almost all professional websites this site uses cookies, which are tiny files that are downloaded to your computer, to improve your experience. This page describes what information they gather, how we use it and why we sometimes need to store these cookies. We will also share how you can prevent these cookies from being stored however this may downgrade or 'break' certain elements of the sites functionality.
A cookie is a file that is downloaded to a device (computer or mobile phone) when accessing certain web pages. Cookies allow a web page, among other things, to store and retrieve information about the browsing habits of a user or a computer and, depending on the information they contain and the way they use their equipment, they can be used to recognize to user.

For more information, please visit [AllAboutCookies.org](https://www.allaboutcookies.org/).

## How We Use Cookies

We use cookies for a variety of reasons detailed below. Unfortunately in most cases there are no industry standard options for disabling cookies without completely disabling the functionality and features they add to this site. It is recommended that you leave on all cookies if you are not sure whether you need them or not in case they are used to provide a service that you use.

## Disabling Cookies

At the moment we do not have the functionality to disable cookies from the website. In order to prevent any tracking by third party analysis and measurement tools we use, please follow the steps provided below for your specific browser.

## Find out how to manage cookies on popular browsers

- [Google Chrome](https://support.google.com/accounts/answer/61416)
- [Mozilla Firefox](https://support.mozilla.org/en-US/kb/enable-and-disable-cookies-website-preferences)
- [Apple Safari](https://support.apple.com/en-gb/guide/safari/sfri11471/mac)
- [Microsoft Edge](https://support.microsoft.com/sr-latn-rs/help/4468242/microsoft-edge-browsing-data-and-privacy-microsoft-privacy)
- [Microsoft Internet Explorer](https://support.microsoft.com/en-gb/help/17442/windows-internet-explorer-delete-manage-cookies)
- [Opera](https://help.opera.com/en/latest/web-preferences/#cookies)

To find information relating to other browsers, visit the browser developer's website.

To opt-out of being tracked by Google Analytics across all websites, visit http://tools.google.com/dlpage/gaoptout
We do not use third-party cookies or send any information to third-parties. We do collect website usage information via the privacy focused, self hosted and open source [Umami](https://umami.is/) platform. Umami lets us gather the data we need while respecting your privacy. Umami does not collect any personal information, does not use cookies, does not track users across websites, and is GDPR compliant. All data collected is anonymized, making it impossible to identify any individual user. To see exactly what information we collect you can preview our public dashboard [here](https://umami.fairdataihub.org/share/ku67mIG9/docs.fairshareapp.io).

You can also visit the trade body representing these advertising platforms for more information: [Network Advertising Initiative](https://www.networkadvertising.org/choices/;).
## Additional Information

When you access third party sites on our Sites, or when you are reading integration or social media links, cookies can be created by the companies disseminating these links. These third parties may be able to use cookies in the context of Fair Data Innovations Hub's Services (partners or other third parties supplying content or services available on the Fair Data Innovations Hub site) and are responsible for the cookies they install, and it is their conditions on cookies which apply. For more information, you are advised to check the cookie policy directly on these third-party sites concerning their use of cookies.

## The Cookies We Set

Site preferences cookies - In order to provide you with a great experience on this site we provide the functionality to set your preferences for how this site runs when you use it. In order to remember your preferences we need to set cookies so that this information can be called whenever you interact with a page is affected by your preferences.
##Third Party Cookies
In some special cases we also use cookies provided by trusted third parties. The following section details which third party cookies you might encounter through this site.

- This site uses Google Analytics which is one of the most widespread and trusted analytics solution on the web for helping us to understand how you use the site and ways that we can improve - your experience. These cookies may track things such as how long you spend on the site and the pages that you visit so we can continue to produce engaging content. For more information on Google Analytics cookies, see the official [Google Analytics](https://policies.google.com/privacy?hl=en-US) page.
- Third party analytics are used to track and measure usage of this site so that we can continue to produce engaging content. These cookies may track things such as how long you spend on the - site or pages you visit which helps us to understand how we can improve the site for you.
- From time to time we test new features and make subtle changes to the way that the site is delivered. When we are still testing new features these cookies may be used to ensure that you - receive a consistent experience whilst on the site whilst ensuring we understand which optimisations our users appreciate the most.
- As we sell products it's important for us to understand statistics about how many of the visitors to our site actually make a purchase and as such this is the kind of data that these cookies - will track. This is important to you as it means that we can accurately make business predictions that allow us to monitor our advertising and product costs to ensure the best possible price.
- We also use social media buttons and/or plugins on this site that allow you to connect with your social network in various ways. For these to work the following social media sites including - Twitter, Facebook, Instagram, etc., will set cookies through our site which may be used to enhance your profile on their site or contribute to the data they hold for various purposes outlined in their respective privacy policies.

## Questions and complaints

Please feel free to contact us if you have any questions or complaints about Fair Data Innovation Hub's Cookie Policy.

**Address**: 11107 Roselle St. Ste #211 San Diego, CA 92121

**Contact form**: https://fairdataihub.org/contact-us

**Email**: info@fairdataihub.org

import PageFeedback from '@site/src/components/PageFeedback';

<PageFeedback />
Loading

2 comments on commit 8bf4717

@vercel
Copy link

@vercel vercel bot commented on 8bf4717 Aug 3, 2022

Choose a reason for hiding this comment

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

Checks for Deployment have failed

@vercel
Copy link

@vercel vercel bot commented on 8bf4717 Aug 3, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.