View on Github

This plugin allows you to measure which elements on the page were actually seen by the browser, just by adding an attribute to your elements.


Get started

  • Download our main library (smarttag.js) with this plugin (at-smarttag-viewability.js) and install it on your website.
  • Check out the documentation page for an overview of the SmartTag functionalities and code examples.


First of all, you must download our JavaScript library from Tag Composer.

Tag Composer allows you to configure your SmartTag:

  • Set up your tagging perimeter/scope (site, domain used to write cookies, etc.). Use callbacks.
  • Select desired features via configurable plugins.

Once the library is set up, you can download it and insert it with this plugin into the source code of the HTML page to be tagged.


The plugin determines if an element is being viewed depending on which percentage of it is displayed on the user's screen. This viewability percentage can be set at 3 levels:

  • Globally : in the Tracker configuration, and will be applied to all elements (see here)
  • At elements' level : if defined thanks to the attribute data-atview-percent (see here)
  • By default, if none of the two before has been defined, it will be set to 100%

When an element has been defined as viewed, the plugin will send a Publisher hit, with the following data:

  • Campaign: the element's ID (see here)
  • Creation: the percentage defined following rules above

This data will be sent only once per page view, no matter if the user scrolls up and down and displays the element multiple times.



Standard tag

Tracker initialisation is done via the instantiation of a new ATInternet.Tracker.Tag object:

Asynchronous tag

You can load our JavaScript library asynchronously. However, this requires an adaptation in your tagging. Check out the Asynchronous tag for an overview of the functionality .

Plugin configuration

You can set the global view percentage through the Tracker configuration, thanks to the property viewabilityPercent:

Viewable elements tagging

In order to inform the plugin that an element viewability must be tracked, you need to insert an attribute data-atview-id, containing the ID/name that will be retrieved in your data. Please don’t use any special characters, this could lead to wrong measurement.

Element’s level percentage

In order to set a specific viewability percentage to an element, you can add the attribute data-atview-percent to it, containing the numeric value of the percentage.


There are no reviews yet.

Be the first to review “Viewability”

Your email address will not be published.

This field can't be Empty
This field can't be Empty
This field can't be Empty
This field can't be Empty