---
updatedAt: 2026-04-07T10:11:14.000Z
agentTools:
  siteIndex: https://developers.liveramp.com/llms.txt
  projectIndex: https://developers.liveramp.com/authenticatedtraffic-api/v1.0/llms.txt
---

# Installing ATS.js

[block:callout]
{
  "type": "danger",
  "body": "We are focusing our future development on version 2.0 of ATS.js. To make sure you continue to be able to use ATS, please transition to version 2 as soon as possible. We know this can be a hassle, and we apologize for the inconvenience. See [Migrate to Version 2 of ATS.js](https://docs.liveramp.com/privacy-manager/en/migrate-to-version-2-of-ats-js.html) to learn more or talk to one of our [representatives](mailto:atsimplementation@liveramp.com).",
  "title": "This Version of ATS.js is Going to be Deprecated"
}
[/block]

An ats.js installation runs alongside prebid.js. ATS provides envelopes into demand using a UserID submodule and compatible adapters. ATS can also run in proprietary or custom wrappers as an external dependency.

## Add the ATS script

Add the following script just before the closing `</body>` tag to ensure that the page is fully rendered and ready for user interaction.

[block:code]
{
  "codes": [
    {
      "code": "<script>\nvar atsScript = document.createElement('script');\natsScript.onload = function() {\n  window.ats.start({\n    \"placementID\": REPLACE_ME,\n    \"storageType\": \"localStorage\",\n    \"detectionType\": \"scrapeAndUrl\",\n    \"urlParameter\": \"env\",\n    \"cssSelectors\": [\n      \"input[type=text]\",\n      \"input[type=email]\"\n    ],\n    \"logging\": \"error\"\n  });\n};\natsScript.src = 'https://ats.rlcdn.com/ats.js';\ndocument.body.appendChild(atsScript);\n</script>",
      "language": "html",
      "name": "ats.js snippet"
    }
  ]
}
[/block]

To make envelopes available to demand, you must start ATS using a valid configuration object. The example above will automatically detect valid identifiers entered into input fields of type "text" or "email". If possible, [dynamically pass a user identifier into the configuration object](https://docs.authenticated-traffic-solution.com/docs/atsjs-configuration-options#section-direct) rather than relying on detection.

[block:callout]
{
  "type": "info",
  "title": "About the `placementID`",
  "body": "You must update the `placementID` from `REPLACE_ME` to valid placementID provided by LiveRamp. Contact us at **ats@liveramp.com** if you require a placementID."
}
[/block]

For more information and instructions to create this configuration objection, see << link to the correct section >>.

[block:callout]
{
  "type": "success",
  "title": "Loading ats.js asynchronously in `<head>`",
  "body": "You can add the \"async\" attribute to the tag if you'd like to load ats.js in the document head without blocking render."
}
[/block]