# Amplitude

### To integrate Zipy with Amplitude and track user actions, follow these steps:

### Step 1: Obtain the Zipy Session URL

To capture and share a link that represents a user's actions on Zipy, you need to retrieve the Zipy Session URL. Use the following code snippet to obtain the session URL:

```javascript
const zipySessionUrl = window.zipy.getCurrentSessionURL();
```

### Step 2: Log Zipy Event in Amplitude

To log the Zipy event in Amplitude, use the `logEvent` method provided by the Amplitude SDK. Pass the Zipy session URL as a property within the event payload, like this:

```javascript
amplitude.getInstance().logEvent('zipy', {'sessionURL': zipySessionUrl });
```

The `'zipy'` string represents the event name in Amplitude, which you can customize according to your requirements.

### Step 3: Reviewing the Events in Amplitude

Once the integration is implemented, the logged Zipy events will appear within Amplitude's event stream for each user. You can analyze and track user actions in Amplitude's dashboard.


---

# 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/integration/amplitude.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.
