The Full Stack Developer Guide Developer Hub

Welcome to the Full Stack Developer Guide developer hub. You'll find comprehensive guides and documentation to help you start working with the Full Stack Developer Guide as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Set up New Relic

This integration enables you to associate an Optimizely feature flag, variation, or experiment with New Relic performance data.

You can track and monitor the New Relic data and additionally segment the experiences delivered by Optimizely.

Using Optimizely’s notification listeners, you can forward events that occur in the SDK using your New Relic custom attributes.

In the example code below, we add a call to New Relic in the activate callback function. This can be placed directly after initializing the Optimizely client. This assumes a New Relic object is in scope.

const optimizely = require('@optimizely/optimizely-sdk');
const optimizelyEnums = require('@optimizely/optimizely-sdk/lib/utils/enums');
const newrelic = require('newrelic');

function onActivate(activateObject) {
    'optimizely_segment': activateObject.experiment['key']);

// Add a ACTIVATE notification listener
let activateId = optly.notificationCenter.addNotificationListener(
from optimizely.notification_center import NotificationCenter
from optimizely.helpers import enums
import newrelic

def on_activate(experiment, user_id, attributes, variation, event):
	newrelic_obj.agent.add_custom_parameter(‘optimizely_segment’, variation)

opt_obj.notification_center.add_notification_listener(enums.NotificationTypes.ACTIVATE, on_activate)


This integration currently doesn't support rollouts.

Updated 2 years ago

Set up New Relic

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.