Simple Engine API Example

This example works with the Engine API. The goal is to test new copy in a promotional area of the home page and measure call-to-action clicks from it. The following describes how that works:

  1. The Engine API GET call lives on the web server and is initiated on the page where the text is displayed to the visitor, so counted state is always true. At this point, the web server makes the GET call for Assignment and shows the new copy if the assigned Variation Group ID matches the non-Control Identifier. The web server also stores the Metric ID and Variation Group ID.
  2. The web server makes a POST call to the SiteSpect engines when the visitor clicks the call-to-action button and lands on a new page. Since the POST calls happen as soon as the visitor lands on the page, the Hits value is always 1 and Variation Group ID is added to the “AsmtCounted” array to track counted state.