# Firebase

![](https://2580671618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJPDzUzynACRbcxkhAEeE%2Fuploads%2FIRJR3FsnjQvsHNsO2Oua%2Ffirebase.jpg?alt=media\&token=b18a7dbc-356a-4f9c-8c9c-0d48bdab2b4e)

Integration with **Firebase Analytics** allows you to analyze user behavior during all stages of the purchase process, based on what users view, click, and select within the app. These are the insights you can gain with this integration:

These are the integrations you can gain with this integration:

* Users browsing products from collection views
* Users who select a product&#x20;
* Users accessing the product detail view
* Users who add a product to favorites or remove it
* Users who add a product to their cart or remove it&#x20;
* Users who view their shopping cart
* Start of checkout process
* Selection of delivery method&#x20;
* Completion of purchase&#x20;

To allow the Shoppy team to activate this integration, we kindly ask that you send our support a Gmail email address that we can use to invite your app to the Firebase project to view your analytics. You can write to us at <support@shoppy.is> and specify the account to invite.

## Events

Below is a list of Firebase analytics events triggered by user actions in the Shoppy app. Each event includes a structured payload of parameters, described in the associated tables.

### View item list

Triggered when a user views a list of items (e.g. a product category page). <kbd>view\_item\_list</kbd>

**Parameters:**

| Parameter        | Description           |
| ---------------- | --------------------- |
| <kbd>items</kbd> | Array of items viewed |

**Item Object**

| Item object           | Description                |
| --------------------- | -------------------------- |
| <kbd>index</kbd>      | Position in the list       |
| <kbd>item\_id</kbd>   | Unique identifier for item |
| <kbd>item\_name</kbd> | Display name of the item   |

***

### Select item

Triggered when a user selects an item from a list. <kbd>select\_item\_list</kbd>

**Parameters:**

| Parameter       | Description                         |
| --------------- | ----------------------------------- |
| <kbd>item</kbd> | Object describing the selected item |

**Item Object**

| Item object           | Description                |
| --------------------- | -------------------------- |
| <kbd>item\_id</kbd>   | Unique identifier for item |
| <kbd>item\_name</kbd> | Display name of the item   |

***

### View item

Triggered when a user views the details of a specific item.

**Parameters:**

| Parameter  | Description                       |
| ---------- | --------------------------------- |
| `item`     | Object describing the viewed item |
| `currency` | ISO 4217 currency code (e.g. USD) |

**Item Object:**

| Field       | Description                |
| ----------- | -------------------------- |
| `item_id`   | Unique identifier for item |
| `item_name` | Display name of the item   |
| `price`     | Price of the item          |

### Add to cart

Triggered when a user adds one or more items to their cart.

**Parameters:**

| Parameter  | Description                       |
| ---------- | --------------------------------- |
| `items`    | Array of items added to cart      |
| `currency` | ISO 4217 currency code (e.g. USD) |

**Item Object:**

| Field       | Description                |
| ----------- | -------------------------- |
| `item_id`   | Unique identifier for item |
| `item_name` | Display name of the item   |
| `price`     | Unit price of the item     |
| `quantity`  | Quantity added to cart     |

### Remove from cart

Triggered when a user removes an item from the cart.

**Parameters:**

| Parameter  | Description                        |
| ---------- | ---------------------------------- |
| `item`     | Object describing the removed item |
| `currency` | ISO 4217 currency code (e.g. USD)  |

**Item Object:**

| Field       | Description                |
| ----------- | -------------------------- |
| `item_id`   | Unique identifier for item |
| `item_name` | Display name of the item   |
| `price`     | Unit price of the item     |
| `quantity`  | Quantity removed from cart |

***

### View cart

Triggered when a user views their cart.

**Parameters:**

| Parameter  | Description                                        |
| ---------- | -------------------------------------------------- |
| `items`    | Array of items in the cart                         |
| `value`    | Total cart value (sum of item prices × quantities) |
| `currency` | ISO 4217 currency code (e.g. USD)                  |

**Item Object:**

| Field       | Description                |
| ----------- | -------------------------- |
| `item_id`   | Unique identifier for item |
| `item_name` | Display name of the item   |
| `quantity`  | Quantity in cart           |
| `price`     | Unit price of the item     |
| `currency`  | Currency for this item     |

***

### Begin checkout

Triggered when a user begins the checkout process.

**Parameters:**

| Parameter  | Description                       |
| ---------- | --------------------------------- |
| `items`    | Array of items being purchased    |
| `value`    | Total cart value at checkout      |
| `currency` | ISO 4217 currency code (e.g. USD) |

**Item Object:**

| Field       | Description                |
| ----------- | -------------------------- |
| `item_id`   | Unique identifier for item |
| `item_name` | Display name of the item   |
| `quantity`  | Quantity to purchase       |
| `price`     | Unit price of the item     |
| `currency`  | Currency for this item     |

***

### Purchase

Triggered when a purchase is completed.

**Parameters:**

| Parameter  | Description                                  |
| ---------- | -------------------------------------------- |
| `items`    | Array of purchased items                     |
| `value`    | Total amount of the purchase                 |
| `shipping` | Shipping cost associated with the purchase   |
| `currency` | ISO 4217 currency code (e.g. USD)            |
| `coupon`   | Coupon code applied to the purchase (if any) |

**Item Object:**

| Field       | Description                |
| ----------- | -------------------------- |
| `item_id`   | Unique identifier for item |
| `item_name` | Display name of the item   |
| `quantity`  | Quantity purchased         |
| `price`     | Unit price of the item     |
| `currency`  | Currency for this item     |

***

### Add to wishlist

Triggered when a user adds an item to their wishlist.

**Parameters:**

| Parameter | Description                       |
| --------- | --------------------------------- |
| `item`    | Object describing the wished item |

**Item Object:**

| Field       | Description                |
| ----------- | -------------------------- |
| `item_id`   | Unique identifier for item |
| `item_name` | Display name of the item   |

<br>
