Skip to main content

Test scenarios (cross-team QA)

Run these in staging with GTM Preview Mode active, before going live.

0. Prepโ€‹

  • GTM snippet present in <head> + <body> on staging.
  • CNAMEs load.analytics and analytics active and SSL OK.
  • Tag Assistant + Meta Pixel Helper installed.

๐Ÿ”ด Phase 1 โ€” Core funnel (mandatory)โ€‹

S1. Product list (PLP)โ€‹

Action: visit a category page or search results.

Verify:

  • view_item_list with item_list_id, items with index.

S2. Click product in PLPโ€‹

Action: click a product card.

Verify:

  • select_item pushed before navigation, only the clicked item, index matches PLP.

S3. Product detail pageโ€‹

Action: visit a PDP.

Verify:

  • view_item in dataLayer with currency, value, items[0] with required fields.
  • Meta Pixel Helper: ViewContent with content_ids, content_type: 'product', value, currency.
  • Events Manager โ†’ Test Events: ViewContent arrives via Pixel AND CAPI, deduped.

S4. Add to cartโ€‹

Action: click "Add to cart" with qty=2.

Verify:

  • add_to_cart pushed after API response (not before).
  • quantity: 2, value = price ร— 2.
  • Meta: AddToCart Pixel + CAPI deduped.

S5. Cart pageโ€‹

Action: visit /cart.

Verify:

  • view_cart once, value consistent with UI.

S6. Increase quantity in cartโ€‹

Action: bump quantity from 2 to 3.

Verify:

  • add_to_cart with quantity: 1 (delta), not quantity: 3.

S7. Remove from cartโ€‹

Action: remove an item.

Verify:

  • remove_from_cart with delta quantity and removed value.

S8. Start checkoutโ€‹

Action: click "Checkout" from the cart.

Verify:

  • begin_checkout pushed.
  • coupon present if applied.
  • Meta: InitiateCheckout Pixel + CAPI.

S9. Shipping submittedโ€‹

Action: fill + validate shipping.

Verify:

  • add_shipping_info with shipping_tier and populated user_data.

S10. Payment submittedโ€‹

Action: enter CC details and validate.

Verify:

  • add_payment_info with payment_type. Meta AddPaymentInfo Pixel + CAPI.

S11. Order confirmed โญโ€‹

Action: complete an order, arrive on /order/success.

Verify (the most critical):

  • purchase in dataLayer with:
    • Unique transaction_id matching DB
    • currency, value, tax, shipping
    • All items, with item_id matching catalog
    • Complete user_data (email, phone, name, address)
  • Refresh the page โ†’ NO new purchase push (idempotency)
  • Meta Events Manager: Purchase Pixel + CAPI deduped, EMQ โ‰ฅ 8
  • GA4 DebugView: purchase received with correct value
  • Google Ads: conversion fires (Ads โ†’ Conversions โ†’ Diagnostics)

S12. Purchase idempotencyโ€‹

Action: refresh, F5, back button, open in new tab.

Verify:

  • No new purchase push.
  • No double-count in Meta / GA4.

๐ŸŸก Phase 2 โ€” Acquisitionโ€‹

S13. Sign upโ€‹

  • sign_up pushed after DB confirmation. Meta CompleteRegistration.

S14. Lead form / newsletterโ€‹

  • generate_lead with user_data.email. Meta Lead.
  • search with search_term. If results page: view_item_list with item_list_id: 'search_results'.

๐ŸŸฃ Phase 3 โ€” Optionalโ€‹

S16. Refundโ€‹

  • refund with transaction_id matching the original purchase. GA4 shows negative revenue.

S17. Promo bannerโ€‹

  • view_promotion once per visible banner (fired via Intersection Observer at โ‰ฅ 50% visible).
  • select_promotion on click.

Go Live criteriaโ€‹

  • All Phase 1 scenarios pass.
  • Meta EMQ for Purchase โ‰ฅ 8/10 (over 10+ test orders).
  • Pixel/CAPI dedup at 100% across all events.
  • GA4 DebugView receives every event.
  • Google Ads conversions fire correctly.
  • No duplicate events in dataLayer.
  • CSP allows Stape subdomains.
  • CMP / Consent Mode validated.