Skip to content

Commit

Permalink
Remove Google Analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
nhoizey committed Feb 11, 2022
1 parent 66aac7e commit 3c517cc
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 177 deletions.
31 changes: 0 additions & 31 deletions _scripts/update-google-analytics.js

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@
"serviceworker:inject": "workbox injectManifest workbox.config.js",
"start": "cross-env NODE_ENV=development npm-run-all --sequential clean build:js --parallel watch:*",
"start:debug": "DEBUG=Eleventy* npm start",
"build": "cross-env NODE_ENV=production npm-run-all --sequential clean --parallel build:js build:sass ga matomo --sequential build:eleventy serviceworker:inject",
"build": "cross-env NODE_ENV=production npm-run-all --sequential clean --parallel build:js build:sass matomo --sequential build:eleventy serviceworker:inject",
"ci-check": "cross-env NODE_ENV=production npm-run-all --sequential clean --parallel build:js build:sass --sequential build:eleventy serviceworker:inject",
"build:debug": "DEBUG=Eleventy* npm run build",
"build:benchmark": "DEBUG=Eleventy:Benchmark* npm run build",
"notist": "node ./_scripts/update-notist.js",
"webmention": "node ./_scripts/update-webmention.js",
"photo": "node ./_scripts/get-a-photo-of-the-day.js",
"sprite": "node ./_scripts/generate-svg-sprite.js",
"ga": "node ./_scripts/update-google-analytics.js",
"matomo": "node ./_scripts/update-matomo.js",
"lint:sass": "stylelint 'assets/**/*.scss'",
"fix:sass": "stylelint --fix 'assets/**/*.scss'",
Expand Down
6 changes: 3 additions & 3 deletions src/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ RewriteRule ^(.*) https://nicolas-hoizey.com/$1 [QSA,R=301,L]

<IfModule mod_headers.c>

Header set Content-Security-Policy "upgrade-insecure-requests; base-uri 'self'; img-src 'self' data: data.nicolas-hoizey.com res.cloudinary.com i.ytimg.com image.thum.io caniuse.bitsofco.de; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' data.nicolas-hoizey.com speakerdeck.com storage.googleapis.com www.google-analytics.com platform.twitter.com syndication.twitter.com cdn.syndication.twimg.com cdn.jsdelivr.net assets.codepen.io static.codepen.io cpwebassets.codepen.io production-assets.codepen.io ifttt.com; object-src 'self' vimeo.com; connect-src 'self' data.nicolas-hoizey.com res.cloudinary.com *.algolia.net *.algolianet.com *.google-analytics.com stats.g.doubleclick.net; report-uri https://nhocom.report-uri.com/r/d/csp/enforce"
Header set Content-Security-Policy "upgrade-insecure-requests; base-uri 'self'; img-src 'self' data: data.nicolas-hoizey.com res.cloudinary.com i.ytimg.com image.thum.io caniuse.bitsofco.de; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' data.nicolas-hoizey.com speakerdeck.com storage.googleapis.com platform.twitter.com syndication.twitter.com cdn.syndication.twimg.com cdn.jsdelivr.net assets.codepen.io static.codepen.io cpwebassets.codepen.io production-assets.codepen.io ifttt.com; object-src 'self' vimeo.com; connect-src 'self' data.nicolas-hoizey.com res.cloudinary.com *.algolia.net *.algolianet.com; report-uri https://nhocom.report-uri.com/r/d/csp/enforce"

# `mod_headers` cannot match based on the content-type, however,
# the `Content-Security-Policy` response header should be send
Expand Down Expand Up @@ -646,8 +646,8 @@ FileETag None
# https://nicolas-hoizey.com/notes/2020/12/22/1/

<IfModule mod_headers.c>
Header set Link "<https://res.cloudinary.com>; rel=dns-prefetch, <https://www.google-analytics.com>; rel=dns-prefetch"
Header set Link "<https://res.cloudinary.com>; rel=preconnect; crossorigin, <https://www.google-analytics.com>; rel=preconnect; crossorigin"
Header set Link "<https://res.cloudinary.com>; rel=dns-prefetch"
Header set Link "<https://res.cloudinary.com>; rel=preconnect"
</IfModule>

# ------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/_headers.njk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ permalink: _headers
Cache-Control: public, max-age=14405
Link: <https://res.cloudinary.com>;rel="dns-prefetch"
Link: <https://res.cloudinary.com>;rel="preconnect"
Content-Security-Policy: upgrade-insecure-requests; base-uri 'self'; img-src 'self' data: data.nicolas-hoizey.com res.cloudinary.com i.ytimg.com image.thum.io caniuse.bitsofco.de; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' data.nicolas-hoizey.com speakerdeck.com storage.googleapis.com www.google-analytics.com platform.twitter.com syndication.twitter.com cdn.syndication.twimg.com cdn.jsdelivr.net assets.codepen.io static.codepen.io cpwebassets.codepen.io production-assets.codepen.io ifttt.com; object-src 'self' vimeo.com; connect-src 'self' data.nicolas-hoizey.com res.cloudinary.com *.algolia.net *.algolianet.com *.google-analytics.com stats.g.doubleclick.net; report-uri https://nhocom.report-uri.com/r/d/csp/enforce
Content-Security-Policy: upgrade-insecure-requests; base-uri 'self'; img-src 'self' data: data.nicolas-hoizey.com res.cloudinary.com i.ytimg.com image.thum.io caniuse.bitsofco.de; script-src 'self' data: 'unsafe-inline' 'unsafe-eval' data.nicolas-hoizey.com speakerdeck.com storage.googleapis.com platform.twitter.com syndication.twitter.com cdn.syndication.twimg.com cdn.jsdelivr.net assets.codepen.io static.codepen.io cpwebassets.codepen.io production-assets.codepen.io ifttt.com; object-src 'self' vimeo.com; connect-src 'self' data.nicolas-hoizey.com res.cloudinary.com *.algolia.net *.algolianet.com; report-uri https://nhocom.report-uri.com/r/d/csp/enforce
Feature-Policy: accelerometer 'none';camera 'none';geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';payment 'none';usb 'none';ch-dpr 'self' https://res.cloudinary.com;ch-width 'self' https://res.cloudinary.com
Permissions-Policy: accelerometer=(),camera=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),payment=(),usb=(),ch-width=(self "https://res.cloudinary.com"),ch-dpr=(self "https://res.cloudinary.com")
Accept-CH: Save-Data,DPR,Width,Sec-CH-Prefers-Reduced-Data,Sec-CH-DPR, Sec-CH-Width
Expand Down
38 changes: 0 additions & 38 deletions src/_includes/components/google-analytics.njk

This file was deleted.

1 change: 0 additions & 1 deletion src/_includes/head.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
{% endif %}

{# Analytics #}
{% include 'components/google-analytics.njk' %}
{% include 'components/matomo.njk' %}

{% set cssFilename = "critical.css" %}
Expand Down
2 changes: 1 addition & 1 deletion src/about/the-website.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The external resources, potential sources of trouble, are mainly :

- the *players* of videos, including Youtube, Vimeo or Dailymotion
- the *widgets* of certain services, including Ulule, Speakerdeck or Slideshare
- Google Analytics, to find out what's going on on the site.
- Matomo, to find out what's going on on the site.

# Comments

Expand Down
Loading

0 comments on commit 3c517cc

Please sign in to comment.