---
updatedAt: 2026-09-18T04:55:58.000Z
agentTools:
  siteIndex: https://documentation.bloomreach.com/llms.txt
  projectIndex: https://documentation.bloomreach.com/discovery/llms.txt
---

# Triggering Page View Pixels - iOS

> 👍
>
> Make sure you have completed the steps mentioned in the [main iOS Application Pixel Integration guide](https://documentation.bloomreach.com/discovery/docs/ios-application-pixel-integration) before going through this page.

Individual Page View Pixels are triggered on different screens of your app. Add the code snippet given below for each Pixel to where the screen’s logic is written, to trigger it on the relevant screen.

**Import the `discovery_ios_sdk` module on the files where you need to trigger pixels.**

```swift
import discovery_ios_sdk
```

For detailed information on any of the Page View Pixels or where you should trigger it, refer to [this guide](https://documentation.bloomreach.com/discovery/docs/page-view-pixels).

## Global Tracking Snippet

```swift
PixelTracker.shared.pageViewPixel(
  title: "Blue%20Lace%20Dress"
)
```

Here is a list of the different parameters you can use to configure the pixel:

| Parameter      | Description                                                                      |
| :------------- | :------------------------------------------------------------------------------- |
| title          | The screen name of the app view                                                  |
| ref (Optional) | Synthetic URL from referrer screen. If not provided, uses auto-tracked referrer. |

## Product Page View Pixel

```swift
PixelTracker.shared.productPageViewPixel(
  title: "Blue%20Lace%20Dress",
  prodId: "prodId",
  prodName: "prodName",
  ku: "sku"
)
```

Here is a list of the different parameters you can use to configure the pixel:

| Parameter      | Description                                                                                                                                         |
| :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| title          | Screen name of the app view                                                                                                                         |
| prodId         | This is the unique ID that identifies a product or product collection. This identifier should match the ID as specified in the product catalog feed |
| prodName       | The name of the product being viewed                                                                                                                |
| sku            | Unique SKU ID that represents the selected variant of this product. If your site does not have SKUs, leave this blank                               |
| ref (Optional) | Synthetic URL from referrer screen. If not provided, uses auto-tracked referrer.                                                                    |

## Content Page View Pixel

```swift
var catalogs: [CatalogItem] = []
 	catalogs.append(CatalogItem(name: "cat1"))  

  PixelTracker.shared.contentPageViewPixel(
    title: "Blue%20Lace%20Dress",
    catalogs: catalogs,
    itemId: "itemId",
  	itemName: "itemName"
  )
```

Here is a list of the different parameters you can use to configure the pixel:

[block:parameters]
{
  "data": {
    "h-0": "Parameter",
    "h-1": "Description",
    "0-0": "title",
    "0-1": "Screen name of the app view",
    "1-0": "catalogs",
    "1-1": "List of CatalogItem objects that are shown on the screen. In case the screen has multiple tabs, only the catalogs of the selected (and visualized) tabs should be included.  \nIf multiple catalogs are shown in the active screen (or tab) all of them should be included.  \n  \nThe `CatalogItem` object has the following parameters:  \n_name_ - Catalog Name  \n_viewIds_ - A unique ID for a specific view of your product catalog. View IDs are decided by Bloomreach and you at the time of integration. This can have Single or Multiple IDs.",
    "2-0": "itemId",
    "2-1": "Unique ID of the item being shown on the screen. This identifier should match the item_id as specified in the content feed",
    "3-0": "itemName",
    "3-1": "Name or Title of the content item",
    "4-0": "ref  \n(Optional)",
    "4-1": "Synthetic URL from referrer screen. If not provided, uses auto-tracked referrer."
  },
  "cols": 2,
  "rows": 5,
  "align": [
    "left",
    "left"
  ]
}
[/block]

## Content Search Page View Pixel

```swift
var catalogs: [CatalogItem] = []
 	catalogs.append(CatalogItem(name: "cat1"))  

  PixelTracker.shared.contentSearchPageViewPixel(
    title: "Blue%20Lace%20Dress",
    catalogs: catalogs,
    searchTerm: "test"
  )
```

Here is a list of the different parameters you can use to configure the pixel:

[block:parameters]
{
  "data": {
    "h-0": "Parameter",
    "h-1": "Description",
    "0-0": "title",
    "0-1": "Screen name of the app view",
    "1-0": "catalogs",
    "1-1": "List of CatalogItem objects that are shown on the screen. In the case the screen has multiple  \ntabs, only the catalogs of the selected (and visualized) tabs should be included.  \nIf multiple catalogs are shown on the active screen (or tab) all of them should be included.  \n  \nThe `CatalogItem` object has the following parameters:  \n_name_ - Catalog Name  \n_viewIds_ - A unique ID for a specific view of your product catalog. View IDs are provided by Bloomreach and you at the time of integration. This can have Single or Multiple IDs.",
    "2-0": "searchTerm",
    "2-1": "The value of the search query that was executed",
    "3-0": "ref  \n(Optional)",
    "3-1": "Synthetic URL from referrer screen. If not provided, uses auto-tracked referrer."
  },
  "cols": 2,
  "rows": 4,
  "align": [
    "left",
    "left"
  ]
}
[/block]

## Category Page View Pixel

```swift
PixelTracker.shared.categoryPageViewPixel(
  title: "Blue%20Lace%20Dress",
  category: "catName",
  categoryId: "catId"
)
```

Here is a list of the different parameters you can use to configure the pixel:

| Parameter      | Description                                                                                                                                                                                                                    |
| :------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| title          | Screen name of the app view                                                                                                                                                                                                    |
| categoryId     | Unique category ID as referred to in the catalog                                                                                                                                                                               |
| category       | The full breadcrumb path of the category, separated by pipe (\|). Value needs to match the crumb value in your feed. eg: If the Crumb path  is **“Home > Clothing > Outerwear”**, you’ll enter **"Home\|Clothing\|Outerwear"** |
| ref (Optional) | Synthetic URL from referrer screen. If not provided, uses auto-tracked referrer.                                                                                                                                               |

## Search Result Page View Pixel

```swift
PixelTracker.shared.searchResultPageViewPixel(
  title: "Blue%20Lace%20Dress",
  searchTerm: "test"
)
```

Here is a list of the different parameters you can use to configure the pixel:

| Parameter           | Description                                                                                                                                                                                 |
| :------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| title               | Screen name of the app view                                                                                                                                                                 |
| searchTerm          | The value of the search query that was executed for this screen                                                                                                                             |
| catalogs (Optional) | If you have at least 1 catalog where the data type is content, then you should send the [catalogs](https://documentation.bloomreach.com/discovery/docs/pixel-reference#catalogs) parameter. |
| ref (Optional)      | Synthetic URL from referrer screen. If not provided, uses auto-tracked referrer.                                                                                                            |

## Conversion Page View Pixel

```swift
var basket:[PixelBasketItem] = []
basket.append( PixelBasketItem(prodId: "prodId1", name: "name1", sku: nil, quantity: "1", price: "12"))


PixelTracker.shared.conversionPageView(
  title: "Blue%20Lace%20Dress",
  isConversion: true,
  basketValue: "$123",
  orderId: "orderId",
  basket: basket
)
```

Here is a list of the different parameters you can use to configure the pixel:

[block:parameters]
{
  "data": {
    "h-0": "Parameter",
    "h-1": "Description",
    "0-0": "title",
    "0-1": "The Screen name of the app view",
    "1-0": "isConversion",
    "1-1": "Set to **true** to indicate this is a Conversion screen or Order confirmation screen",
    "2-0": "basketValue",
    "2-1": "The total price of the checkout basket including tax, discounts, shipping and/or discounts in the account currency",
    "3-0": "orderId",
    "3-1": "The order ID associated with the order placed",
    "4-0": "basket",
    "4-1": "List of the PixelBasketItem objects (Products purchased).  \n  \nThe `PixelBasketItem` object has the following parameters:  \n_prodId_ - Product ID of the purchased product  \n_name_ - Name of the purchased product  \n_sku_ - SKU number of the purchased product  \n_quantity_ - Purchased quantity of the product  \n_price_ - Price for the product",
    "5-0": "ref  \n(Optional)",
    "5-1": "Synthetic URL from referrer screen. If not provided, uses auto-tracked referrer."
  },
  "cols": 2,
  "rows": 6,
  "align": [
    "left",
    "left"
  ]
}
[/block]