Download at.js

Instructions to download the at.js library using the Target interface or the Download API.

Important: The Target team maintains only two versions of at.js—the current version and the second-latest version. Please upgrade at.js as necessary to ensure that you are running a supported version. For more information about what's in each version, see at.js Version Details.
Note: If you are migrating your Target implementation from using the mbox.js library to the at.js library, see Migrate to at.js from mbox.js.

Download at.js Using the Target Interface

To download at.js from the Target interface:

  1. Click Setup > Implementation.

  2. Select at.js.

  3. Click Edit at.js Settings.

    The Settings page shows your at.js settings. Some of these settings are informational only.

  4. Change any settings as needed.

    Setting Description
    Auto create global mbox

    Use at.js to auto-deploy target-global-mbox for a single line of code implementation.

    Global mbox name

    Specify a name for the global mbox. The default is target-global-mbox.

    Advanced Settings

    Refer to Configure at.js.

    Code Settings

    (Optional) Specify custom code to include in the page header and footer. We recommend that you consult with Client Care before changing these settings.

  5. Click Code and enter any custom header and footer JavaScript to execute at the top of the library, such as targetPageParams.

    If you used mbox.js in the past, you might notice fewer fields. However, there are ways to do many of the same things in at.js that you did in mbox.js. For example, if you used mbox parameters in mbox.js, in at.js you can use targetPageParamsAll. The mbox.js Extra JavaScript field is replaced by the at.js Header and Footer fields, which provide more control of the code.

  6. Click Save.

  7. Return to the Implementation page and click Download at.js.

Download at.js Using the Target Download API

To download at.js using the API.

  1. Get your client code.

    Your client code is available at the top of the Setup > Implementation > Edit at.js Settings page of the Target interface.

  2. Get your admin number.

    Load this URL:<client code>

    Replace <client code> with the client code from Step 1.

    The result of loading this URL should look similar to the following example:

      "api": ""

    In this example, "6" is the admin number.

  3. Download at.js.

    Load this URL with the following structure:

    https://admin<admin number><client code>&version=<version number>
    • Replace <admin number> with your admin number.

    • Replace <client code> with the client code from Step 1.

    • Replace <version number> with the desired at.js version number (for example, 0.9.4).

    Loading this URL starts the download of your customized at.js file.