Tagging Dynamic Content


AJAX is a technique allowing the content a webpage to update without requiring a full reload. 

Sites using AJAX to display new content are tracked correctly by the standard Narratiive tag when a page is loaded, however they may be under-represented in the page view count. This is because the standard Narratiive tag records a page view during the page load process. The tag does not, by default, record a page view for AJAX calls after the page has loaded. 

Narratiive provides functionality to register AJAX content requests as page views.


Providing the Narratiive tag is inserted correctly on applicable webpages, the client can include a call to the Narratiive AJAX function (see below) in their own AJAX code.


http_request.onreadystatechange = sendAlert;
http_request.open('GET', url, true);

function sendAlert() {
  if (http_request.readyState == 4) {
    if (http_request.status == 200) {
  else {

Once this has been setup, you should be able to see a call to the Narratiive servers with each AJAX content request. This can be confirmed using a web developer tool to track the requests as they occur.

If you have any questions, please contact help@narratiive.com.