diff options
Diffstat (limited to 'StoneIsland/www/js')
| -rwxr-xr-x | StoneIsland/www/js/lib/_router.js | 3 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ProductView.js | 2 | ||||
| -rwxr-xr-x | StoneIsland/www/js/sdk/auth.js | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index 9927712a..43438854 100755 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -87,6 +87,9 @@ var SiteRouter = Router.extend({ else { app.view = app[name] } + + window.FirebasePlugin && window.FirebasePlugin.setScreenName(name) + app.header.set_back( !! app.view.back ) app.view.show() }.bind(this) diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index 6a61be1b..2743946a 100755 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -167,6 +167,8 @@ var ProductView = ScrollableView.extend({ this.$price.html(price) this.$body.html(body) + window.FirebasePlugin && window.FirebasePlugin.setScreenName('product:' + code) + this.$productHeader.toggleClass("wide", title.length > 48) var fits_large = !! this.fitLargeCodes[this.code] diff --git a/StoneIsland/www/js/sdk/auth.js b/StoneIsland/www/js/sdk/auth.js index fa8dd71c..bcfb2d3a 100755 --- a/StoneIsland/www/js/sdk/auth.js +++ b/StoneIsland/www/js/sdk/auth.js @@ -51,6 +51,9 @@ var auth = sdk.auth = (function(){ localStorage.setItem("yoox.access_token", access_token) localStorage.setItem("yoox.user_id", user_id) + + window.FirebasePlugin && window.FirebasePlugin.setUserId(user_id) + cb && cb() } auth.get_user = function(cb){ @@ -63,6 +66,7 @@ var auth = sdk.auth = (function(){ auth.user_id = -1 localStorage.removeItem("yoox.access_token") localStorage.removeItem("yoox.user_id") + cb && cb() } |
