Shopify custom pixel - customer events

Topic summary

A user is implementing Sentry’s debugging tool via Shopify’s custom pixel feature and encountering a console warning: “In a sandboxed environment, addEventListener may not behave as expected.”

Key Points:

  • The Sentry script loads successfully on the Shopify site
  • The warning appears due to Shopify Custom Pixels’ restricted/sandboxed execution context
  • Core functionality remains intact: Basic Sentry features like error capturing, exception logging, and performance monitoring will work normally
  • Potential limitations: Advanced features such as session replay or comprehensive DOM tracking may be restricted in the sandboxed environment

Resolution: The warning does not impact primary error monitoring capabilities. The user can proceed with their current implementation for standard debugging purposes.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Hello Team,

I am using custom pixel in shopify to load script of sentry. i am using loader script for sentry. This basically tool which is helpful for debugging.

when I connect this custom pixel It is working and sentry script is loaded on my shopify site but on console we are facing one warning -
In a sandboxed environment, addEventListener may not behave as expected.

so kindly answer that this warning will impact on core sentry functionality.

Thank you

Hi @Khushboo4 ,

The warning “In a sandboxed environment, addEventListener may not behave as expected” is common when scripts are loaded in a restricted context like Shopify Custom Pixels. This usually does not affect the core functionality of Sentry such as capturing JavaScript errors, exceptions, or basic performance data. However, certain advanced features (e.g., session replay or full DOM tracking) may have limitations due to the sandboxed environment. If your primary goal is error monitoring and logging, Sentry will continue to function as expected despite this warning.

Thanks!