Retargeting scripts

Retargeting scripts are used to execute custom javascript snippets during the redirection process

🚧

Check for compatibility first

Double check whether your API key or OAuth token is enabled to use the Scripts feature.
For every account, you can check for features and limits with a preliminary API call.

Script Object

Main properties of a Script object are:

PropertyTypeDescription
idstringUnique identifier of the script
namestringUnique name of the script
valuestringJavascript snippet (enclosed into HTML tags)
uristringPublicly accessible URL to the script content

Scripts management

Here are some basic operations you can perform regarding Script resource:

OperationDetails
Create a new scriptSee Creating a new script
Get script detailsSee Getting script details
Access your scripts collectionSee Listing your scripts
Delete a scriptSee Deleting a script
Count your scriptsSee Counting your scripts
Attach a script to a linkSee Attaching a script
Detach a script from a linkSee Detaching a script
Example of a Script object
{
  "id": "3aehje9d536s46d59ba5bcf49b582ear",
  "name": "Test alert",
  "value": "<script>alert('test');</script>",
  "uri": "https://s3.amazonaws.com/rb-scripts/user/3aehje9d536s46d59ba5bcf49b582ear"
}