# Amplitude

Events streaming integration with Amplitude enables you to seamlessly stream feedback data from Blitzllama to Amplitude to further analyse the feedback data with user attributes or to create feedback dashboards.

## Considerations

1. You must enable this integration in each Amplitude project you want to use it in.
2. Amplitude matches the `user_id` to the id within Blitzllama to associated events. If user with that ID doesn't exist in Blitzllama, then Blitzllama creates one. Make sure that the Amplitude `user_id` field matches the Blitzllama id field to avoid user duplication.

## Setup <a href="#setup" id="setup"></a>

### Amplitude Setup <a href="#amplitude-setup" id="amplitude-setup"></a>

1. Log in to Amplitude, go to **Settings**
2. Under **Organization Settings**, click **Project** and navigate to project that you'd like to integrate with Blitzllama.
3. **Copy API key.**

### Blitzllama Setup <a href="#setup" id="setup"></a>

1. On the Blitzllama's dashboard, navigate to **Destinations** under the **Connections tab** and click on Amplitude.
2. Click **Connect** and paste the API Key into the textbox.
3. Click **Save**.

The payload contains the answer data sent on submission of an answer by a user. A sample payload is below.

```json
{
    "user_id":"user_123",
    "app_key":"blitzllama_api_key",
    "survey_id":"s-xxxxxx-id",
    "group_id":"g-xxxxxx-id",
    "question_id":"q-xxxxxx-id",
    "platform":"android",
    "trigger":"home-page-trigger",
    "question_order":1,
    "response":"image upload glitches",
    "question_text":"What do you think of our app?",
    "question_type":"input_feedback",
    "created_at":"2022-05-13T13:40:33+00:00"
}
```


---

# 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://documentation.blitzllama.com/connections-destinations/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.
