# Ecommerce Performance Monitoring & Error Tracking

> Monitor and optimize your online store with Sentry. Catch JS errors, third-party outages and checkout delays fast—resolve issues before they cost sales.

**URL:** https://sentry.io/solutions/ecommerce/

---

From a checkout bug to a slow product page, Sentry’s error tracking & performance monitoring gives you the full, connected context behind every issue, plus visibility into the revenue-critical paths you can’t afford to lose.

## Supported SDKs

- Shopify Hydrogen — [Docs](https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/)

- Node.js — [Docs](https://docs.sentry.io/platforms/javascript/guides/node/agent-tracing/vercelai/)

- NestJS — [Docs](https://docs.sentry.io/platforms/javascript/guides/nestjs/agent-tracing/vercelai/)

- Nuxt — [Docs](https://docs.sentry.io/platforms/javascript/guides/nuxt/agent-tracing/vercelai/)

- React

- Vue — [Docs](https://docs.sentry.io/platforms/javascript/guides/vue/)

- Laravel — [Docs](https://docs.sentry.io/platforms/php/guides/laravel/)

- Remix — [Docs](https://docs.sentry.io/platforms/javascript/guides/remix/agent-tracing/vercelai/)

- React Native

- iOS — [Docs](https://docs.sentry.io/platforms/apple/guides/ios/)

- Android — [Docs](https://docs.sentry.io/platforms/android/)

- SvelteKit — [Docs](https://docs.sentry.io/platforms/javascript/guides/sveltekit/agent-tracing/vercelai/)

- Flutter — [Docs](https://docs.sentry.io/platforms/dart/guides/flutter/)

- WordPress — [Docs](https://github.com/stayallive/wp-sentry)

## Details

### Catch and fix bugs before revenue takes a hit

Know what to fix first: Sentry captures, groups and prioritizes every error.

The context is all there: [Errors](https://sentry.io/product/error-monitoring/) always include full stack traces, breadcrumbs, and suspect commits. Enable [tracing](https://sentry.io/product/tracing/) to link the relevant [logs](https://sentry.io/product/logs/), spans, replays and more.

Automate debugging: Connect Sentry's context to your agent via the [CLI](https://cli.sentry.dev/) or [MCP](https://mcp.sentry.dev/).

### Eyes on every revenue-critical path

See what your customers see: Non-obvious dropoff reasons become obvious when janky renders and bad UI reveal themselves in [Session Replay](https://sentry.io/product/session-replay/)

Watch your key shopping flows: Monitor checkout conversion, cart abandonment, page load speed and more with custom [dashboards](https://docs.sentry.io/product/dashboards/custom-dashboards/)

Connect business signals to code: When code redemption or payment success rates change, [Metrics](https://sentry.io/product/metrics/) connects them to the traces and logs that tell you what happened

### E-commerce languages & frameworks

Sentry integrates with popular e-commerce languages and frameworks.

Shopify: [Hydrogen](https://docs.sentry.io/platforms/javascript/guides/cloudflare/frameworks/hydrogen-react-router/)

[Frontend](https://sentry.io/for/frontend/): JavaScript, Next.js, React, Angular, Ember, Vue

[Mobile](https://sentry.io/solutions/sentry-for-mobile-developers/): iOS, Android, Flutter, React Native, Unity, .NET MAUI

## Cookbook recipes

- **Track and fix checkout performance in React Native with Sentry tracing**: Use Sentry tracing to instrument a React Native checkout flow with a Python backend, identify slow HTTP requests, and set up alerts and dashboards. — [Learn more](https://sentry.io/cookbook/track-checkout-performance-react-native/)

## Customer Story

> A lot of solutions do error monitoring, but Sentry goes the extra mile when it comes to details.

[Read the full story](https://sentry.io/customers/gorgias/)

- **10** Daily Deployments

- **99%** Uptime

- **Hours** To incident resolution

## Check out more content

- [Monitoring Critical E-commerce Experiences: Developer's Checklist](https://sentry.io/resources/holiday-e-commerce-checklist/): Stay ready: track errors, set smart alerts, capture session replays, monitor performance, and prevent bugs before they ship.

- [Monitoring & Debugging a Checkout Flow in Flask & React](https://blog.sentry.io/monitoring-and-debugging-a-checkout-flow-in-flask-and-react/): When your checkout flow breaks, customers disappear faster than most ‘cutting-edge’ JS metaframeworks. Let's walk through how we instrumented, monitored, and fixed a major issue, with minimal effort, using Sentry.

- [Etsy Workshop](https://sentry.io/resources/etsy-workshop/)

- [Introducing Application Metrics](https://blog.sentry.io/introducing-application-metrics/): We just launched Application Metrics, a new way to track critical signals in your application. It lets you understand your users with context and catch problems before they become errors.

- [Mobile App Monitoring Platforms Don’t Have To Be Noisy](https://sentry.io/resources/mobile-app-monitoring-workshop/): Learn how to use Sentry for Mobile featuring error monitoring, mobile replay, tracing, and more.

- [Monitor and Debug Laravel Applications with Sentry](https://sentry.io/resources/debug-laravel-with-sentry/): A hands-on workshop to master error monitoring, replays, performance tracking, and AI-powered fixes with Sentry

- [Track and fix checkout performance in React Native with Sentry tracing](https://sentry.io/cookbook/track-checkout-performance-react-native/)

## Quick Start

Server-side snippets read the DSN from an environment variable: `SENTRY_DSN`, or `NEXT_PUBLIC_SENTRY_DSN` for Next.js. In browser apps, `process.env` is not available at runtime, so use your bundler's env syntax instead (for example `import.meta.env.VITE_SENTRY_DSN` with Vite). Where a snippet still shows `https://<key>@sentry.io/<project>`, such as a config file, replace it with your project's DSN.

### Android

Just run this command to sign up for and install Sentry.

```bash
npx @sentry/wizard@latest -i android
```

See the [Android docs](https://docs.sentry.io/platforms/android/) for full setup options.

### iOS

Just run this command to sign up for and install Sentry.

```bash
brew install getsentry/tools/sentry-wizard && sentry-wizard -i ios
```

See the [iOS docs](https://docs.sentry.io/platforms/apple/guides/ios/) for full setup options.

### Flutter

Sign-up and install Sentry with just one line of code:

```bash
npx @sentry/wizard@latest -i flutter
```

See the [Flutter docs](https://docs.sentry.io/platforms/dart/guides/flutter/) for full setup options.

### Node.js

Grab the [Sentry Node SDK](https://github.com/getsentry/sentry-javascript/):

```bash
npm install @sentry/node
```

Configure your SDK:

```javascript
const Sentry = require('@sentry/node');
Sentry.init({ dsn: process.env.SENTRY_DSN });
```

See the [Node.js docs](https://docs.sentry.io/platforms/javascript/guides/node/) for full setup options.

### React

Grab the [Sentry React SDK](https://github.com/getsentry/sentry-javascript/):

```bash
npm install @sentry/react
```

We recommend putting the Sentry initialization code into its own file and including that file as the first import in your application entry point as shown in the example below:

```jsx
import { useEffect } from "react";
import * as Sentry from "@sentry/react";

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  integrations: [
  ],
  // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
  tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
});
```

Include the Sentry initialization file as the first import statement:

```jsx
// Sentry initialization should be imported first!
import "./instrument";
import App from "./App";
import { createRoot } from "react-dom/client";

const container = document.getElementById(“app”);
const root = createRoot(container);
root.render(<App />);
```

See the [React docs](https://docs.sentry.io/platforms/javascript/guides/react/) for full setup options.

### JavaScript

Grab the [Sentry JavaScript SDK](https://github.com/getsentry/sentry-javascript/):

```html
<script src="https://browser.sentry-cdn.com/<VERSION>/bundle.min.js"></script>
```

Configure your DSN:

```javascript
Sentry.init({ dsn: process.env.SENTRY_DSN,
  // This enables automatic instrumentation (highly recommended),
  // but is not necessary for purely manual usage
  // If you only want to use custom instrumentation:
  // * Remove the BrowserTracing integration
  // * add Sentry.addTracingExtensions() above your Sentry.init() call
  integrations: [Sentry.browserTracingIntegration()],

  // We recommend adjusting this value in production, or using tracesSampler
  // for finer control
  tracesSampleRate: 1.0,

  // Set tracePropagationTargets to control for which URLs distributed tracing should be enabled
  tracePropagationTargets: ['localhost', /^https://yourserver.io/api/],
});
```

See the [JavaScript docs](https://docs.sentry.io/platforms/javascript/) for full setup options.

### Laravel

Install the `sentry/sentry-laravel` package with Composer:

```bash
composer require sentry/sentry-laravel
```

Add Sentry reporting to `bootstrap/app.php`:

```php
<?php

use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Sentry\Laravel\Integration;

return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        commands: __DIR__.'/../routes/console.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        //
    })
    ->withExceptions(function (Exceptions $exceptions) {
        Integration::handles($exceptions);
    })->create();
```

Enable Sentry Tracing in `config/sentry.php`:

```php
// Specify a fixed sample rate:
'traces_sample_rate' => 0.2,
// Or provide a custom sampler:
'traces_sampler' => function (SentryTracingSamplingContext $context): float {
    // return a number between 0 and 1
},
```

Run this `Artisan` command to configure the Sentry DSN:

```bash
php artisan sentry:publish --dsn=<paste-your-DSN-here>
```

See the [Laravel docs](https://docs.sentry.io/platforms/php/guides/laravel/) for full setup options.

### Vue

Grab the [Sentry Vue SDK](https://github.com/getsentry/sentry-javascript/):

```bash
npm install @sentry/vue
```

Configure your DSN:

```javascript
import { createApp } from "vue";
import * as Sentry from "@sentry/vue";

const app = createApp({
  // ...
});

Sentry.init({
  app,
  dsn: process.env.SENTRY_DSN",
  // This enables automatic instrumentation (highly recommended),
  // but is not necessary for purely manual usage
  // If you only want to use custom instrumentation:
  // * Remove the BrowserTracing integration
  // * add Sentry.addTracingExtensions() above your Sentry.init() call
  integrations: [Sentry.browserTracingIntegration()],

  // We recommend adjusting this value in production, or using tracesSampler
  // for finer control
  tracesSampleRate: 1.0,
  // Set tracePropagationTargets to control for which URLs distributed tracing should be enabled
  tracePropagationTargets: ['localhost', /^https://yourserver.io/api/],
});

app.mount("#app");
```

See the [Vue docs](https://docs.sentry.io/platforms/javascript/guides/vue/) for full setup options.

### Svelte

To use the SDK, initialize Sentry in your Svelte entry point main.js before you bootstrap your Svelte app:

```jsx
// main.js / main.ts

import App from "./App.svelte";

import * as Sentry from "@sentry/svelte";
import { BrowserTracing } from "@sentry/tracing";

// Initialize the Sentry SDK here
Sentry.init({
  dsn: "__DSN__",
  release: "my-project-name@2.3.12",
  integrations: [new BrowserTracing()],

  // This enables automatic instrumentation (highly recommended),
  // but is not necessary for purely manual usage
  // If you only want to use custom instrumentation:
  // * Remove the BrowserTracing integration
  // * add Sentry.addTracingExtensions() above your Sentry.init() call
  integrations: [Sentry.browserTracingIntegration()],

  // We recommend adjusting this value in production, or using tracesSampler
  // for finer control
  tracesSampleRate: 1.0,

  // Set tracePropagationTargets to control for which URLs distributed tracing should be enabled
  tracePropagationTargets: ['localhost', /^https://yourserver.io/api/],
});

// Then bootstrap your Svelte app
const app = new App({
  target: document.getElementById("app"),
});

export default app;
```

See the [Svelte docs](https://docs.sentry.io/platforms/javascript/guides/svelte/) for full setup options.

### Next.js

See -- it's really just one command. 

```bash
npx @sentry/wizard@latest -i nextjs
```

See the [Next.js docs](https://docs.sentry.io/platforms/javascript/guides/nextjs/) for full setup options.

---

*Source: [sentry.io/solutions/ecommerce/](https://sentry.io/solutions/ecommerce/)*
