analytics-utils
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,5 +5,7 @@ 'use strict'; | ||
var inBrowser = require('./inBrowser'); | ||
module.exports = getUrlParams; | ||
function getUrlParams(url) { | ||
if (typeof window === 'undefined') { | ||
if (!inBrowser) { | ||
return {}; | ||
@@ -10,0 +12,0 @@ } |
'use strict'; | ||
var inBrowser = require('./inBrowser'); | ||
module.exports = isExternalReferrer; | ||
function isExternalReferrer() { | ||
if (typeof document !== 'undefined' && document.referrer) { | ||
if (inBrowser && document.referrer) { | ||
var port = window.document.location.port; | ||
@@ -7,0 +9,0 @@ var ref = document.referrer.split('/')[2]; |
'use strict'; | ||
var isInBrowser = require('./isInBrowser'); | ||
var inBrowser = require('./inBrowser'); | ||
module.exports = removeUTMFromUrl; | ||
function removeUTMFromUrl() { | ||
if (isInBrowser) { | ||
if (inBrowser) { | ||
var _window = window, | ||
@@ -9,0 +9,0 @@ history = _window.history, |
@@ -0,4 +1,5 @@ | ||
import inBrowser from './inBrowser' | ||
export default function getUrlParams(url) { | ||
if (typeof window === 'undefined') { | ||
if (!inBrowser) { | ||
return {} | ||
@@ -5,0 +6,0 @@ } |
@@ -0,4 +1,5 @@ | ||
import inBrowser from './inBrowser' | ||
export default function isExternalReferrer() { | ||
if (typeof document !== 'undefined' && document.referrer) { | ||
if (inBrowser && document.referrer) { | ||
const port = window.document.location.port | ||
@@ -5,0 +6,0 @@ let ref = document.referrer.split('/')[2] |
@@ -1,5 +0,5 @@ | ||
import isInBrowser from './isInBrowser' | ||
import inBrowser from './inBrowser' | ||
export default function removeUTMFromUrl () { | ||
if (isInBrowser) { | ||
if (inBrowser) { | ||
const { history, location } = window | ||
@@ -6,0 +6,0 @@ if (location.search.indexOf('utm_') !== -1 && history && history.replaceState) { |
{ | ||
"name": "analytics-utils", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
117434
3439
0