Skip to content

Commit

Permalink
Change amplitude project keys.
Browse files Browse the repository at this point in the history
Initialize amplitude only once in the amplitude.js file.
Bump version.
  • Loading branch information
ghinda committed Jun 28, 2019
1 parent 15b3df0 commit 1a88dfc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gorgias",
"version": "6.1.2",
"version": "6.1.3",
"description": "Gorgias grunt package",
"main": "index.js",
"scripts": {
Expand Down
10 changes: 0 additions & 10 deletions src/background/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,6 @@ gApp.run(function ($rootScope, $location, $http, $timeout, ProfileService, Setti
$rootScope.showStats = true;

SettingsService.get('settings').then(function (settings) {
if (ENV && ENV === 'production') {
amplitude.getInstance().init("e50d000bcba1aa363cd1f71642ed466a", {
saveEvents: false // don't store in localStorage the events - it slows down everything
});
} else if (ENV && ENV === 'development') {
amplitude.getInstance().init("a31babba9c8dedf2334c44d8acdad247", {
saveEvents: false // don't store in localStorage the events - it slows down everything
});
}

// Make sure that we have all the defaults
SettingsService.set('settings', _.defaults(settings, Settings.defaults.settings));

Expand Down
9 changes: 8 additions & 1 deletion src/background/js/utils/amplitude.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,11 @@
e.amplitude = n;
})(window, document);

amplitude.getInstance().init("a31babba9c8dedf2334c44d8acdad247");
var amplitudeKey = '1294f53908a5dbc50b8e14f25c272c81';
if (ENV && ENV === 'production') {
amplitudeKey = '2ed48634e41364b798b6f11df0cbe59a';
}

amplitude.getInstance().init(amplitudeKey, {
saveEvents: false // don't store in localStorage the events - it slows down everything
});
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "__MSG_extName__",
"version": "6.1.2",
"version": "6.1.3",
"description": "__MSG_extDesc__",
"short_name": "Gorgias",
"default_locale": "en",
Expand Down

0 comments on commit 1a88dfc

Please sign in to comment.