> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dema.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add pixel (Tracking script)

> Learn how to install the Dema tracking script on various platforms like Shopify, custom sites, and Google Tag Manager. Verify your events are coming in and troubleshoot common issues.

## Adding the Dema Pixel

Dema’s tracking pixel ensures that your site captures all key events (page views, product views, and orders) accurately and in near real-time. Follow the steps below to implement it based on your platform.

### Where is the script implemented?

Dema offers multiple methods to deploy tracking, depending on your platform:

* **Shopify**: Dema’s **web pixel** leverages Shopify’s [Web Pixel API](https://shopify.dev/docs/apps/build/marketing-analytics/pixels#requesting-consent) to automatically capture key events. No manual code injection is needed once you install the Dema app.\
  [Learn how to set up tracking on Shopify](/integrations/ecommerce/shopify)

* **Google Tag Manager (GTM)**: Insert the Dema tracking script as a custom HTML tag in your GTM container. Use triggers like `pageview` or `DOM ready` for standard events.\
  [Learn how to set up tracking using GTM](/integrations/tracking/google-tag-manager)

* **Server-side tracking**: Send data directly to Dema’s tracking endpoint from your server for maximum reliability and privacy.\
  [Learn how to send data server-side](/integrations/tracking/server-side-tracking)

<Info>
  **Single-Page Applications (SPA)**: For SPAs, ensure events are fired manually on navigation or route changes.\
  [Learn more about SPA tracking](/guides/single-page-application).
</Info>

***

## Verifying events

Once the Dema pixel is implemented, verify that events are being tracked correctly:

1. **Use Browser Developer Tools**:
   * Open the **Network tab** in your browser’s developer tools.
   * Trigger an event (e.g., load a page or view a product).
   * Look for requests sent to Dema’s endpoint (`https://tracker.dema.ai`).

2. **Check the Dema Dashboard**:
   * Navigate to the **Real-Time Dashboard** in Dema.
   * Verify that events are appearing shortly after they occur (typically within 3 minutes).

3. **Test Different Scenarios**:
   * Test on multiple devices and browsers to ensure consistent tracking.
   * Check campaign attribution by visiting your site with UTM-tagged URLs (e.g., `utm_source=google`).

***

## Debugging and additional help

For a deeper understanding of how Dema’s tracking works, including detailed troubleshooting guidance, refer to our [Fundamentals: Tracking](/guides/fundamentals/tracking) page.

<Info>
  **Need help?** Email us at [support@dema.ai](mailto:support@dema.ai) for further assistance.
</Info>
