All Collections
For Web
Web Client API (CAPI)
Understanding the Web Client API
Understanding the Web Client API

Undertanding the Javascript Snippet that users install onto their website

Updated over a week ago

What is the CAPI tag?

The CAPI tag is our Javascript Snippet, with a pathname ending in wt.js.

It is what customers install onto their website to interface with OTS, our servers that handle the evaluation and delivery of experiments and targets to their website.

Its key purpose is to:

  1. Compose the request to OTS. This is doing the leg-work that you would otherwise do yourself if running experiments via. the REST or JSONP APIs.

  2. Handle the response. Code to deliver, changes to make, etc.

  3. Provide an interface for follow-up activities, such as click tracking.

Sections to explore:

Tag Versions

Details of every tag we release, and what's new/changed.

Tag Installation

Everything you need to know to get our snippet onto your site in the most optimal way.

Read more >

Loading Behaviour

How does Optimize load on the page? Our architecture and events explained.

Read more >

Encryption

Data is encrypted at rest, in transit, and in browser-side storage.

Read more >

Tag Settings & Configuration

Comprehensive tag management, including preview capabilities for tag-side changes.

Read more >

Data Layer

Sending data to Optimize allows you to run more targeted Locations and Segments.

User Modes

Optimize's multiple virtual environments allow you to thoroughly preview your work before going live.

Debug Mode

Advanced debugging capabilities describe what's going on and why.

Available Methods

There are JavaScript methods/functions available to use, covering a variety of use-cases.

Velocity Templates

Apache Velocity Templates provide a server-side layer behind the code where your test renders.

Read more >

Custom Page Hide

Select what pages and what sections to hide, to eliminate content flickering.

Read more >

Global Conversions Package

Define conversions that will automatically track for all projects in your account.

Did this answer your question?