Skip to content

Commit 65bb882

Browse files
committed
changed google analytics to anonIp session cookies, removed pa tracing, filter user data from logs
1 parent 51bbab2 commit 65bb882

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

app/assets/javascripts/analytics.js.coffee

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ document.addEventListener 'turbolinks:load', ->
77
@trackPageView = ->
88
if window.ga?
99
ga('set', 'location', location.href.split('#')[0])
10-
ga('set', 'userId', document.current_user_id) if document.current_user_id?
1110
ga('send', 'pageview', { "title": document.title })
1211

1312
@registerEventTracking = ->

app/views/layouts/application.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@
4040
%p.inline-block.diminish.inline.mr1="Copyright #{Time.now.strftime('%Y')}"
4141

4242
= redux_store("store", props: store_data) if store_data
43-
= render 'shared/tracking'
43+
-# gdpr disabled render 'shared/tracking'

app/views/layouts/minimal.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
%body
1515
=yield
1616

17-
= render 'shared/tracking'
17+
-# gdpr disabled render 'shared/tracking'

app/views/pages/privacy.html.haml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
- title "Privacy Policy"
2+
23
.container
34
%h1 Privacy Policy
4-
%h4 UPDATED April 17th 2014
5+
%h4 UPDATED May 25th 2018
56

67
%p Assembly Made, Inc. (“Assembly Made”, “our”, “us” or “we”) provides this Privacy Policy to inform you of our policies and procedures regarding the collection, use and disclosure of personal information we receive from users of coderwall.com (this “Site” or "Coderwall").
78

app/views/shared/_analytics.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<!-- https://developers.google.com/analytics/devguides/collection/analyticsjs/sending-hits -->
21
<% if ENV['GOOGLE_ANALYTICS_UA'].present? %>
32
<script>
43
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
54
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
65
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
76
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
87

9-
ga('create', '<%= ENV['GOOGLE_ANALYTICS_UA'] %>', 'auto');
8+
ga('create', '<%= ENV['GOOGLE_ANALYTICS_UA'] %>', 'auto', {'cookieExpires': 0});
9+
ga('set', 'anonymizeIp', true);
1010
</script>
1111
<% else #LOG EVENTS DIRECTLY TO WEB CONSOLE %>
1212
<script>
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
# Be sure to restart your server when you modify this file.
22

33
# Configure sensitive parameters which will be filtered from the log file.
4-
Rails.application.config.filter_parameters += [:password]
4+
Rails.application.config.filter_parameters += [
5+
:password,
6+
:password_confirmation,
7+
:username,
8+
:email,
9+
:name,
10+
:avatar,
11+
:title,
12+
:country,
13+
:city,
14+
:state_name,
15+
:company,
16+
:about,
17+
:team_id,
18+
:last_ip
19+
]

0 commit comments

Comments
 (0)