/Documentation

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

  1. Log in to WordPress Admin → go to Plugins → Add Plugin.
  2. Search for Stape Conversion Tracking, install it, and click Activate.
Stape Conversion Tracking

General

  1. 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.

Data Layer

  1. 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 _stape to 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.
Data Layer tab

Webhooks

  1. 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_paid event when the order goes to WooCommerce's payment received, not shipped yet status. Set automatically when an order with physical products is paid.
    • Order paid webhook - completed – sends the order_completed event 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.
Webhooks tab

Customer Match

  1. 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.
Customer Match tab

Testing

  1. 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.
Network tab

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.

DataLayer

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).

GTM test

Was this article helpful?

Comments

Can’t find what you are looking for?