@snowplow/browser-plugin-geolocation
Advanced tools
Comparing version
/*! | ||
* Attaches Geolocation data to Snowplow events v3.1.5 (http://bit.ly/sp-js) | ||
* Attaches Geolocation data to Snowplow events v3.1.6 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -36,3 +36,3 @@ * Licensed under BSD-3-Clause | ||
*/ | ||
var navigatorAlias = navigator, _trackers = {}; | ||
var _trackers = {}; | ||
var geolocation, geolocationContextAdded = false; | ||
@@ -75,2 +75,3 @@ /** | ||
if (trackers === void 0) { trackers = Object.keys(_trackers); } | ||
var navigatorAlias = navigator; | ||
trackers.forEach(function (t) { | ||
@@ -77,0 +78,0 @@ //Mark as enabled |
/*! | ||
* Attaches Geolocation data to Snowplow events v3.1.5 (http://bit.ly/sp-js) | ||
* Attaches Geolocation data to Snowplow events v3.1.6 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -42,3 +42,3 @@ * Licensed under BSD-3-Clause | ||
*/ | ||
var navigatorAlias = navigator, _trackers = {}; | ||
var _trackers = {}; | ||
var geolocation, geolocationContextAdded = false; | ||
@@ -81,2 +81,3 @@ /** | ||
if (trackers === void 0) { trackers = Object.keys(_trackers); } | ||
var navigatorAlias = navigator; | ||
trackers.forEach(function (t) { | ||
@@ -83,0 +84,0 @@ //Mark as enabled |
/*! | ||
* Attaches Geolocation data to Snowplow events v3.1.5 (http://bit.ly/sp-js) | ||
* Attaches Geolocation data to Snowplow events v3.1.6 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -7,3 +7,3 @@ * Licensed under BSD-3-Clause | ||
"use strict";!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((o="undefined"!=typeof globalThis?globalThis:o||self).snowplowGeolocation={})}(this,(function(o){function t(o){void 0===o&&(o=Object.keys(i)),o.forEach((function(o){i[o]=[!0,e]})),!a&&n.geolocation&&n.geolocation.getCurrentPosition&&(a=!0,n.geolocation.getCurrentPosition((function(o){var t=o.coords;for(var n in e={schema:"iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0",data:{latitude:t.latitude,longitude:t.longitude,latitudeLongitudeAccuracy:t.accuracy,altitude:t.altitude,altitudeAccuracy:t.altitudeAccuracy,bearing:t.heading,speed:t.speed,timestamp:Math.round(o.timestamp)}},i)Object.prototype.hasOwnProperty.call(i,n)&&i[n][0]&&(i[n]=[!0,e])})))}var e,n=navigator,i={},a=!1;o.GeolocationPlugin=function(o){var e;return void 0===o&&(o=!1),{activateBrowserPlugin:function(n){e=n.id,i[n.id]=[!1,void 0],o&&t([e])},contexts:function(){var o,t=null===(o=i[e])||void 0===o?void 0:o[1];return t?[t]:[]}}},o.enableGeolocationContext=t,Object.defineProperty(o,"__esModule",{value:!0})})); | ||
"use strict";!function(o,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((o="undefined"!=typeof globalThis?globalThis:o||self).snowplowGeolocation={})}(this,(function(o){function t(o){void 0===o&&(o=Object.keys(n));var t=navigator;o.forEach((function(o){n[o]=[!0,e]})),!i&&t.geolocation&&t.geolocation.getCurrentPosition&&(i=!0,t.geolocation.getCurrentPosition((function(o){var t=o.coords;for(var i in e={schema:"iglu:com.snowplowanalytics.snowplow/geolocation_context/jsonschema/1-1-0",data:{latitude:t.latitude,longitude:t.longitude,latitudeLongitudeAccuracy:t.accuracy,altitude:t.altitude,altitudeAccuracy:t.altitudeAccuracy,bearing:t.heading,speed:t.speed,timestamp:Math.round(o.timestamp)}},n)Object.prototype.hasOwnProperty.call(n,i)&&n[i][0]&&(n[i]=[!0,e])})))}var e,n={},i=!1;o.GeolocationPlugin=function(o){var e;return void 0===o&&(o=!1),{activateBrowserPlugin:function(i){e=i.id,n[i.id]=[!1,void 0],o&&t([e])},contexts:function(){var o,t=null===(o=n[e])||void 0===o?void 0:o[1];return t?[t]:[]}}},o.enableGeolocationContext=t,Object.defineProperty(o,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-plugin-geolocation", | ||
"version": "3.1.5", | ||
"version": "3.1.6", | ||
"description": "Attaches Geolocation data to Snowplow events", | ||
@@ -21,7 +21,8 @@ "homepage": "http://bit.ly/sp-js", | ||
"dependencies": { | ||
"@snowplow/browser-tracker-core": "3.1.5", | ||
"@snowplow/tracker-core": "3.1.5", | ||
"@snowplow/browser-tracker-core": "3.1.6", | ||
"@snowplow/tracker-core": "3.1.6", | ||
"tslib": "^2.3.0" | ||
}, | ||
"devDependencies": { | ||
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0", | ||
"@rollup/plugin-commonjs": "^17.1.0", | ||
@@ -44,3 +45,3 @@ "@rollup/plugin-node-resolve": "^11.2.0", | ||
"peerDependencies": { | ||
"@snowplow/browser-tracker": "~3.1.5" | ||
"@snowplow/browser-tracker": "~3.1.6" | ||
}, | ||
@@ -47,0 +48,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
36410
1.04%280
0.72%16
6.67%- Removed
- Removed
Updated