1. Home
  2. Docs
  3. Publisher
  4. Required Actions On Your Side
  5. On Web: JS Code implementation

On Web: JS Code implementation

It is necessary to embed JavaScript code on the website containing the player. This code is used to profile ads and synchronize ULID.

Embedding involves inserting the JS code at the end of the page, just before the closing tag

</body>.
<script async defer src="https://play.adtonos.com/attc-{name}.min.js"></script>  

where {name} is a variable provided in the “integration” tab of AdTonos’ Dashboard (https://app.adtonos.com/publisher/integration).

Additionally, it is possible to pass the listener’s disagreement on profiling. To do this it should be done before (above) mentioned JS code:

<script>
window.adtonosOptOuts = ['*'];
</script>
<script async defer src="https://play.adtonos.com/attc-{name}.min.js"></script>  

Example JS code when another variable specifying the consent for profiling is available:

<script>
if (!gdprAllowPersonalizedAds) {
  window.adtonosOptsOuts = ['*'];
}
</script>
<script async defer src="https://play.adtonos.com/attc-{name}.min.js"></script>  

Was this article helpful to you? Yes No

How can we help?