Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

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 GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

Print execution logic to your browser's console.

Description

Tell Optimizely Performance Edge to output its log to the browser's console log (default is OFF).

You can also do this by using the query parameter optimizely_log={level}.

If you set the level to the currently-configured log level this function has no effect other than emitting a warning.

📘

Note

Only affects tracking snippet logs, not edge-decider/microsnippet which only can be delivered via ?optimizely_log.

window.optimizelyEdge.push(log);
window.optimizelyEdge.push({
  "type": "log",
  "level": "INFO"
});

Parameters

This table provides general information about required and optional parameters.

ParameterTypeDescription
Log
required
objectAn object with the type field set to log.
Log.type
required
stringThe argument indicating that you are using the log function.
Log.level
optional
stringOne of the following:

OFF: No logs
ERROR: Errors only
WARN: Warning and above
INFO: Info and above
* DEBUG: Debug and above