# Quantum Metric

## Quantum Metric Integration

Pulse Insights supports a native integration with Quantum Metric that allows you to correlate survey responses with user session replays captured by Quantum Metric. This enables powerful UX and VOC (Voice of Customer) workflows by tying qualitative feedback to behavioral data.

### Use Cases

* **Session Replay Context**: Easily jump from a survey response to the full session replay.
* **Segmentation in Quantum Metric**: Tag sessions with survey attributes (e.g., sentiment or NPS) for deeper analysis.
* **Analytics & Reporting**: Enrich Pulse survey exports with Quantum Metric session data for unified insights.

### How It Works

The integration leverages Quantum Metric’s JavaScript API and Pulse Insights’ context\_data capabilities.

1. Quantum Metric exposes a session replay URL via JavaScript.
2. Pulse Insights captures that URL and attaches it to the survey response.
3. Optionally, survey answers can be passed back into Quantum Metric as custom session attributes.

### Implementation Steps

#### 1. Check for Quantum Metric Availability<br>

```
if (window.QuantumMetricAPI?.isOn()) {
  const qmReplay = QuantumMetricAPI.getReplay();
  const qmSession = QuantumMetricAPI.getSessionID();
  // Store or pass these values as needed
}
```

#### 2. Attach to Pulse Insights Context<br>

```
pi('set_context_data', {
  quantum_metric_replay_url: qmReplay,
  quantum_metric_session_id: qmSession
});
```

#### 3. Push Survey Answers into Quantum Metric (Optional)<br>

```
pi('onSurveySubmit', function(data) {
  const satisfaction = data.answers?.find(a => a.content === 'Very Satisfied');
  if (satisfaction && window.QuantumMetricAPI?.isOn()) {
    QuantumMetricAPI.setCustomAttribute('pulse_satisfaction', 'very_satisfied');
    QuantumMetricAPI.setCustomAttribute('pulse_replay_url', QuantumMetricAPI.getReplay());
  }
});
```

### Data Export & Analytics

Once the replay URL is captured via context\_data, it becomes available:

* In Pulse’s survey response exports
* Through Pulse’s API and data warehouse integrations
* In custom dashboards and reporting pipelines

### Requirements

* Quantum Metric must be deployed on the same page as the Pulse survey.
* The Quantum Metric JavaScript API (QuantumMetricAPI) must be available in the global namespace.

### Summary

With a lightweight integration, Pulse Insights can enrich both your feedback data and session replay analytics. This bi-directional setup gives you instant access to the “why” behind customer behavior.

{% hint style="info" %}
For implementation support, contact your Pulse Insights Customer Success Manager.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pulseinsights.com/integrations/integrations-overview/quantum-metric.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
