The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.
Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

Get a microsnippet response

Call the Edge Decider API to fetch a microsnippet. Given the required arguments, the Edge Decider will bucket visitors into variations of active experiments they're qualified for and return the JavaScript microsnippet. The microsnippet is executed by the browser to apply the variations' changes.

Note that for security, the Edge Decider API only supports connections made over HTTPS. It does not support connections made over insecure HTTP and responds with a 403 status instead.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Optimizely Account ID

string
required

Project ID of the Performance Edge project.

Query Params
string
enum
Allowed:
string

Document URL requested, which is used to determine the active pages(s)/experiment(s)

Needs to be passed encoded.

Headers
string
required
string
required

Document URL requested, which is used to determine the active pages(s)/experiment(s), if the “url” query parameter is not specified.

In typical implementations, the Referer header in the script request will equal the URL of the page on which the script was loaded.

string
required

User Agent used to make the request. Optimizely Edge will only serve the JavaScript response to browsers that are detected as having support for it, using this value. Also used for browser, device, platform targeting (Reference)

string
required

A comma-separated list of IP addresses, the first of which will be used as the basis for IP Address and Location experiment targeting. (Reference)

Responses
200

Successful response supplies JavaScript code for microsnippet

403

Request made not using HTTPS

405

Invalid input

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!