diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-08-05 12:23:06 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-08-05 12:23:06 +0200 |
| commit | d738bb120f86d491729a928cec275ff26c90cc09 (patch) | |
| tree | 74d8354d28d4e837586c84b8aa2f338c78e7e41e /StoneIsland/www/js/index.js | |
| parent | 371bbbb0a4dc3e6c44d3c4b91e330002c078cd78 (diff) | |
adding analytics to push notifications
Diffstat (limited to 'StoneIsland/www/js/index.js')
| -rwxr-xr-x | StoneIsland/www/js/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 8574372d..9bc77c38 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -89,6 +89,7 @@ var app = (function(){ document.addEventListener('offline', app.offline, false) cordova.plugins.Keyboard.disableScroll(true) cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false) + analytics.init() geo.fetch() sim.fetch(app.api_ready) var image = new Image @@ -117,8 +118,11 @@ var app = (function(){ if (navigator.onLine) { app.account.connect(window.deepLinkRoute || '/intro') app.blog.fetch(function(){ - console.log("navigating to deep link route after fetch") + console.log("blog fetched, launching router") app.router.initial_route = window.deepLinkRoute || null + if (app.router.initial_route) { + analytics.send('push/' + app.router.initial_route) + } app.router.launch() }) } |
