Jump to Content
WebSubmit Documentation FeedbackJoin Developer Community
Guides
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog InWeb
Optimizely GitHubOptimizely NuGetLog In

Web

  • Introduction
  • Changelog
  • Getting started
  • Code samples
    • Custom event tracking
    • Custom audience targeting
    • Advanced experiment configuration
    • Page activation
    • Helper functions
    • Dynamic websites
    • Integrations
  • API functions
  • Push
    • Activate
    • Add listener
    • Bucket visitor
    • Cookie domain
    • Cookie expiration
    • Disable
    • Disable cross origin
    • Event
    • Extend cookie lifetime
    • Hold events
    • Log
    • Opt out
    • Page
    • Send events
    • Tags
    • User
    • Wait for origin sync
  • Get
    • Behavior
    • Data
    • DCP
    • jQuery
    • Session
    • State
    • Utils
    • Visitor
    • Visitor ID
  • Guides
    • Dynamic websites
    • JavaScript execution
    • Query parameters
    • Troubleshooting

REST API

  • Introduction
  • Getting started
  • API Conventions
  • API Reference Overview
  • API Reference
  • Guides
    • Audience Conditions

OAuth 2.0

  • Introduction
  • Grant types
  • Personal token authentication
  • Registration
  • Redirection
  • Authorization code
  • Refresh tokens
  • Authentication
  • Deletion

Data Services

  • Event API
  • Data Export
  • Customer Behavior
    • Query objects
    • Event objects
    • Use cases
  • Customer Profiles
  • List Attributes

Add Ons

  • Integrations
    • Integration types
    • Technology partners
  • Extensions
    • Fields
    • HTML
    • CSS
    • Apply JS
    • Reset JS
    • Extension library

Classic

  • Migrating from Classic
    • Changed functions / properties
    • Properties
    • Functions
  • OAuth 2.0 Classic Token
  • Classic Docs
  • SDK V1 Docs

Classic REST API: DCP

  • DCP

Code samples

Suggest Edits

Introduction

There are many useful applications for the JavaScript API. Be sure to modify the code appropriately before running in production!

These code samples should be used in either Shared Code, Project JS or Variation code.

Updated about 3 years ago


  • Table of Contents
    • Introduction