The events Pagejar pushes to the data layer
Pagejar uses the standard Google Analytics 4 ecommerce event names, so GA4 and Google Ads tags work with them without any renaming. The events are pushed in the browser of the person visiting your page.
| Event | When it fires | What it means |
|---|---|---|
| view_item | Once, when the page opens | Someone is looking at your product. |
| add_to_cart | When the buyer taps an order button on a one-product page, or adds an item on a page with a cart | Someone wants this product. |
| begin_checkout | Once per visit, when the buyer starts filling in the order form | Someone is ordering. |
| purchase | When a cash on delivery order is placed, or when an online payment is confirmed | A sale. |
- Pagejar does not push its own page_view event. Use Tag Manager's built-in All Pages trigger for page views.
- Nothing is sent in the editor preview or in a share-preview link. Test on the published page.
What each event carries
Every event is pushed in two steps. First Pagejar clears the old ecommerce data with ecommerce: null, then it pushes the new event. This is Google's recommended pattern, so two events never mix their items.
A view_item event looks like this:
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "view_item",
ecommerce: {
currency: "BDT",
value: 1650,
items: [
{
item_id: "46eb3326-7ea6-4a3e-bf39-97c4efaf8901",
item_name: "Cotton Three-Piece",
item_variant: "",
price: 1650,
quantity: 1
}
]
}
});The purchase event
A purchase has the same shape, plus a transaction_id. This is the order number you see in your Pagejar dashboard under Orders:
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: "purchase",
ecommerce: {
currency: "BDT",
value: 3370,
transaction_id: "PJ-MW66ABC123",
items: [
{
item_id: "var-9d2c",
item_name: "Cotton Three-Piece",
item_variant: "Black / XL",
price: 1650,
quantity: 2
}
]
}
});| Field | What it holds | Example |
|---|---|---|
| ecommerce.currency | Always BDT | BDT |
| ecommerce.value | On view_item, add_to_cart and begin_checkout: the items' price times quantity. On purchase: the order total, including delivery and after any coupon | 3370 |
| ecommerce.transaction_id | The order number. Only on purchase, so each sale is counted once | PJ-MW66ABC123 |
| items[].item_id | The ID of the product, or of the option the buyer chose (a size or colour), as saved in Pagejar | var-9d2c |
| items[].item_name | The product name | Cotton Three-Piece |
| items[].item_variant | The option the buyer chose; empty when the product has none | Black / XL |
| items[].price | The price of one item | 1650 |
| items[].quantity | How many the buyer wants | 2 |
What Pagejar never puts in the data layer
If you want to match buyers inside Meta's Conversions API, Pagejar sends those details from its own server, hashed. That is separate from Tag Manager.
- The buyer's name, phone number, email or address. They are not in the data layer, so no tag in your container can read or forward them.
- Order notes, coupon codes and payment details.
Before you start: two rules that stop double counting
- With a Tag Manager container on the page, Pagejar does not load its own Google Analytics 4 tag. Add GA4 inside your container, as shown below.
- If you also add a Meta pixel or a TikTok pixel ID in Pagejar, do not add a Meta or TikTok tag for the same pixel in Tag Manager. Both would fire, and every sale would be counted twice. Pick one place for each pixel. Pagejar's own Meta setup is the one that can also send sales from the server.
Set it up, step by step
- In Tag Manager, create a Web container and copy its ID. It looks like GTM-XXXXXXX.
- In Pagejar, open Tracking Zone, press Add tracking, choose Google Tag Manager and paste the ID. Or open the landing page, go to Page settings, Tracking, and press Add tracking for this page.
- Tick the container on the landing page, then Save and Publish. A page only runs the IDs ticked for it.
- In Tag Manager, create a Google tag with your GA4 Measurement ID (it looks like G-XXXXXXXXXX). Give it the Initialization, All Pages trigger.
- Create four triggers of the type Custom Event, with the event names view_item, add_to_cart, begin_checkout and purchase.
- Create four GA4 Event tags, one for each trigger. Use the same event name as the trigger, and under More settings, Ecommerce, turn on Send Ecommerce data with the source Data Layer.
- Press Preview and open your published landing page. Follow the steps in the next section, then press Submit and Publish in Tag Manager.
Test that it works
- Tag Assistant: in Tag Manager press Preview and open your published page. You should see view_item when the page opens, add_to_cart when you tap the order button, begin_checkout when you type in the form, and purchase after you place a test order.
- Browser console: open the page, press F12 and type dataLayer. Every event above appears in the list, with the fields shown earlier.
- GA4: open Admin, DebugView, or the Realtime report, and look for the same four event names.
- Cancel your test orders in the Pagejar dashboard afterwards so they do not count as sales.
Send the sale to Google Ads
For a Google Ads conversion, make a Conversion tag in Tag Manager with the purchase trigger. Fill it from the data layer with three Data Layer Variables:
| Conversion setting | Data Layer Variable name |
|---|---|
| Conversion value | ecommerce.value |
| Currency code | ecommerce.currency |
| Transaction ID | ecommerce.transaction_id |
Different tracking for each landing page
Each landing page has its own list of tracking IDs. In Page settings, Tracking, add or tick only the IDs that page should use. So page A can run one Tag Manager container and page B another, or none. Tracking Zone shows every ID and which pages use it.
If something does not show up
- No events at all: check that the container is ticked on that page and that you published the page after ticking it.
- Events show in Tag Assistant but not in GA4: open the GA4 Event tag and check that Send Ecommerce data is on and its source is Data Layer.
- Items are empty in GA4: the tag is reading the wrong place. Use the Data Layer source, not a variable you made.
- Nothing in a share-preview link: events are switched off there on purpose. Use the live page.
- Fewer events than visitors: ad blockers and browsers that block trackers stop Tag Manager in the browser. Meta sales can still reach Meta from Pagejar's server.