# How to set up server-side tracking on Yampi

> Set up server-side tracking on Yampi with the Sourei Wascer app: GTM loader, order webhooks to sGTM and dataLayer event checks.

The default server-side setup for Yampi is easy to implement with the Sourei Wascer app. The app helps you deploy a modified gtm.js loader in your Yampi store, send data to sGTM through webhooks, and forward dataLayer.push events to your web container.

### 1. Set up your [Google Tag Manager](https://wascer.com/pk/helpdesk/primeiros-passos-com-hospedagem-sgtm/criar-um-container-server-no-google-tag-manager) server container on Wascer.

### 2. Install and configure the Wascer Tracking app for Yampi.

The purpose of the app is to simplify both server-side Google Tag Manager setup and the process of sending data into GTM. It works with Wascer hosting for server-side Google Tag Manager as well as with other hosting providers, but the custom loader and cookie management features only work when you are using Wascer hosting.

### 2.1. Install the Sourei Wascer app in your store.

![Sourei Wascer app page on the Shopify App Store, with the Install button](https://blog.wascer.com/api/media/file/Captura-de-tela-de-2026-05-16-14-39-57.webp?v=1793990141793)

### 2.2. Under the General tab, you will find all settings related to installing the GTM snippet across every page of your Yampi store.

![Sourei Wascer app settings with the container ID, custom domain, Was Loader and Cookie Shield](https://blog.wascer.com/api/media/file/123123-1400x799.webp?v=1793990140952)

- **GTM web container id**  
Here you need to specify your GTM WEB container ID.
- **Custom domain**  
It is extremely important to use your own subdomain for first-party cookies to work correctly and for tracking to work in general. If you have not added a subdomain to your sGTM container yet, use [this guide](https://wascer.com/pk/helpdesk/primeiros-passos-com-hospedagem-sgtm/adicionar-um-dominio-customizado) to add one.
- **Was Loader**  
An optional parameter, but its use is highly recommended to increase protection against ad blockers.  
  
Enter your Wascer container identifier here. See [this guide](https://wascer.com/pk/helpdesk/containers-no-painel/lista-de-containers) to find where it appears in the Wascer dashboard.
- **Cookie Shield**  
It allows you to minimize the impact of the latest ITP restrictions.  
  
Before activating this feature, make sure it is enabled in Wascer, in your container.

### 2.3. Webhook events are configured in the Webhook tab.

The **WebHook** tab is used to configure order event delivery to an external HTTP endpoint.

![Webhook tab of the Sourei Wascer app, with the URL, the events and the test](https://blog.wascer.com/api/media/file/Captura-de-tela-de-2026-05-19-11-12-04-1400x706.webp?v=1793990137680)

In this tab, you define the **Webhook URL** and select which events should be sent:

- Order Created
- Order Paid
- Order Refunded

When enabled, these events are automatically sent to the configured URL.

#### **Available fields**

- **Webhook URL:** primary endpoint that will receive the events.
- **Webhook Types:** list of enabled events.
- **Save Webhook(s):** saves the current configuration.

#### **Webhook Test**

The test section allows you to validate the integration manually using a sample payload.

Fields:

- **Test URL:** endpoint used for validation.
- **X-Gtm-Server-Preview:** optional header for debugging with GTM Server-Side Preview.
- **Test Payload:** selects which sample event should be sent.

#### **Current Configuration**

The final section displays:

- configured URL
- active webhooks
- enabled event routes
- last update timestamp

### 2.4. Validate tracking events

At this step, you should be able to validate events such as:

- page view events
- ecommerce-related dataLayer pushes
- Wascer tracker initialization and debug messages
- Open the **browser console** (DevTools) and check that **dataLayer** events fire correctly as you browse and interact with the store.

![Browser console showing the Wascer DataLayer events](https://blog.wascer.com/api/media/file/Captura-de-tela-de-2026-05-18-18-28-33-1400x368.webp?v=1793990133409)

This check confirms that the storefront integration is active and that the tracking layer is available before data is sent to GTM or to server-side endpoints.

Source: https://wascer.com/helpdesk/yampi-apps/como-configurar-o-rastreamento-server-side-na-yampi
