MAHMOUD ABDELNABY
Reporting · TEMPLATE FRAMEWORK · 1

Egyptian Payment Gateway (Fawry/Instapay) Tracking GTM Kit

Track Fawry, Instapay, and Vodafone Cash transactions accurately in GA4 and Meta CAPI without broken checkout attribution.

Problem it addresses

Create a specialized tracking toolkit for Egyptian payment gateways (Fawry, Instapay, Paymob, Vodafone Cash): 1) Data Layer specification distinguishing 'payment_initiated' vs 'payment_confirmed', 2) Ready-to-import GTM container JSON with custom variables and triggers, 3) Python reconciliation script (reconcile_payments.py) matching bank transaction logs to order numbers, 4) Implementation guide for WooCommerce and custom checkouts.

Who it is for

BOTH operating in high-growth e-commerce, digital publishing, and direct-response marketing across Saudi Arabia, UAE, and Egypt.

What is inside

Key files listed in the README repository architecture:

  • data-layer/dataLayer-spec-fawry-instapay.js
  • docs/egyptian-payment-tracking-guide.md
  • docs/implementation-guide-woocommerce.md
  • gtm/gtm-egypt-payments-container.json
  • LICENSE
  • README.md
  • scripts/dataLayer_payment_listener.js
  • src/reconcile_payments.py
  • src/validate_datalayer.py
  • templates/fawry-instapay-gtm-container.json
  • tests/test_reconciler.py
  • tests/test_reconciliation.py

How to evaluate and use it

  1. Read the README first and confirm that the documented problem matches your use case.
  2. Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
  3. Follow the repository’s Quick Start and check prerequisites before running commands.
  4. Compare outputs with documented examples and review limitations before using them in a decision or client workflow.

Quick Start from the README: python -m unittest discover -s tests · python src/reconcile_payments.py --help

Scope and limitations

  • Asynchronous Payment Handshake: Cash-at-kiosk (Fawry) and Instapay transfers do not finalize immediately; requires server-side webhook listener to confirm purchase events.
  • Iframe Checkout Sandboxing: Hosted payment redirect pages require postMessage listener bridges to trigger GTM dataLayer events on parent merchant window.
  • EGP Currency & Decimal Precision: Ensures Fawry fee surcharges and decimal places are calculated accurately in e-commerce purchase payloads.

This page summarizes the available documentation; it does not establish performance or business results. Verify data and prerequisites before use.

Related repositories