# Zipy Recording Control

Zipy allows you to record user sessions by capturing screen activity and interactions. For privacy or security reasons, you may need to stop the recording on specific routes, such as during checkout or while viewing sensitive data.&#x20;

### Stop Recording&#x20;

The `zipy.record.stop()` function can be used to stop recording based on user actions or route changes. However, note that this stop functionality does not persist across page refreshes. On refresh a new session is created.

**Example: Stop Recording on /checkout Route**

To prevent recording on sensitive routes like /checkout, stop the recording as soon as the user navigates to that route:

```
if (currentRoute === "/checkout") {
     zipy.record.stop();
}
```

Once called, the recording stops for the current session. However, if the page is refreshed, a new session will be created.&#x20;

### Start Recording&#x20;

To resume recording, reinitialize the Zipy SDK, which creates a new session for the same user:

```
zipy.init("<YOUR_APIKEY>"); // Starts a new session and resumes recording
```

#### **Important Note:**&#x20;

**Page refresh:** On a page refresh, the stop functionality does not persist, and a new session will automatically begin.


---

# 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.zipy.ai/configure/zipy-recording-control.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.
