Creating JavaScript Spots for Web Tasks

Use a JavaScript spot when you want to inject JavaScript into a web page. The JavaScript spot specifies which pages you want to run JavaScript on. JavaScript spots must be used with web tasks and plain text creatives. The plain text creative contains the JavaScript that you want to run on a web page. Examples of what you can do with a JavaScript spot include these actions:

  • You can display a pop-up on a website.
  • You can set data on a web page so that a third party can collect it.
Note: Be aware of these restrictions for JavaScript spots:
  • JavaScript spots can be created and edited only by users who are assigned the JavaScript Spot Admin role. To add a JavaScript spot to a task, a user must be assigned either the JavaScript Spot Admin role or the JavaScript Spot User role. For more information, see List of Roles in SAS Customer Intelligence 360: Administration Guide.
  • JavaScript spots do not trigger spot_click events. If you want to track an interaction that is related to a JavaScript spot, you can use the click event that is generated by default or you can create a custom event that is associated with the spot’s HTML element.

To create a JavaScript spot:

  1. On the navigation bar, click Event Tracking Event Trackingthen selectSpots.
  2. Click Create Spot.
  3. Select JavaScript.
  4. There are two ways to specify the web page where you want your JavaScript to run.
    • To select the web page by using the Spot Location tab, navigate to the web page where you want your JavaScript to run and click Create Spot.
    • To manually specify the web page, click Create Spot. In Spot Detailsthen selectSpot Configuration, set the Page URL in the Spot Location section.

      You can use this option to specify the URL for a web page that is password protected, for a page that takes a long time to render, or if you know the URL of the page.

  5. Navigate to Spot Detailsthen selectSpot Configuration to update the page URL or enable the JavaScript to run on additional pages. To include your JavaScript on additional pages, select one of the Page matches options in the Spot Location section:
    • Select Any page to include all pages that contain the spot that you defined.
    • Select Pages matching attribute pattern to define rules that determine which pages to include. You can create a pattern that matches a URL, a domain, or an element.
    • Select Only page where selector was chosen to include only the page that was displayed when the spot was selected.
  6. Add additional spot attributes by selecting Spot Detailsthen selectSpot Attributes. Spot attribute names can contain only ASCII letters, digits, underscores, or dots, and the names must begin with a letter. In addition, spot attribute names cannot have more than 32 characters. Click Add to add an attribute to collect information about the web page that contains your spot.
    TipIf you plan on using this spot in task targeting, it must have at least one attribute. Spots without attributes cannot be selected as criteria on a task’s Targeting tab.
  7. Navigate to the Orchestration tab and select either Mark Ready or Mark Ready and Publish. This action makes your spot available to a task.

    A Ready status indicates that the spot is ready to be published with a task. When someone publishes a task that uses a Ready spot, that person is prompted to confirm that the spot should be published along with the task. Spots with a Ready status can be changed back to a Designing status by clicking Return to Designing. Changing the status prevents the spots from being published by a task.

    To move a spot from a Ready status to an Active status, click Publish. Spots with an Active status cannot be changed back to Designing. A spot with an Active status does not prevent a task from publishing.

    If the content of a published item is changed and saved, that item becomes out of sync with the published version. To synchronize the content, select Republish. Otherwise, the item stays out of sync with the published version and the updates are not delivered.

    For more information, see Republishing Out of Sync Items.

Click End from the Orchestration tab to change the status from Active to Complete. Completed spots cannot be used in a task and cannot be modified. Ending a spot stops any associated data collection and makes the spot's content unavailable. In addition, any unsaved changes to the spot are lost.

Note: If you complete a spot that is associated with an active task, then that active task is also completed. If you complete a spot that is associated with an active task that is part of an activity, then both the task and the activity are completed. As a result, all data collection ends for these items. In addition, any spot sets that use the spot are also completed. Content cannot be delivered to completed spots. As a result, any unpublished tasks that use the completed spot need to be updated to use a different spot before the tasks can be published.

If you complete a spot that is associated with an active task, then that active task is also completed. If you complete a spot that is associated with an active task that is part of a real-time journey, then both the task and the journey are completed. As a result, all data collection ends for these items. In addition, any spot sets that use the spot are also completed. Content cannot be delivered to completed spots. As a result, any unpublished tasks that use the completed spot need to be updated to use a different spot before the tasks can be published.

Last updated: August 11, 2026