@blotoutio/edgetag-sdk-js
Advanced tools
Comparing version 0.45.4 to 0.46.0
@@ -13,2 +13,3 @@ 'use strict'; | ||
get keys () { return keys; }, | ||
get setConfig () { return setConfig; }, | ||
get tag () { return tag; }, | ||
@@ -18,2 +19,8 @@ get user () { return user; } | ||
const _config = {}; | ||
const setConfig$1 = (config) => { | ||
Object.assign(_config, config); | ||
}; | ||
const getConfig = () => _config; | ||
const getUserAgent = () => { | ||
@@ -44,6 +51,8 @@ try { | ||
try { | ||
// we need to leave this one in for existing Custom pixel customers | ||
if (window.edgetagData && window.edgetagData['pageUrl']) { | ||
return window.edgetagData['pageUrl']; | ||
} | ||
return window.location.href; | ||
const { pageUrl } = getConfig(); | ||
return pageUrl || window.location.href; | ||
} | ||
@@ -370,3 +379,3 @@ catch { | ||
locale: getLocale(), | ||
sdkVersion: "0.45.4" , | ||
sdkVersion: "0.46.0" , | ||
...(payload || {}), | ||
@@ -1133,2 +1142,6 @@ }; | ||
const handleConfig = (config) => { | ||
setConfig$1(config); | ||
}; | ||
const init = (preferences) => { | ||
@@ -1164,2 +1177,5 @@ handleInit(preferences); | ||
}; | ||
const setConfig = (config) => { | ||
return handleConfig(config); | ||
}; | ||
@@ -1174,3 +1190,4 @@ exports.consent = consent; | ||
exports.keys = keys; | ||
exports.setConfig = setConfig; | ||
exports.tag = tag; | ||
exports.user = user; |
@@ -13,2 +13,4 @@ import { ProvidersConfig } from '@blotoutio/cdn/types' | ||
PersistType, | ||
ConfigOptions, | ||
ConsentOptions, | ||
} from '@blotoutio/shared/utility-sdk' | ||
@@ -48,3 +50,3 @@ | ||
export declare const consent: (consent: Data) => void | ||
export declare const consent: (consent: Data, options: ConsentOptions) => void | ||
@@ -75,2 +77,4 @@ export declare const user: ( | ||
export declare const setConfig: (config: ConfigOptions) => void | ||
export declare global { | ||
@@ -77,0 +81,0 @@ interface Window { |
{ | ||
"name": "@blotoutio/edgetag-sdk-js", | ||
"version": "0.45.4", | ||
"version": "0.46.0", | ||
"description": "JS SDK for EdgeTag", | ||
@@ -5,0 +5,0 @@ "author": "Blotout", |
Sorry, the diff of this file is not supported yet
73633
2416