Skip to content

Commit 7ef6af3

Browse files
Update dist files
1 parent 1db39d8 commit 7ef6af3

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

dist/audienceproject-data-web.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
_exports.moduleName = moduleName;
2323
var packageName = '@audienceproject/data-web';
2424
_exports.packageName = packageName;
25-
var packageVersion = '1.0.4';
25+
var packageVersion = '1.0.5';
2626
_exports.packageVersion = packageVersion;
2727
var fetchCache = {};
2828
_exports.fetchCache = fetchCache;
@@ -102,6 +102,27 @@
102102
throw new Error('Invalid customer ID');
103103
}
104104

105+
var getUserOptions = function getUserOptions() {
106+
var key = '__audienceProjectDataFetchOptions=';
107+
var parts = window.location.search.split(/[?&]/);
108+
var data;
109+
parts.some(function (part) {
110+
var matches = part.indexOf(key) === 0;
111+
112+
if (matches) {
113+
var value = part.slice(key.length);
114+
115+
try {
116+
data = JSON.parse(decodeURIComponent(value));
117+
} catch (error) {} // eslint-disable-line no-empty
118+
119+
}
120+
121+
return matches;
122+
});
123+
return data;
124+
};
125+
105126
var options = _extends({
106127
allowStorageAccess: true,
107128
allowPersonalisation: true,
@@ -121,7 +142,7 @@
121142
nonPersonalised: 'dnt-userreport.com'
122143
},
123144
debug: false
124-
}, customerOptions);
145+
}, customerOptions, getUserOptions());
125146

126147
var debugInfo = function debugInfo() {
127148
var _console;

dist/audienceproject-data-web.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)