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.jsdocs/egyptian-payment-tracking-guide.mddocs/implementation-guide-woocommerce.mdgtm/gtm-egypt-payments-container.jsonLICENSEREADME.mdscripts/dataLayer_payment_listener.jssrc/reconcile_payments.pysrc/validate_datalayer.pytemplates/fawry-instapay-gtm-container.jsontests/test_reconciler.pytests/test_reconciliation.py
How to evaluate and use it
- Read the README first and confirm that the documented problem matches your use case.
- Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
- Follow the repository’s Quick Start and check prerequisites before running commands.
- 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.