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

fix: drop the GA and Hotjar spyware #696

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ALGOLIA_KEY=
ALGOLIA_ID=
GA_ID=
HOTJAR_ID=
OG_EXP=
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
env:
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
ALGOLIA_ID: ${{ secrets.ALGOLIA_ID }}
GA_ID: ${{ secrets.GA_ID }}
HOTJAR_ID: ${{ secrets.HOTJAR_ID }}

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ jobs:
env:
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
ALGOLIA_ID: ${{ secrets.ALGOLIA_ID }}
GA_ID: ${{ secrets.GA_ID }}
HOTJAR_ID: ${{ secrets.HOTJAR_ID }}

steps:
- uses: actions/checkout@v4
Expand Down
25 changes: 1 addition & 24 deletions config/docusaurus/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,6 @@ const DOCUSAURUS_PLUGIN_OG = [
},
];

// We use metrics only for analyze and refinement website discovery experience
// @see Privacy
const metrics = {
gtag: {
trackingID: process.env.GA_ID, // the Google Analytics Tracking ID
anonymizeIP: true, // Should IPs be anonymized?
},
googleAnalytics: {
trackingID: process.env.GA_ID, // the Google Analytics Tracking ID
anonymizeIP: true, // Should IPs be anonymized?
},
// to integrate Hotjar feedback
// @see https://github.com/symblai/docusaurus-plugin-hotjar
hotjar: {
applicationId: process.env.HOTJAR_ID,
},
};

/**
* Hide category index pages from sidebar ()
* TODO: Remove custom generator after issue fix
Expand Down Expand Up @@ -78,10 +60,6 @@ const presets = [
changefreq: "weekly",
priority: 0.5,
},
gtag: process.env.GA_ID ? metrics.gtag : undefined,
googleAnalytics: process.env.GA_ID
? metrics.googleAnalytics
: undefined,
},
],
];
Expand Down Expand Up @@ -129,7 +107,6 @@ const plugins = [
},
],
"plugin-image-zoom",
process.env.HOTJAR_ID && "docusaurus-plugin-hotjar", // For preventing crashing
// FIXME: Docusaurus Open Graph Plugin Experimental.
process.env.OG_EXP && DOCUSAURUS_PLUGIN_OG,
].filter(Boolean);
Expand All @@ -142,4 +119,4 @@ const algolia = {
contextualSearch: true,
};

module.exports = { presets, plugins, algolia, metrics };
module.exports = { presets, plugins, algolia };
1 change: 0 additions & 1 deletion config/docusaurus/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const footer = {
label: "License",
href: `${GITHUB_DOCS}/blob/master/LICENSE`,
},
{ label: "Privacy", href: "/docs/privacy" },
],
},
],
Expand Down
3 changes: 1 addition & 2 deletions config/docusaurus/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { footer } = require("./footer");
const consts = require("./consts");
const { metadata } = require("./metadata");
const { i18n } = require("./i18n");
const { presets, plugins, algolia, metrics } = require("./extensions");
const { presets, plugins, algolia } = require("./extensions");
const { LEGACY_ROUTES, REDIRECTS } = require("./routes");

module.exports = {
Expand All @@ -17,7 +17,6 @@ module.exports = {
presets,
plugins,
algolia,
metrics,
LEGACY_ROUTES,
REDIRECTS,
};
1 change: 0 additions & 1 deletion config/docusaurus/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ const _TOTAL_ROUTES = [
"/docs/guides/migration/from-v1",
"/docs/guides/tech/with-nextjs",
"/docs/",
"/docs/privacy",
"/docs/reference",
];
// from: "/en/docs/*" to "/docs/*"
Expand Down
5 changes: 1 addition & 4 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
footer: cfg.footer,
algolia: cfg.algolia,
metadata: cfg.metadata,
hotjar: cfg.metrics.hotjar,

imageZoom: {
options: {
background: "rgb(255 255 255 / 0.3)",
Expand All @@ -63,6 +63,3 @@ module.exports = {
if (!process.env.ALGOLIA_KEY || !process.env.ALGOLIA_ID) {
delete module.exports.themeConfig.algolia;
}
if (!process.env.HOTJAR_ID) {
delete module.exports.themeConfig.hotjar;
}
17 changes: 0 additions & 17 deletions global.d.ts

This file was deleted.

12 changes: 0 additions & 12 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,6 @@
"message": "But there are redirects from old links for compatibility",
"description": "NavPage section=legacy subdetails"
},
"features.cookie-consent.alert": {
"message": "🍰 We use cookies for analytics",
"description": "Cookie Consent alert"
},
"features.cookie-consent.accept": {
"message": "OK",
"description": "Cookie Consent accept label"
},
"features.cookie-consent.reason": {
"message": "why?",
"description": "Cookie Consent reason label"
},
"features.feedback-badge.label": {
"message": "Share your feedback about documentation 🤙",
"description": "Feedback share button label"
Expand Down
17 changes: 0 additions & 17 deletions i18n/en/docusaurus-plugin-content-docs/current/privacy.md

This file was deleted.

4 changes: 0 additions & 4 deletions i18n/en/docusaurus-theme-classic/footer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
"message": "License",
"description": "The label of footer link with label=License linking to LICENSE"
},
"link.item.label.Privacy": {
"message": "Privacy",
"description": "The label of footer link with label=Privacy linking to /docs/privacy"
},
"link.item.label.Contribution Guide (RU)": {
"message": "Contribution Guide (RU)",
"description": "The label of footer link with label=Contribution Guide (RU) linking to CONTRIBUTING.md"
Expand Down
12 changes: 0 additions & 12 deletions i18n/ru/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,6 @@
"message": "Но для совместимости есть редиректы со старых ссылок",
"description": "NavPage section=legacy subdetails"
},
"features.cookie-consent.alert": {
"message": "🍰 Мы используем куки для аналитики",
"description": "Cookie Consent alert"
},
"features.cookie-consent.accept": {
"message": "Хорошо",
"description": "Cookie Consent accept label"
},
"features.cookie-consent.reason": {
"message": "зачем?",
"description": "Cookie Consent reason label"
},
"features.feedback-badge.label": {
"message": "Поделись фидбеком по документации 🤙",
"description": "Feedback share button label"
Expand Down
17 changes: 0 additions & 17 deletions i18n/ru/docusaurus-plugin-content-docs/current/privacy.md

This file was deleted.

4 changes: 0 additions & 4 deletions i18n/ru/docusaurus-theme-classic/footer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
"message": "Лицензия",
"description": "The label of footer link with label=License linking to LICENSE"
},
"link.item.label.Privacy": {
"message": "Конфиденциальность",
"description": "The label of footer link with label=Privacy linking to /docs/privacy"
},
"link.item.label.Contribution Guide (RU)": {
"message": "Гайдлайны по контрибьютингу (RU)",
"description": "The label of footer link with label=Contribution Guide (RU) linking to CONTRIBUTING.md"
Expand Down
12 changes: 0 additions & 12 deletions i18n/uz/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,6 @@
"message": "Lekin moslik uchun eski havolalardan qayta yo'naltirishlar mavjud",
"description": "NavPage section=legacy subdetails"
},
"features.cookie-consent.alert": {
"message": "🍰 Biz tahlil qilish uchun cookie-fayllardan foydalanamiz",
"description": "Cookie Consent alert"
},
"features.cookie-consent.accept": {
"message": "Yaxshi",
"description": "Cookie Consent accept label"
},
"features.cookie-consent.reason": {
"message": "nimaga?",
"description": "Cookie Consent reason label"
},
"features.feedback-badge.label": {
"message": "Hujjatlar bo'yicha fikr-mulohazalaringizni baham ko'ring 🤙",
"description": "Feedback share button label"
Expand Down
17 changes: 0 additions & 17 deletions i18n/uz/docusaurus-plugin-content-docs/current/privacy.md

This file was deleted.

4 changes: 0 additions & 4 deletions i18n/uz/docusaurus-theme-classic/footer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
"message": "Litsenziya",
"description": "The label of footer link with label=License linking to LICENSE"
},
"link.item.label.Privacy": {
"message": "Foydalanuvchi shartnomasi",
"description": "The label of footer link with label=Privacy linking to /docs/privacy"
},
"link.item.label.Contribution Guide (RU)": {
"message": "Hissa qoʻshish boʻyicha qoʻllanma (RU)",
"description": "The label of footer link with label=Contribution Guide (RU) linking to CONTRIBUTING.md"
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,15 @@
"@svgr/webpack": "^8.1.0",
"@types/lodash-es": "^4.17.12",
"clsx": "^2.1.0",
"docusaurus-plugin-hotjar": "^0.0.2",
"dotenv": "^16.3.1",
"file-loader": "^6.2.0",
"js-cookie": "^3.0.5",
"lodash-es": "^4.17.21",
"picocolors": "^1.0.0",
"plugin-image-zoom": "^1.2.0",
"prism-react-renderer": "^2.3.1",
"pushfeedback": "^0.1.40",
"pushfeedback-react": "^0.1.40",
"react": "^18.3.1",
"react-cookie-consent": "^8.0.1",
"react-dom": "^18.3.1",
"react-fast-marquee": "^1.6.2",
"sha1": "^1.1.1",
Expand Down
Loading