Skip to content

Commit d507246

Browse files
authored
feat(analytics): replace GA with Plausible (#17)
Remove Google Analytics tracking and replace it with a self-hosted instance of Plausible. .No more Google spyware. closes #16
1 parent bd4f1be commit d507246

13 files changed

Lines changed: 15 additions & 1282 deletions

.github/workflows/calibreapp-image-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
- "**.webp"
2424
workflow_dispatch:
2525
jobs:
26-
build:
26+
compress-images:
2727
name: calibreapp/image-actions
2828
runs-on: ubuntu-latest
2929
# Only run on main repo on and PRs that match the main repo.

.github/workflows/deploy_production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
2020

2121
jobs:
22-
build:
22+
deploy-production:
2323
runs-on: ubuntu-latest
2424
steps:
2525
# DEPENDENCIES

.github/workflows/deploy_staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
2020

2121
jobs:
22-
build:
22+
deploy-staging:
2323
runs-on: ubuntu-latest
2424
steps:
2525
# DEPENDENCIES

.github/workflows/test_builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
workflow_dispatch:
2222

2323
jobs:
24-
test_builds:
24+
test-builds:
2525
runs-on: ubuntu-latest
2626
steps:
2727
# DEPENDENCIES

Gruntfile.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ module.exports = function (grunt) {
125125
jshintrc: true,
126126
reporter: require("jshint-stylish"),
127127
},
128-
beforeconcat: ["site/_js/{,*/}*.js", "!site/_js/autotrack.js", "!site/_js/jquery.min.js"],
128+
beforeconcat: ["site/_js/{,*/}*.js", "!site/_js/jquery.min.js"],
129129
},
130130

131131
uglify: {
@@ -138,7 +138,6 @@ module.exports = function (grunt) {
138138
files: {
139139
"site/assets/customScripts.js": [
140140
"site/_js/jquery.min.js",
141-
"site/_js/autotrack.js",
142141
"site/_js/custom.js",
143142
"site/_js/jquery.fitvids.js",
144143
"site/_js/webfont.js",
@@ -153,7 +152,6 @@ module.exports = function (grunt) {
153152
files: {
154153
"site/assets/customScripts.js": [
155154
"site/_js/jquery.min.js",
156-
"site/_js/autotrack.js",
157155
"site/_js/custom.js",
158156
"site/_js/jquery.fitvids.js",
159157
"site/_js/webfont.js",

_config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
# Environment Specific
33
environment: dev
44
url: "http://localhost:8000"
5-
analyticsID: UA-80560-6
65
destination: ./_site
7-
include-js: true
86
giscus_data_category_id: DIC_kwDOIM6z9s4CSAJf
97
giscus_data_category: staging-comments
8+
plausible_domain: "staging.natelandau.com"
109

1110
# Shared options
1211
# ------------------------------------------------------

_config_production.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
environment: production
33
url: "https://natelandau.com"
4-
analyticsID: UA-80560-5
54
destination: ./_siteProd
6-
include-js: true
75
giscus_data_category_id: DIC_kwDOIM6z9s4CSACn
86
giscus_data_category: Comments
7+
plausible_domain: "natelandau.com"

_config_staging.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
environment: staging
33
url: "https://staging.natelandau.com"
4-
analyticsID: UA-80560-6
54
disqusShortName: natelandaudev
65
destination: ./_siteStage
7-
include-js: true
86
giscus_data_category_id: DIC_kwDOIM6z9s4CSAJf
97
giscus_data_category: staging-comments
8+
plausible_domain: "staging.natelandau.com"

site/_includes/global.footer.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
<a href="https://feeds.natelandau.com/rss"><i class="fa fa-rss"></i>&nbsp;&nbsp;RSS Feed</a><br />
1111
<a href="{{ site.url }}/feed.json"><i class="fa fa-link"></i>&nbsp;&nbsp;JSON Feed</a>
1212
<br /><br />
13+
This site does NOT use Google Analytics.
14+
<br /><br />
1315
<span class="normal">&copy; Copyright {{ site.time | date: '%Y' }}. All Rights Reserved.</span>
16+
<br /><br />
1417
</div><!-- /lower-item -->
1518

1619
<div class="lower-item">
@@ -52,7 +55,7 @@
5255
The following code defers loading of Javascript until after the page is fully loaded
5356
As taken from: https://varvy.com/pagespeed/defer-loading-javascript.html
5457
{% endcomment %}
55-
{% if site.include-js != false -%}
58+
5659
<script type="text/javascript">
5760
function downloadJSAtOnload() {
5861
var element = document.createElement("script");
@@ -65,7 +68,7 @@
6568
window.attachEvent("onload", downloadJSAtOnload);
6669
else window.onload = downloadJSAtOnload;
6770
</script>
68-
{% endif -%}
71+
6972

7073
{% if post.youtubeEmbed == "true" -%}
7174
<script type="text/javascript">

site/_includes/global.header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{% include header.twittercard.html %}
3131
{% include header.favicons.html %}
3232
{% include header.css.html %}
33-
{% if site.include-js != false %}{% include header.analytics.html %}{% endif %}
33+
{% include header.analytics.html %}
3434
</head>
3535
<body id="{{ page.layout }}">
3636
<div class="page-top"></div>

0 commit comments

Comments
 (0)