web-manager 3.1.30 → 3.1.31

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -244,6 +244,7 @@ function Manager() {
244
244
  user.getIdToken(false)
245
245
  .then(function(token) {
246
246
  var done;
247
+
247
248
  fetch('https://us-central1-' + This.properties.options.libraries.firebase_app.config.projectId + '.cloudfunctions.net/bm_api', {
248
249
  method: 'POST',
249
250
  body: JSON.stringify({
@@ -252,7 +253,7 @@ function Manager() {
252
253
  payload: {
253
254
  newsletterSignUp: select('.auth-newsletter-input').getValue(),
254
255
  affiliateCode: This.storage().get('auth.affiliateCode', ''),
255
- }
256
+ },
256
257
  }),
257
258
  })
258
259
  .catch(function () {})
package/lib/account.js CHANGED
@@ -328,6 +328,17 @@ Account.prototype._resolveAccount = function (firebaseUser, account, options) {
328
328
  account.activity.created.timestamp = account.activity.created.timestamp || '1970-01-01T00:00:00.000Z';
329
329
  account.activity.created.timestampUNIX = account.activity.created.timestampUNIX || 0;
330
330
 
331
+ account.activity.geolocation = account.activity.geolocation || {};
332
+ account.activity.geolocation.ip = account.activity.geolocation.ip || 'unknown';
333
+ account.activity.geolocation.continent = account.activity.geolocation.continent || 'unknown';
334
+ account.activity.geolocation.country = account.activity.geolocation.country || 'unknown';
335
+ account.activity.geolocation.city = account.activity.geolocation.city || 'unknown';
336
+ account.activity.geolocation.latitude = account.activity.geolocation.latitude || 'unknown';
337
+ account.activity.geolocation.longitude = account.activity.geolocation.longitude || 'unknown';
338
+ account.activity.geolocation.userAgent = account.activity.geolocation.userAgent || 'unknown';
339
+ account.activity.geolocation.language = account.activity.geolocation.language || 'unknown';
340
+ account.activity.geolocation.platform = account.activity.geolocation.platform || 'unknown';
341
+
331
342
  // Api
332
343
  account.api = account.api || {};
333
344
  account.api.clientId = account.api.clientId || 'unknown';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "3.1.30",
3
+ "version": "3.1.31",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "index.js",
6
6
  "scripts": {