ADNUNTIUS
Search…
Send segments Cxense

Send segments Client side

1
<div id="adn-0000000000024420" style="display:none"></div>
2
3
<!-- Get user segments, normal use, with async load of cx.js -->
4
<script type="text/javascript">
5
var cX = cX || {}; cX.callQueue = cX.callQueue || [];
6
window.adn = window.adn || {}; adn.calls = adn.calls || [];
7
8
cX.callQueue.push(['invoke', function() {
9
var segments = cX.getUserSegmentIds({ persistedQueryId: '9aa05d8e8105aa93dd1c54e82f24e5f0d0120821' });
10
console.log(segments)
11
adn.calls.push(function() {
12
adn.request({
13
segments: segments,
14
adUnits: [
15
{auId: '0000000000024420', auW: 0, auH: 0}
16
]});
17
});
18
19
20
}]);
21
// Async load of cx.js
22
(function(d,s,e,t){e=d.createElement(s);e.type='text/java'+s;e.async='async';
23
e.src='http'+('https:'===location.protocol?'s://s':'://')+'cdn.cxense.com/cx.js';
24
t=d.getElementsByTagName(s)[0];t.parentNode.insertBefore(e,t);})(document,'script');
25
(function(d, s, e, t) { e = d.createElement(s); e.type = 'text/java' + s; e.async = 'async';
26
e.src = 'http' + ('https:' === location.protocol ? 's' : '') + '://cdn.adnuntius.com/adn.js';
27
t = d.getElementsByTagName(s)[0]; t.parentNode.insertBefore(e, t); })(document, 'script');
28
</script>
Copied!
Last modified 7mo ago
Copy link