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

Remove Google Analytics #42

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions README.md
Expand Up @@ -15,11 +15,6 @@ A Jekyll Theme based on [Material Design](https://material.io/) using [Materiali
<a href="https://imgur.com/hlB1MOw"><img src="https://i.imgur.com/hlB1MOw.gif" title="source: imgur.com" /></a>

<a href="https://imgur.com/qjhId2x"><img src="https://imgur.com/qjhId2x.gif" title="source: imgur.com" /></a>
##### Cookie Policy

If you use cookies on your site, or choose to use Google Analytics, you're able to notify visitors with this prompt. The ```Thanks!``` dialog message can be customised in your ```_config.yml``` file.

<a href="https://imgur.com/O7sICnY"><img src="https://i.imgur.com/O7sICnY.gif" title="source: imgur.com" /></a>

##### Tools and Experience Section

Expand Down
8 changes: 0 additions & 8 deletions _config.yml
Expand Up @@ -152,14 +152,6 @@ medium: https://medium.com
baseurl: # if your site is located at /blog or /home, enter it here, otherwise leave it empty
url: http://localhost:4000/ #the url of your site

# Google tracking, if both are filled, tag manager will prevail. Set up GA through GTM in that case
tag_manager_id: # This looks something like GTM-XXXXXXX
google_analytics_tracking_id: # This looks something like UA-000000000-0 Head over to https://analytics.google.com/ to setup.

cookies_banner: show # The value "show" will show the cookies banner, the value "none" will hide the banner.

cookie_accept_message: Thanks!

syntax_highlighting: true # include the css for syntax highlighting

# Build settings
Expand Down
10 changes: 0 additions & 10 deletions _includes/cookies.html

This file was deleted.

11 changes: 0 additions & 11 deletions _includes/google_analytics.html

This file was deleted.

14 changes: 0 additions & 14 deletions _includes/head.html
@@ -1,14 +1,6 @@
<!DOCTYPE html>
<html>
<head>
{% if jekyll.environment == 'production' %}
{% if site.tag_manager_id %}
{% include google_tag_manager.html %}
{% elsif site.google_analytics_tracking_id %}
{% include google_analytics.html %}
{% endif %}
{% endif %}

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="{{site.baseurl}}/assets/css/materialize.css">
Expand All @@ -20,10 +12,4 @@
<title>{{site.title}}</title>
</head>
<body>
{% if site.tag_manager_id and jekyll.environment == 'production' %}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{site.tag_manager_id}}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{% endif %}

5 changes: 0 additions & 5 deletions _layouts/home.html
Expand Up @@ -17,11 +17,6 @@ <h5 class="header col s12 light">{{ site.description }}</h5>
</div>
</div>

<div id="cookies" style="display:{{site.cookies_banner}}">
<p style="text-align:left; padding-left:8px"><a value="hide/show" id="check" class="waves-effect waves-light green lighten-1 btn btn-floating pulse" onclick="Materialize.toast('{{site.cookie_accept_message}}', 2000)" ><i class="material-icons">check</i></a></p>
{% include cookies.html %}
</div>

<div class="container" style="padding:20px;">
<div id="portfolio" class="section scrollspy">

Expand Down
10 changes: 0 additions & 10 deletions assets/js/init.js
Expand Up @@ -8,15 +8,5 @@
$('.materialboxed').materialbox();
$('.scrollspy').scrollSpy();
$('.tap-target').tapTarget('open');

if (localStorage.getItem('cookieconsent') === 'true') {
$('#cookies').hide()
}

jQuery('#cookies').on('click', function(event) {
localStorage.setItem('cookieconsent', 'true')
jQuery('#cookies').toggle('hide');
});

}); // end of document ready
})(jQuery);