---
title: activated
slug: performance-edge/api/activated
docTags: 
createdAt: 2026-06-23T07:29:00.025Z
---

Fires each time the Optimizely Performance Edge snippet activates.

## Description

At this point, the Optimizely Performance Edge snippet has been activated, and you can query for visitor state such as:

- Visitor ID.
- Page states (`getActivePages`). A Page will be included if it was found to be active in the Edge Decider.

Experiment states (`getActiveExperiments`), for experiments that:

- Specify changes to active pages (see above), and
- Target audiences that the Edge Decider was able to evaluate using data provided.

```javascript
var activated = function(activated);
```

```javascript
function onActivated(event) {
  var visitorId = window.optimizelyEdge.get('visitor_id').randomId;
  console.log("The visitor's ID is: " + visitorId);
}

window.optimizelyEdge = window.optimizelyEdge || [];
window.optimizelyEdge.push({
  type: "addListener",
  filter: {
    type: "lifecycle",
    name: "activated"
  },
  handler: onActivated
});
```

## Parameters

This table provides general information about required and optional parameters.

| Parameter                     | Type   | Description                                                           |
| ----------------------------- | ------ | --------------------------------------------------------------------- |
| **activated** *required*      | object | This is the object passed to the handler function.                    |
| **activated.type** *required* | string | The category of an event. The value will be lifecycle for this event. |
| **activated.name** *optional* | string | The name of the event type. This is set to activated.                 |

