Events always occur on a page view, so you must pass the associated page view pixel information together with the event pixel.

Any time a user adds an item to their cart, Bloomreach's Add To Cart Event should fire. Typically this includes the product display page, product listing pages such as category or search pages as well as Quick Views. If an Add To Cart button is located anywhere else on your site (e.g. Product Collection pages) , please also fire this tag there as well. 

To get started, follow the steps given below:

1\. Copy & paste the **ATC Event Tracking Snippet** & install on all of your ATC buttons.  2\. Map the ATC Event Variables in the ATC Tracking Snippet. Check the implementation scenarios for examples.

**ATC Event Tracking Snippet for ATC Button**



## ATC Event Variables

Product Collections

As part of a new Pixel update, all existing and new integrations are required to add the prod_collection_id parameter when a product is added to cart from a Product Collection page and set it to the ID of the Collection. You can continue to set prod_id to the ID of the product added to cart (regardless of whether it’s an individual product or a Product Collection). Read through the examples below for more details on its usage.

VariableValue type, exampleDescription
prod_idstring, pid123456This is the unique ID, which describes a product or product collection. If a product is available in multiple SKUs (e.g. color/size combinations), this field refers to the id shared by all the SKUs for a product. Needs to match Product ID sent in feed, and the prod_id in the Conversion Page View Pixel.
prod_collection_id(Optional) string, "collection5678"It is needed if a product is added to cart from a Product Collection page. This is the unique ID that describes the Product Collection. Make sure that the collection ID is sent in the feed as a product ID.
skustring, sku38738Unique SKU id that representing the selected variant of this product (e.g. size M, color blue of a t-shirt). Needs to match SKU ID sent in feed. **If your site does not have SKUs, leave this blank.**

## Implementation Scenarios

Column Title
Column Title
**Scenario****Examples**
ATC on a Product Detail Page (PDP) with a product ID and a Sku IDIf your product ID is prod1234 and the sku ID is sku38738, your ATC event should look like:

Column Title
Column Title
**Scenario****Examples**
ATC on a Product Detail Page (PDP) with a product ID but no Sku IDIf your product ID is prod1234, but there is no Sku, your ATC event should look like:

Column Title
Column Title
**Scenario****Examples**
ATC on a Product Collection page with a unique collection IDIf your Product Collection page has their own unique ID and is sold exactly like a standalone product, enter the collection ID. <br><br> If your collection ID is collection5678, your ATC event should look like:
ScenarioExamples
ATC on a Product Collection page with a unique collection IDSet prod_id to the Product Collection ID to specify the id of the product added to cart. Set prod_collection_id to the Product Collection ID to indicate that the product added to cart is part of the Product Collection. If your collection ID is collection5678, your ATC event should look like:

Column Title
Column Title
**Scenario****Examples**
ATC on a Quick ViewIf your site has an ATC button on a Quick View pop-up for an individual product and the product ID is prod1234, your ATC event should look like:


If you sell Collections, you can implement the pixel in several different ways. The table below outlines multiple scenarios and the pixel requirements for each.

ScenarioExamples
Product Collections have their own unique ID and are sold exactly like standalone productsSet prod_id to the Product Collection ID to specify the id of the product added to cart. Set prod_collection_id to the Product Collection ID to indicate that the product added to cart is part of the Product Collection. If your collection ID is collection5678, your ATC event should look like:

ScenarioExamples
Product Collections have their own unique ID, but cannot be purchased as a whole. Only individual products can be purchasedCall the ATC Event for each individual product added to the cart. If your Product Collection Page has an **Add all ATC** button, an ATC event for each single product added to the cart needs to be fired. In each ATC pixel: <ul> <li>Set prod_id to the id of the individual product added to cart.</li> <li>Set prod_collection_id to the Product Collection ID to indicate that the product added to cart is part of the Product Collection.</li> </ul>

**Example 1**: <br>Your collection ID is _collection5678_ and a user adds two individual products with product ID _product1234_ and _product5678 _ in the cart, then two ATC events need to be fired. 

The ATC event for the first product should look like:<br><br>



The ATC event for the second product should look like:<br><br>



**Example 2**: <br>Your collection ID is _collection5678_ and by clicking an **Add all** ATC button, _product1234_ and _product5678 _ are added to the cart. Two ATC events need to be fired from the **Add all** ATC button:<br><br>



Alternatively, fire a single ATC event with a comma-separated list of product IDs:<br><br>


ScenarioExamples
A product that is part of a Product Collection but is added to cart from its own individual Product Detail Page.Set prod_id to the id of the product added to cart. **Do not** include the prod_collection_id variable. If your product ID is product1234, your ATC event should look like:


**Implementation Example**

ScenarioImplementation ExampleColumn Title
ATC handler in your HTML code**ATC Event Snippet to add into an HTML element**<br><br>


### Native App Implementation

Discovery SDKs

For details on using the Discovery [Android](🔗) and [iOS](🔗) SDKs for specific Native App Implementation, refer to their respective linked guides.

You can include the [Global View variables](🔗) and the following variables for ATC events.

  • type

  • group

  • etype

  • prod_id (see above)

  • prod_name

  • sku (see above)

Refer to the Implementation Scenarios above for specific use cases of prod_id and sku.

NameVariableExampleDescription
Tracking Typetype
The type of tracking fire. For events, type=event
Group Typegroup
Specifies the event grouping. Must not be empty.<br><br>For ATC events, group=cart
Event Action Typeetype
Specifies the event's action type. Must not be empty.<br><br>For ATC events, etype=click-add
Product nameprod_nameBlue%20Lace%20DressThe name of the product being viewed.

Example requests: