Skip to content

Commit

Permalink
Merge pull request #1182 from ylecuyer/remove-google-analytics
Browse files Browse the repository at this point in the history
Remove Google Analytics and sendUsageStatistics
  • Loading branch information
jung-kim authored Feb 11, 2019
2 parents e9738ba + 3b07db4 commit c0f8ee8
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 36 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
Use the following format for additions: ` - VERSION: [feature/patch (if applicable)] Short description of change. Links to relevant issues/PRs.`

- 1.4.41: Remove Google Analytics [#1182](https://github.com/FredrikNoren/ungit/pull/1182)
- 1.4.40: Remove Keen.io [#1180](https://github.com/FredrikNoren/ungit/pull/1180)
- 1.4.39: Add git bin path config. [#1151](https://github.com/FredrikNoren/ungit/issues/1151)
- 1.4.38: Fix: Highlight current branch in submodules
Expand Down
1 change: 0 additions & 1 deletion components/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<button type="button" class="close" data-bind="click: dismissBugtrackingNagscreen">&times;</button>
<p><strong>Help make ungit better with the press of a button!</strong></p>

<button class="btn btn-primary" data-bind="click: enableBugtrackingAndStatistics">Enable automatic bug reports + anonymous usage statistics</button>
<button class="btn btn-primary" data-bind="click: enableBugtracking">Enable automatic bug reports</button>
<button class="btn btn-default" data-bind="click: dismissBugtrackingNagscreen">Naah, I&#39;ll skip that</button>
</div>
Expand Down
6 changes: 1 addition & 5 deletions components/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,14 @@ class AppViewModel {
return dialog;
}));
}
gitSetUserConfig(bugTracking, sendUsageStatistics) {
gitSetUserConfig(bugTracking) {
this.server.getPromise('/userconfig')
.then((userConfig) => {
userConfig.bugtracking = bugTracking;
if (sendUsageStatistics != undefined) userConfig.sendUsageStatistics = sendUsageStatistics;
return this.server.postPromise('/userconfig', userConfig)
.then(() => { this.bugtrackingEnabled(bugTracking); });
});
}
enableBugtrackingAndStatistics() {
this.gitSetUserConfig(true, true);
}
enableBugtracking() {
this.gitSetUserConfig(true);
}
Expand Down
3 changes: 0 additions & 3 deletions components/gitErrors/gitErrors.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ <h3><span class="glyphicon glyphicon-warning-sign"></span> Unhandled git error!<
Ungit tried to run a git command that resulted in an unhandled error. <span data-bind="visible: bugReportWasSent">An automatic bug report was sent.</span>
</p>
<p data-bind="visible: tip, text: tip"></p>
<p data-bind="visible: showEnableBugtracking">
<button class="btn btn-primary" data-bind="click: enableBugtrackingAndStatistics">Enable bugtracking + usage statistics</button> to automatically report bugs, and/or <a href="https://github.com/FredrikNoren/ungit/issues" target="_blank">file an issue on the ungit issue tracker</a>.
</p>
<h4>Command</h4>
<pre data-bind="text: command"></pre>
<h4>Error</h4>
Expand Down
9 changes: 0 additions & 9 deletions components/gitErrors/gitErrors.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,4 @@ class GitErrorViewModel {
dismiss() {
this.gitErrors.gitErrors.remove(this);
}

enableBugtrackingAndStatistics() {
this.server.getPromise('/userconfig')
.then(userConfig => {
userConfig.bugtracking = true;
userConfig.sendUsageStatistics = true;
return this.server.postPromise('/userconfig', userConfig)
}).then(() => { this.showEnableBugtracking(false); })
}
}
1 change: 0 additions & 1 deletion nmclicktests/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ class Environment {
'--no-launchBrowser',
'--dev',
'--no-bugtracking',
'--no-sendUsageStatistics',
`--autoShutdownTimeout=${this.config.serverTimeout}`,
'--logLevel=debug',
'--maxNAutoRestartOnCrash=0',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ungit",
"author": "Fredrik Norén <fredrik.jw.noren@gmail.com>",
"description": "Git made easy",
"version": "1.4.40",
"version": "1.4.41",
"ungitPluginApiVersion": "0.2.0",
"scripts": {
"start": "node ./bin/ungit",
Expand Down
11 changes: 0 additions & 11 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,6 @@
<!-- ungit-plugins-placeholder -->

<script type="text/javascript">
if (ungit.config.sendUsageStatistics) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-42045410-1', { 'cookieDomain': 'none' });
ga('send', 'pageview');
console.log('Google analytics inited');
}

require('ungit-main').start();
</script>

Expand Down
4 changes: 0 additions & 4 deletions source/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ const defaultConfig = {
// This will automatically send anonymous bug reports.
bugtracking: false,

// Google analytics for usage statistics.
sendUsageStatistics: false,

// True to enable authentication. Users are defined in the users configuration property.
authentication: false,

Expand Down Expand Up @@ -189,7 +186,6 @@ let argv = yargs
.describe('logGitCommands', 'Write git commands issued to the log')
.describe('logGitOutput', 'Write the result of git commands issued to the log')
.describe('bugtracking', 'This will automatically send anonymous bug reports')
.describe('sendUsageStatistics', 'Google analytics for usage statistics')
.describe('authentication', 'True to enable authentication. Users are defined in the users configuration property')
.describe('users', 'Map of username/passwords which are granted access')
.describe('showRebaseAndMergeOnlyOnRefs', 'Set to false to show rebase and merge on drag and drop on all nodes')
Expand Down

0 comments on commit c0f8ee8

Please sign in to comment.