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

# Advanced Configuration Options

These options are less commonly used, but can be quite useful for debugging and optimizing your ATS installation.

# Envelope Storage

By default, the envelope (along with a generation timestamp and version information) is written to a first-party cookie. You can alternative instruct ATS to write into a localStorage object by change the `storageType` attribute.

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"placementID\": 9999,\n  \"storageType\": \"localStorage\",\n  \"cssSelectors\": [\n    \"input[type=email]\"\n  ]\n}",
      "language": "json",
      "name": "Write to localStorage"
    }
  ]
}
[/block]

The following information would be stored as a first-party cookie:

| Name      | Value                     | Domain        | Path | Expires/Max-Age            |
| --------- | ------------------------- | ------------- | ---- | -------------------------- |
| `_lr_env` | `eyJlbnZlbG9wZSI6IkFpR05` | `example.com` | `/`  | `2020-08-16T13:50:04.454Z` |

Note that the expiration time of the cookie is one year from creation.

For localStorage, the following data would be set:

| Key       | Value                     |
| --------- | ------------------------- |
| `_lr_env` | `eyJlbnZlbG9wZSI6IkFpR05` |

If you run ATS across multiple domains, consider specifying the `rootDomain` attribute. This will ensure that the envelope is written (and made available) to the base domain, versus the current subdomain. For example, if users input identifiers on signup.example.com but your primary site runs on ads.example.com, you could use the following configuration:

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"placementID\": 9999,\n  \"storageType\": \"cookie\",\n  \"rootDomain\": \"example.com\",\n  \"cssSelectors\": [\n    \"input[type=email]\",\n    \"input[type=text]\"\n  ]\n};",
      "language": "json",
      "name": "Root Domain"
    }
  ]
}
[/block]

[block:callout]
{
  "type": "warning",
  "title": "rootDomain and storageType",
  "body": "You must use cookies for storage if using rootDomain; localStorage is always bound to the subdomain."
}
[/block]

# Detection Options

## Browser-Specific Detection

If you'd only like to run ATS on specific browsers, you can pass one more more browsers under the `browsers` attribute.

[block:code]
{
  "codes": [
    {
      "code": "\n{\n  \"placementID\": 9999,\n  \"cssSelectors\": [\n    \"#newsletterSignup\"\n  ],\n  \"browsers\": [\n    \"safari\"\n  ]\n}",
      "language": "json",
      "name": "Safari-Only Detection"
    }
  ]
}
[/block]

Valid browser values are: `["ie","edge","safari","firefox","chrome"]`

## Periodic Detection

By default, ATS will run when the library is first loaded. If you would like ATS to check for identifiers on a regular basis, you may configure the detection interval. This is useful if, for example, you expect an asynchronous process to populate the user's email address in a DOM element.

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"placementID\": 9999,\n  \"cssSelectors\": [\n    \"#newsletterSignup\"\n  ],\n  \"detectionInterval\": 10000\n}",
      "language": "json",
      "name": "Run detection every 10 seconds"
    }
  ]
}
[/block]

## Regex-limited Detection

ATS will run on all pages where you include and start it. If you would like to limit the pages on which ATS will attempt to run, you can pass a `urlRegex` in the configuration.

**Note:** `urlRegex` is case sensitive.

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"placementID\": 9999,\n  \"cssSelectors\": [\n    \"input[type=email]\"\n  ],\n  \"urlRegex\": \"login\"\n}",
      "language": "json",
      "name": "Regular Expression Matching URL"
    }
  ]
}
[/block]

# Logging Behavior

By default, ATS will not log any library events. However, especially during development, it can be useful to view more verbose logs.

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"placementID\": 9999,\n  \"cssSelectors\": [\n    \"#newsletterSignup\"\n  ],\n  \"logging\": \"debug\"\n}\n\n\n",
      "language": "json",
      "name": "Debug Logging"
    }
  ]
}
[/block]

Other potential values are `["info","warn","error"]`.

# Envelopes passed via URL

ATS supports passing an envelope through a URL parameter and then writing it into storage.

[block:code]
{
  "codes": [
    {
      "code": "{\n  \"placementID\": 9999,\n  \"detectionType\": \"url\",\n  \"urlParameter\": \"env\"\n}\n",
      "language": "json"
    }
  ]
}
[/block]

If a user then visits a page with a parameter of "env", such as
<https://example.com?env=At34-OJZKGF3gFFKRHLlH0TVARa72jszhHcn21zbdSYJHdQu9qhOrbd6-UhOI1UWHT2_a-DldHY> from, say an email newsletter with pre-created link, the envelope will be detected, validated and then written into storage.