Skip to content

Commit

Permalink
Replace GA (#1803)
Browse files Browse the repository at this point in the history
* Fix typo on the front page (index.pug) (#1785)

"below" was spelt "bellow".

* Nav pug: rm GA adta attributes

* Layout pug: rm inclusion of GA scripts

* HelmetCsp: rm GA

* HelmetCsp: rm yet another GA

* Rm google-tag-manager.js

* Rm google-analytics.js

* Layout pug: add custom analytics script

* HelmetCsp: add datum.jsdelivr.com to scripts src

---------

Co-authored-by: Julian Melville <[email protected]>
  • Loading branch information
xbpcb and julianz authored Nov 14, 2023
1 parent 60844e5 commit 6b41074
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 66 deletions.
6 changes: 1 addition & 5 deletions config/helmet-csp.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ const CSP = {
'\'self\'',
'\'unsafe-inline\'',
'stackpath.bootstrapcdn.com',
'www.google-analytics.com',
'code.jquery.com',
'platform.twitter.com',
'api.github.com',
'https://cdn.jsdelivr.net',
'https://www.googletagmanager.com',
'https://datum.jsdelivr.com',
(req, res) => `'nonce-${res.locals.nonce}'`
],
styleSrc: [
Expand All @@ -28,7 +27,6 @@ const CSP = {
imgSrc: [
'\'self\'',
'data:',
'www.google-analytics.com',
'bootswatch.com',
'syndication.twitter.com',
'stats.g.doubleclick.net',
Expand Down Expand Up @@ -64,8 +62,6 @@ const CSP = {
connectSrc: [
'syndication.twitter.com',
'https://api.github.com/repos/jsdelivr/bootstrapcdn',
'www.google-analytics.com',
'https://analytics.google.com',
'https://stats.g.doubleclick.net'
],
objectSrc: ['img.shields.io'],
Expand Down
30 changes: 0 additions & 30 deletions public/assets/js/google-analytics.js

This file was deleted.

11 changes: 0 additions & 11 deletions public/assets/js/google-tag-manager.js

This file was deleted.

15 changes: 0 additions & 15 deletions views/_partials/nav.pug
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ nav.navbar.navbar-expand-xl.navbar-light.pt-4.pl-4.pr-4.pb-0.mx-auto
ul.nav.navbar-nav.ml-auto
li.nav-item
a.nav-link.d-flex.align-items-center.github-link.p-0.mr-4(href='https://github.com/jsdelivr/bootstrapcdn',
data-ga-category='Navigation',
data-ga-action='Github Projet',
data-ga-label='Font Awesome',
rel='noopener nofollow',
target='_blank',)
include /assets/img/github.svg
Expand All @@ -42,33 +39,21 @@ nav.navbar.navbar-expand-xl.navbar-light.pt-4.pl-4.pr-4.pb-0.mx-auto
ul.dropdown-menu.dropdown-menu-right.resource-dropwdown(aria-labelledby='navbarDropdownRight')
li.dropdown-item.resource-item.p-0.mb-3
a.nav-link.p-0(href='https://fontawesome.com/',
data-ga-category='Navigation',
data-ga-action='Resources',
data-ga-label='Font Awesome',
rel='noopener nofollow',
target='_blank') Font Awesome
include /assets/img/link_arrow.svg
li.dropdown-item.resource-item.p-0.mb-3
a.nav-link.p-0(href='https://bootswatch.com/',
data-ga-category='Navigation',
data-ga-action='Resources',
data-ga-label='Bootswatch',
rel='noopener nofollow',
target='_blank') Bootswatch
include /assets/img/link_arrow.svg
li.dropdown-item.resource-item.p-0.mb-3
a.nav-link.p-0(href='https://icons.getbootstrap.com/',
data-ga-category='Navigation',
data-ga-action='Resources',
data-ga-label='Bootstrap Icons',
rel='noopener nofollow',
target='_blank') Bootstrap Icons
include /assets/img/link_arrow.svg
li.dropdown-item.resource-item.p-0
a.nav-link.p-0(href='https://github.com/twbs/bootlint'
data-ga-category='Navigation',
data-ga-action='Resources',
data-ga-label='Bootlint',
rel='noopener nofollow',
target='_blank') Bootlint
include /assets/img/link_arrow.svg
Expand Down
2 changes: 1 addition & 1 deletion views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ extends layout.pug
block content
h2.second-heading.mb-3 Quick Start

p.sub-heading Get your production ready CDN links bellow. You can also automate your upgrades by pulling the latest versions from our API.
p.sub-heading Get your production ready CDN links below. You can also automate your upgrades by pulling the latest versions from our API.
-var current = config.files.bootstrap.find(file => file.current);
-var previous = config.files.bootstrap.find(file => semver.satisfies(file.version, '^4', { includePrerelease: true }));

Expand Down
6 changes: 2 additions & 4 deletions views/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ html(lang='en', prefix='og: http://ogp.me/ns#', itemscope, itemtype='http://sche
link(rel='dns-prefetch', href='https://fonts.googleapis.com')
link(rel='preconnect', href='https://fonts.gstatic.com')
link(href='https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap', rel='stylesheet')

link(rel='prefetch', href='/')
link(rel='prerender', href='/')
link(rel='prefetch', href='/fontawesome/')
Expand Down Expand Up @@ -60,12 +60,10 @@ html(lang='en', prefix='og: http://ogp.me/ns#', itemscope, itemtype='http://sche
script(nonce=nonce)
include /assets/js/vendor/loadjs.min.js
include _partials/loadjs.pug
include /assets/js/google-analytics.js
include /assets/js/google-tag-manager.js

script(async, src='https://platform.twitter.com/widgets.js')
script(async, defer, src='https://cdn.jsdelivr.net/npm/github-buttons@2')
script(async, src='https://www.googletagmanager.com/gtag/js?id=G-WWCYVX0YTQ')
script(defer, data-domain='bootstrapcdn.com', src='https://datum.jsdelivr.com/js/script.js')

block scripts

Expand Down

0 comments on commit 6b41074

Please sign in to comment.