Docs

Google Tag Manager on a Pagejar landing page: what is sent and how to use it.

Add your Tag Manager container to a landing page and Pagejar pushes four shopping events into the data layer: view_item, add_to_cart, begin_checkout and purchase. This guide shows exactly what each one carries and how to turn them into reports.

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.

EventWhen it firesWhat it means
view_itemOnce, when the page opensSomeone is looking at your product.
add_to_cartWhen the buyer taps an order button on a one-product page, or adds an item on a page with a cartSomeone wants this product.
begin_checkoutOnce per visit, when the buyer starts filling in the order formSomeone is ordering.
purchaseWhen a cash on delivery order is placed, or when an online payment is confirmedA 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
      }
    ]
  }
});
FieldWhat it holdsExample
ecommerce.currencyAlways BDTBDT
ecommerce.valueOn view_item, add_to_cart and begin_checkout: the items' price times quantity. On purchase: the order total, including delivery and after any coupon3370
ecommerce.transaction_idThe order number. Only on purchase, so each sale is counted oncePJ-MW66ABC123
items[].item_idThe ID of the product, or of the option the buyer chose (a size or colour), as saved in Pagejarvar-9d2c
items[].item_nameThe product nameCotton Three-Piece
items[].item_variantThe option the buyer chose; empty when the product has noneBlack / XL
items[].priceThe price of one item1650
items[].quantityHow many the buyer wants2

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

  1. In Tag Manager, create a Web container and copy its ID. It looks like GTM-XXXXXXX.
  2. 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.
  3. Tick the container on the landing page, then Save and Publish. A page only runs the IDs ticked for it.
  4. In Tag Manager, create a Google tag with your GA4 Measurement ID (it looks like G-XXXXXXXXXX). Give it the Initialization, All Pages trigger.
  5. Create four triggers of the type Custom Event, with the event names view_item, add_to_cart, begin_checkout and purchase.
  6. 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.
  7. 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 settingData Layer Variable name
Conversion valueecommerce.value
Currency codeecommerce.currency
Transaction IDecommerce.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.

Setting up the Meta pixel (in Bangla) →

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.

Questions

Questions about Tag Manager and Pagejar

Do I need Tag Manager to track sales?

No. You can add a Meta pixel, a TikTok pixel or a Google Analytics 4 ID directly in Pagejar. Tag Manager is for people who want to run several tags and change them without touching the page.

Can I use Tag Manager and a GA4 ID together?

When a page has a Tag Manager container, Pagejar does not load its own GA4 tag. Add GA4 inside your container instead.

When does the purchase event fire for online payments?

When the payment is confirmed and the buyer comes back to your page. A buyer who pays and closes the tab never reaches the page, so that sale is missing in the browser. For Meta, Pagejar also sends the sale from its server, so Meta still gets it.

Does the same sale ever count twice?

Inside Tag Manager, no. Each purchase has one order number, the transaction_id, and the event fires once for it. With Meta, the browser event and the server event carry the same order number, so Meta counts them once.

Can I add my own events?

Pagejar sends the four events above. To track something else, such as a click on a call button, use a Click trigger in Tag Manager on the page's own elements.

Which currency is used?

Always BDT, in whole taka.

Track every order from the first page.

Add your IDs once, choose which ones each landing page uses, and check them with the steps above.