# Custom Pixel For Tracking ATC Events

## The Problem

Fueled provides an out-of-the-box solution for tracking <mark style="color:red;">`add to cart`</mark> events on your Shopify store. This solution adds a javascript event listener on your store’s “Add to Cart” buttons.

For most merchants, this works quite well. We have tested this default solution against many different Shopify 2.0 themes, and it will correctly track <mark style="color:red;">`add to cart`</mark> events on most Product Description Pages and Product Collection Pages.

However, some Shopify themes have been customized in ways that make it more difficult for our default solution to capture all <mark style="color:red;">`add to cart`</mark> events. Examples of when our default solution might not capture all of these events include:

* <mark style="color:red;">`add to cart`</mark> offers listed in side carts.
* “Bundled” <mark style="color:red;">`add to cart`</mark> buttons that add multiple products to a shopping cart at the same time.
* Custom <mark style="color:red;">`add to cart`</mark> buttons that don’t use Shopify’s standard product forms.
* <mark style="color:red;">`add to cart`</mark> buttons that immediately redirect to the Cart page or Checkout.

## The Solution

In late 2022, Shopify released its [Web Pixel API](https://shopify.dev/docs/api/pixels/pixel-extension). This API provides an alternative solution for tracking attribution events. While the API has many benefits, it’s not a perfect solution for full attribution tracking — so we haven’t migrated Fueled over to the Web Pixel API completely.

That said, there are certain use cases, such as with <mark style="color:red;">`add to cart`</mark> events, where the Web Pixel API can be quite helpful.

### Tracking <mark style="color:red;">`add to cart`</mark> events with Fueled with the Web Pixel API

Merchants can leverage the Web Pixel API for tracking <mark style="color:red;">`add to cart`</mark> events in two steps.

1. By setting up a Custom Pixel in the Shopify Admin, which leverages this API.
2. By disabling Fueled’s default <mark style="color:red;">`add to cart`</mark> tracking event.

#### Step 1: Setting up a Custom Pixel in the Shopify Admin UI

To set up a Custom pixel, go to:

<mark style="color:red;">`https://admin.shopify.com/store/[your-store-name]/settings/customer_events`</mark>

*(The click-through path to this configuration screen is: Settings > Customer Events)*

Create a new Pixel called <mark style="color:red;">`Fueled Custom Pixel`</mark>. Copy/paste the code you can find in our App settings:

<figure><img src="/files/o4YJNbYH1AU0p48Qa7Ti" alt=""><figcaption><p>Fueled Custom Pixel v2 Code.</p></figcaption></figure>

#### Step 2: Disabling Fueled’s default <mark style="color:red;">`add to cart`</mark> tracking event

Once you have set up the Custom Pixel, you will want to go into the Fueled App for Shopify and disable our standard <mark style="color:red;">`add to cart`</mark> event tracking:

<figure><img src="/files/vR5VjwFg8qyS0NXB5jpq" alt=""><figcaption><p>If you are using Fueled's custom pixel for your add_to_cart events, be sure to deactivate our standard add_to_cart event.</p></figcaption></figure>

Set this value to “Deactivated”, so that it reads:

> Standard “Add to Cart” tracking is currently ***deactivated*****.**


---

# 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://learn.fueled.io/apps/shopify/shopify-event-tracking/custom-pixel/custom-pixel-for-tracking-atc-events.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.
