MCPcopy Create free account
hub / github.com/ampproject/amphtml / widespace

Function widespace

ads/vendors/widespace.js:7–26  ·  view source on GitHub ↗
(global, data)

Source from the content-addressed store, hash-verified

5 * @param {!Object} data
6 */
7export function widespace(global, data) {
8 const WS_AMP_CODE_VER = '1.0.1';
9 // Optional demography parameters.
10 let demo = [];
11
12 demo = ['Gender', 'Country', 'Region', 'City', 'Postal', 'Yob'].map((d) => {
13 return 'demo' + d;
14 });
15
16 validateData(data, ['sid'], demo);
17
18 const url =
19 'https://engine.widespace.com/map/engine/dynamic?isamp=1' +
20 '&ampver=' +
21 WS_AMP_CODE_VER +
22 '&#sid=' +
23 encodeURIComponent(data.sid);
24
25 writeScript(global, url);
26}

Callers

nothing calls this directly

Calls 2

validateDataFunction · 0.90
writeScriptFunction · 0.90

Tested by

no test coverage detected