Skip to content

Commit 798ecef

Browse files
committed
update docs for GTM
1 parent 9801458 commit 798ecef

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

src/docs-app/data/google-tag-manager/08-advanced-iframe-purchase-tracking-via-postmessage.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ This variable will read a dynamic nonce value that Showpass makes available on t
102102

103103
4. **Triggering:**
104104
- Click **Choose a trigger to make this tag fire...**
105-
- Select a trigger like **Custom Event**
105+
- Select **Custom Event**
106106
- **Event name:** Use regex matching to fire on all Showpass ecommerce events:
107107
```text
108108
view_item|add_to_cart|remove_from_cart|begin_checkout|purchase|ecommerce_clear
@@ -201,13 +201,34 @@ This tag listens for messages from the Showpass iFrame and processes them.
201201
202202
4. **Triggering:**
203203
- Click **Choose a trigger to make this tag fire...**
204-
- Select **All Pages** trigger
204+
- Select **Window loded** trigger
205205
- This ensures the listener is set up as soon as the page loads
206206
5. Click **Save**
207207

208208
---
209209

210-
### Step B2: Verify Your Main GTM Ecommerce Tags
210+
### Step B2: Create a trigger for ecommerce events
211+
212+
1. In your GTM container, go to **Triggers** and click **New**
213+
2. **Name your trigger:** A descriptive name like `Custom - Showpass Ecommerce Events` or `Ecommerce Triggers | All Events`
214+
3. **Trigger Configuration:**
215+
- Click **Choose a trigger type to begin setup...**
216+
- Select **Custom Event**
217+
- **Event name:** Enter the following, using a pipe `|` to separate event names:
218+
```text
219+
view_item|add_to_cart|remove_from_cart|begin_checkout|purchase|ecommerce_clear
220+
```
221+
> **Note:** `ecommerce_clear` is a custom event that clears the ecommerce cache in the data layer
222+
- Check the box for **Use regex matching**. This allows the trigger to fire on any of the listed events
223+
- **This trigger fires on:** Select **All Custom Events**
224+
4. Click **Save**
225+
5. Update your existing tags to use this trigger.
226+
227+
For tracking specific single events like `add_to_cart` - please see [Tracking Custom Conversions](https://dev.showpass.com/google-tag-manager/06-tracking-custom-conversions-marketing-pixels)
228+
229+
---
230+
231+
### Step B3: Verify Your Main GTM Ecommerce Tags
211232
212233
Ensure that your main GTM ecommerce tags (e.g., GA4 Ecommerce Event tag, marketing pixel tags) are configured to fire on the events pushed to the `dataLayer` by the postMessage listener.
213234
@@ -216,7 +237,7 @@ Ensure that your main GTM ecommerce tags (e.g., GA4 Ecommerce Event tag, marketi
216237
217238
---
218239
219-
### Step B3: Publish Your Main GTM Container
240+
### Step B4: Publish Your Main GTM Container
220241
221242
1. In your Main GTM container, click **Submit**
222243
2. Provide a version name (e.g., "Added iFrame postMessage Listener")

0 commit comments

Comments
 (0)