> For the complete documentation index, see [llms.txt](https://learn.fueled.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.fueled.io/integrations/destinations/segment.com/segment-event-specifications/product-added-removed.md).

# Product Added/Removed

### Description <a href="#id-0abe1e32-566b-4378-ae70-1488397b49d6" id="id-0abe1e32-566b-4378-ae70-1488397b49d6"></a>

The `Product Added` event is a client-side event that fires whenever a product is added to the customer’s shopping cart. The `Product Removed` event is a client-side event that fires whenever a product is removed from the shopping cart.

### Instrumentation <a href="#id-61f2a383-f37c-4ff9-97d1-627fe5128f2b" id="id-61f2a383-f37c-4ff9-97d1-627fe5128f2b"></a>

This event is implemented with our javascript analytics library. The tracking code is managed in the storefront theme.

The `Product Removed` event follows the same specification as the `Product Added` Event described below.

**Event Properties**

| Property    | Type   | Description                             |
| ----------- | ------ | --------------------------------------- |
| product\_id | String | Database id of the product being viewed |
| sku         | String | Sku of the product being viewed         |
| category    | String | Product category being viewed           |
| name        | String | Name of the product being viewed        |
| brand       | String | Brand associated with the product       |
| variant     | String | Variant of the product (e.g. Black)     |
| price       | Number | Price ($) of the product being viewed   |
| quantity    | Number | Quantity of a product                   |
| position    | Number | Position in the product list (ex. 3)    |
| url         | String | URL of the product page                 |
| image\_url  | String | Image url of the product                |

### Example: <a href="#id-0883bd5c-0088-4f76-aadd-83b3e078c93f" id="id-0883bd5c-0088-4f76-aadd-83b3e078c93f"></a>

```javascript
analytics.track('Product Added', {
  product_id: '507f1f77bcf86cd799439011',
  sku: 'G-32',
  category: 'Games',
  name: 'Monopoly: 3rd Edition',
  brand: 'Hasbro',
  variant: '200 pieces',
  price: 18.99,
  quantity: 1,
  position: 3,
  url: 'https://www.example.com/product/path',
  image_url: 'https://www.example.com/product/path.jpg'
});
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learn.fueled.io/integrations/destinations/segment.com/segment-event-specifications/product-added-removed.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
