Tag overview


Anatomy of the tag

The CONTXTFUL tag for the HTML format is a javascript tag accessed via an url.

The tag can be deployed with creatives in an ad campaign or embedded in a web page. Both cases allow for human context and attention monitoring for analytics.

All the URL also allow for various values to be passed to the AI engine to allow better analysis (see link for information on how to add key:values to the script call)

For Publishers

See link for publisher documentation

The URL for publishers links to a p.js file that connects any web page to CONTXTFUL's AI engine server side.

For Advertisers

See link for advertiser documentation

The URL for publishers links to a m.js file that connects any campaign to CONTXTFUL's AI engine server side.

Deployment example

For advertisers

How to integrate in GCM

For web pages

Example
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Contxtful API demo</title>

  <!-- Load the Contxtful API Javascript -->
  <script async src="//ctxtfl.com/scripts/js/m.js?id=AbCdEfGhIj1234567890"></script>
</head>

<body>
   <h1>CONTXTFUL API Demo</h1>
   <h2><pre id="output"></pre></h2>

<script>
function showContext() {
   // We catch the response from the Contxtful API
   var response = Contxtful.Api.Results;
   if (response != undefined) {
      // Print the response to screen (pretty JSON)
      document.getElementById("output").innerHTML = JSON.stringify(response, undefined, 4);
   } else {
      response = "You might be seeing this message because your device lacks physical sensors.<br>";
      response += "Feel free to right-click and select View Page Source to see how this demo uses the ";
      response += "CONTXTFUL API.";
      document.getElementById("output").innerHTML = response;
   }
}

// Refresh the data shown on screen every 0.1s
setInterval(showContext, 100);
</script>
</body>
</html>

Latency and timing strategy

See this link for more information