Custom pixels

Custom pixels help you to collect customer events on even more pages of your online store, such as the checkout and post-purchase pages. If there isn't an app pixel available that meets your requirements, then you can use custom pixels on your store to track customer events without having to modify your theme code.

Custom pixels are loaded in a Lax sandbox, designed for improved security and control over the data that you send to third parties. Not all pixel functionality works in the sandbox, and you might need to consult your third-party service provider for help. Learn more about pixels sandbox limitations.

Managing custom pixels

You can manage your custom pixels in the Customer events area of your Shopify Admin. Before you add a pixel to your Shopify store, you need to create the code for your custom pixel.

Add a custom pixel

After you create the code for your custom pixel, you can add it to your Shopify store.

Before you add a custom pixel, remove or modify any existing pixels to ensure customer events aren't counted twice. Existing pixel code should be manually removed from any place it exists, such as theme.liquid, checkout.liquid (Plus merchants only), and the Additional scripts in your checkout settings.


  1. From your Shopify admin, go to Settings > Customer events.
  2. Give your pixel a unique name. If you enter the name of a custom pixel that already exists, then you'll be prompted to give your pixel a different name.
  3. Click Add pixel to open the event editor.
  4. Paste your custom javascript pixel code into the Code window.
  5. Click Save to save your custom pixel. If you're ready to connect your custom pixel now, then you can click Connect pixel to start tracking your events.

Connect a custom pixel

After a custom pixel has been added, you need to connect the pixel to your store so that it can start tracking customer events.


  1. From the Customer events page in your Shopify admin, click Custom pixels.
  2. Custom pixels that aren't currently connected are displayed under the heading Disconnected pixels. Click Connect on the appropriate custom pixel line.
  3. Review the Shopify Terms of Service. If your pixel satisfies the service requirements, click Connect.

Disconnect a custom pixel

If you want to stop tracking the events you added a custom pixel for, then you need to manually disconnect the pixel from your online store.


  1. From the Customer events page in your Shopify admin, click Custom pixels.
  2. Custom pixels that are currently connected are displayed at the top of your custom pixels list. Click Disconnect on the appropriate custom pixel line. Disconnecting the pixel doesn't delete the pixel.

Delete a custom pixel

You can delete custom pixels that you no longer need.


  1. From the Customer events page in your Shopify admin, click Custom pixels.
  2. Click the ... button on the appropriate custom pixel line.
  3. Click Delete. Confirm the deletion, and the custom pixel will be removed from the pixels manager.

Deleting a custom pixel can't be undone, so ensure that you're deleting the appropriate pixel.

Test a custom pixel

Each third-party service has its own way of testing whether a pixel is set up correctly. Some of the common Google Chrome extensions for testing pixels include the following:

These extensions are unsupported by Shopify. To request support for a third-party extension, contact the provider directly.

Ready to start selling with Shopify?Try it free