Amazon Ad Server will be sunset in Q4 2024, please visit this page (AAS offboarding information) for offboarding support resources and sunset FAQs. Details shared on that page represent the most up to date information in the Help Center, if you find disparate information in other resources please default to the information in the AAS offboarding information page accordingly.

Please note that on October 1, 2024, the ability to create new campaigns, placements, and tag managers will be disabled.



Introduction and screenshots

The In-Sight ad feature leverages the visibility data available through the EB.API. By using this feature, clients can trigger actions such as animation, video, and dynamic content at the moment an ad comes into view within the browser. These actions are triggered on a percentage-based threshold, determined by the client. This allows the user to see the full intended experience, regardless of where the ad is placed on the page.


  • This feature does not work in local preview.

  • This feature is not supported when the ad is served in a mobile app.


Note: This feature no longer uses the PL_Scroll_Detect.js custom script.

The following images display the demo. When the ad is within the visibility threshold, the creative shows that the ad is visible, as seen on the left. On the right, we see that when the ad scrolls outside of the viewport and the visibility falls below the defined threshold, the creative shows that the ad is hidden.



The following table provides links to the template and demo for the In-Sight ad feature.

Files within the bundle:


Supported platforms


Supported Version


Internet Explorer 10+, Edge, Firefox, Chrome


Firefox, Chrome, Safari


iOS 9.0 and later


iOS 9.0 and later


Android 4.4 and later ( including tablets)


Workspaces available

The In-Sight ad feature includes one HTML workspace built using the HTML polite banner.

Included workspace files

File Name



Amazon ad configuration file


Demo default backup image


Demo HTML index file


Ad feature JavaScript file


Demo stylesheet

Implementing the ad feature

Getting started

Before you begin, make sure you have the following resources available:

Add the In-Sight ad feature to your workspace code

The following steps illustrate how to add the In-Sight ad feature to your creative workspace.


  • Include the In-Sight Javascript file in the head of your workspace index.html file:

    <script type="text/javascript" src="scripts/insight.js"></script>

  • Include the In-Sight stylesheet:

    <link type="text/css" rel="stylesheet" href="styles/styles.css"/>

  • Instantiate and pass the threshold parameter to the In-Sight script. The threshold parameter will determine when the ad is considered visible or hidden. The threshold parameter is a number from 0-100.

    // Instantiate the In-Sight Script 
    var inSight = new InSight(60); 
  • Once you've created a new instance of InSight() method, add an event listener and listen for the ON_VISIBILITY event. As the viewport is updated, the event will fire a response, returning the percentage of the ad that is visible. Make sure to add your event handler function like in the example below, using e.detail.visibility - event data object notation to get the percentage value in your handler function.


    // Instantiate the In-Sight Script 
    var inSight = new InSight(60); 

    // Add Event Listener for Visibility Data 
    inSight.addEventListener("ON_VISIBILITY", handleVisibilityEvent, false); 

    // Handle Visibility Event Response 
    function handleVisibilityEvent(e) { 
        // the visibility percentage is available in the response object
         var v = e.detail.visibility; 


In-Sight parameters

var inSight = new InSight('threshold');






Threshold at which the ad is considered visible or hidden 0-100.

Setting up the In-Sight ad feature Amazon Ad Server

  1. Zip the workspacefolder.

  2. Log in to the AAS.

  3. Click Creative >Asset Library, and upload your workspace to the appropriate asset folder.

  4. (Optional) Rename the folder.

  5. Click Creative > Ads. Then, click New Ad and select Blank Ad.

  6. In the Ad Name field, enter the unique name of your ad.

  7. Choose a format from the Ad Format list.

  8. Under Main Assets select the workspace folder and default image.

  9. Click Save.

Known issues

  • The ad feature does not work with local preview. Must be served on a placement tag to have access to the visibility data.

  • Up to a one second delay before visibility data is available.

  • Visibility data is not available on Android 4.4 (and below) native browsers.

  • Does not work reliably with Safeframes in Safari.

  • In Safeframe and AMP we rely on viewability data provided to us by the publisher. In this case Amazon is unable to guarantee the accuracy of the viewability data.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request