How to set up WordPress plugin
Updated Sep 25, 2026
Before you begin
If you want to use functionalities such as the Custom Loader and Cookie Keeper power-ups, or Customer Match, you need to have an sGTM container hosted on Stape. You will also need GA4 or Data tags configured in a web GTM. If you don’t have this, follow the Get started with sGTM hosting instructions.
How to set up the plugin
- Log in to WordPress Admin → go to Plugins → Add Plugin.
- Search for Stape Conversion Tracking, install it, and click Activate.

General
- Open the plugin and configure the General tab. Choose whether to use Same-origin proxy. Normally the GTM web loader is served from your Stape subdomain. With same-origin enabled, that loader is served by Stape but routed through your WordPress site, so the browser treats it as first-party. It’s still Stape’s loader and container – WordPress is only the pass-through.
Setup with Same-origin proxy enabled
- Web Google Tag Manager ID - be sure to add your web GTM container’s ID. Read how to find the web GTM container ID.
- Proxy path - enter a proxy path for requests, such as /gtm. Once you save the setup, click Test connection to confirm the path responds.
- Container API key - enter your container API key, located in your Stape account container settings. Read how to find the container API key.
- Add web GTM script onto every page of your website - select this if you want to add web GTM to all site pages. Make sure you are not using any other plugins that insert GTM script on the site to avoid conflicts or event duplication.
- Load GTM with consent - select this and GTM will wait for information about the user’s marketing consent before tracking any data.
- Exclude GTM for user roles - select user roles whose activities will not be tracked by GTM.
- Disable - select this to only add plugin functionality without adding GTM script (for example, if you are using another plugin that inserts GTM script on the site).

Setup with Same-origin proxy disabled
- Add web GTM script onto every page of your website - select this if you want to add web GTM to all site pages. Make sure you are not using any other plugins that insert GTM script on the site to avoid conflicts or event duplication.
- Load GTM with consent - select this and GTM will wait for information about the user’s marketing consent before tracking any data.
- Exclude GTM for user roles - select user roles whose activities will not be tracked by GTM.
- Disable - select this to only add plugin functionality without adding GTM script (for example, if you are using another plugin that inserts GTM script on the site).
- Web Google Tag Manager ID - be sure to add your web GTM container’s ID. Read how to find the web GTM container ID.
- Server GTM container URL - enter your tagging server URL. If you are using Stape’s sGTM hosting, read how to find your sGTM container URL on Stape. Otherwise, it can be found in your server GTM container’s settings.
- Stape container identifier - enter the Stape container identifier if you want to use a Custom Loader (highly recommended to improve the accuracy of conversion tracking).
- Cookie Keeper - select this if you wish to enable Cookie Keeper and prolong cookie lifetime.

Data Layer
- Configure the Data Layer tab:
- Add ecommerce Data Layer events – add standard data layer events to your site.
- Add user data to Data Layer events – add user data layer events to your site.
- Decorate dataLayer event name – adds
_stapeto event names so they don’t clash with existing dataLayer pushes, potentially triggering your tags twice. When it’s unchecked, event names are pushed as per GA4 schema. - Advanced Data Layer settings – customize how specific e-commerce parameters and identifiers are constructed and pushed into the dataLayer. Each parameter can be combined with custom prefixes/separators or fallback logic.
- item_id – configure what identifier represents the product ID in tracking events. Options include
Product ID, Parent Product ID (for variable products), SKU, GTIN, or custom attributes. - item_sku – customize how product SKUs are retrieved and formatted.
- item_brand – select which WooCommerce product taxonomy or custom field represents the product brand.
- transaction_id – control what identifier is used for orders in purchase events/webhooks. Choose between the standard WooCommerce Order ID (
order_id), sequential Order Number (order_number), or custom order numbering plugins, with optional prefixes.

Webhooks
- Configure the Webhooks tab. Webhooks are useful for events outside the website (for example, phone or offline sales).
- Enable Send webhooks to server GTM container.
- Add your Server GTM container URL.
- Choose the webhooks:
- Purchase webhook – send a purchase event when a new order is created.
- Order paid webhook - processing – send the
order_paidevent when the order goes to WooCommerce'spayment received, not shipped yetstatus. Set automatically when an order with physical products is paid. - Order paid webhook - completed – sends the
order_completedevent when the order is fulfilled. WooCommerce sets this automatically only for virtual/downloadable orders; for physical products you should set it manually when the order ships, which can be hours or days later. - Refund webhook – send a refund event when an order is refunded.

Customer Match
- Configure the Customer Match tab:
- Container API Key - enter your container API key, located in your Stape account container settings. Read how to find the container API key.
- Google Ads Operating customer ID - enter the destination account ID for Customer Match upload. Read how to find your operating customer ID.
- Google Ads customer ID - enter your Google Ads account ID (NOT the operating one). Read how to find your customer ID.
- User data - select which user data to share with Google Ads’ Customer Match functionality.
- Consent - select one of the options if you wish to define the consent status of the user data.
- Backfill - select to update existing contacts using the settings above, or leave blank to synchronize only new contacts.

Testing
- Open any site page, open the Developer Tools, and in the Network tab filter by your tagging server URL. If you didn’t set up a custom domain, search by
gtm.js. You should see the web GTM script served through that URL, with status 200.

2. In the same Developer Tools, go to Console and do some actions on your site (for example, add to cart). Type in dataLayer and press Enter. Confirm that the dataLayer is being filled.

3. Test in Google Tag Manager:
3.1. Open your sGTM container → click Preview.
3.2. In a separate tab, open your web GTM container → click Preview and enter your site URL.
3.3. Perform test actions on your website (such as add to cart).
3.4. In the sGTM debug window, verify that incoming requests arrive at your sGTM and are claimed by your Client (GA4 Client or Data Client).

Was this article helpful?
Comments