wings
ADscore

How do I use the JavaScript Proxy implementation?

First, it’s important to keep in mind that the JavaScript proxy implementation will only work within asynchronous application logic — basically, think of the script loading like if it used the async attribute.

Let’s say for your project, you want to asynchronously load a script for regular traffic and a different one for Bot traffic.

<script src="https://example.com/script.js"></script>

COPY

Here’s what you have to do:

  1. Visit the Zones page on your Dashboard and click the Generate Zone Link or Code button
  2. Select the JavaScript Proxy implementation
  3. Paste the link to the script in Script link for good traffic field (for our example: https://example.com/script.js)
  4. Select Bot from the Undesirable Traffic Types
  5. Either paste in another link in the Script link for undesirable traffic field, or just leave it empty
  6. Click the Generate button and copy the generated link
  7. On your website, replace the original link inside the src attribute, with the one you’ve just copied
<script src="https://c.adsco.re/j?QqwsAAAAAAAAqAU_aT3-WDLGI3kBqJoIPDTnbjE,,3,,AALltx8WwVt79T6PxTjGtwdwD0fDFX2Uins0bhWmfh_-c3imjDcOKsHGpwEEC0wZRM_G1hZokILU3C-Y8YHKnSM2irw1oBbjOsSP3E77VJpnRAL8qJrq7N5m5Pe1i16he2IBoXYqGl6wEzpqX-QSzoO14lwLs3YOpAaHArFfsJoea8VjESRJon2vx-GH2CGqzvhPh_vXdEyouwYvWGsQBcK9"></script>

COPY

Mission accomplished: from now on, only the types of traffic that you intend to, will be loading your script.