Introduction
In forex, precise customer journey tracking is critical for marketing, compliance, and revenue. Yet multi-domain setups, redirects, and fragmented systems often make full attribution impossible.
For this Cyprus-based forex platform, we implemented robust end-to-end tracking to monitor every user action—from initial site entry to completed transactions. This setup ensures each event is precisely linked to its original acquisition source, removing uncertainty about user origin.
The result: A unified, cross-platform GA4 setup that bridges session gaps, links deposits to campaigns, and delivers product-level revenue insights.
Background
The client’s onboarding process was a technical challenge right from the start. The website triggered an API request to the client’s CRM upon registration. The CRM would then create a dynamic login URL—embedding the trader’s unique ID directly in the path—and send it back via API. After that, the site redirected the user to this login URL, effectively transferring them into the CRM environment, which functioned as a separate platform.
- From a tracking perspective, this setup is a minefield. The GA4 conversion linker? Out of the question. Its URL decoration doesn’t work when the link is dynamically generated like this, with the user’s identifier in the path.
- The problem was twofold. First, GA4 treated the CRM redirect as the end of a session, effectively splitting the same trader into two separate “users”—one before login and another after—making it impossible to connect their activity into a single journey.
- Second, the multi-domain setup between the marketing site and CRM compounded the issue, further breaking attribution. Redirect chains routinely strip UTM parameters, wiping out Google Ads and Facebook campaign tags. The result was a sharp rise in “Direct” and “Unassigned” traffic in GA4’s acquisition reports.
- To make matters worse, the attribution gaps meant server-side reporting and GA4 never lined up. And because forex doesn’t use product SKUs, traditional monetisation tracking methods were ineffective.
Project Goals
We set out to do more than just repair tracking—we developed a robust, scalable measurement framework designed to stay reliable and flexible as analytics keep changing, so there’s no need for constant, disruptive overhauls. We aimed to design a scalable GA4 framework that:
- Works across web and mobile with one event schema.
- Tracks forex-specific actions: account creation, KYC, deposits, withdrawals, trades, subscription upgrades.
- Enriches events with custom parameters.
- Preserves attribution without URL decoration.
- Tracks monetisation by page URL, not SKU.
- Standardises dataLayers across platforms.
- Uses server-side tagging to protect data integrity.
Implementation Steps
Full Audit & CRM Workflow Analysis
We tracked the entire customer journey end-to-end—from the initial ad click through to when the deposit appeared in the CRM. At each step, we collected GA4 acquisition and monetisation data, backed up with screenshots for accuracy. The aim was clear: pinpoint exactly where the tracking was breaking down. One issue stood out: the redirect between the marketing site and the CRM was ending sessions prematurely. To make matters worse, that same redirect was stripping out valuable tracking parameters, leaving big gaps in attribution.
Client & Session ID Persistence Solution
Since URL decoration wasn’t possible here, we implemented a technical workaround to reach the same result. We built a custom process to capture GA4’s client_id and session_id, store them as cookies on the primary domain, and then read them once the user entered the CRM environment. We pushed these IDs back into GA4 to keep the same identifiers in play across both domains. The result? The session remained active throughout the user flow—from initial visit and registration, through KYC and login, and into all subsequent authenticated actions. Once initiated, the session persisted end-to-end.
Forex-Specific E-Commerce Event Mapping
We restructured GA4’s e-commerce events to reflect the actual business model:
- sign_up → For account creation and KYC completion
- purchase → For deposits, currency trades, and subscription upgrades
- refund → For withdrawals
- view_item → For visits to trading product pages
By attaching parameters such as transaction_id, value, currency, and item_id— extracted from the page URL—the client can directly attribute deposits and trades to the specific landing pages that initiated them. This enables accurate tracking of which pages are generating activity.
Attribution Retention Across Redirects
We worked alongside the CRM developers to reconfigure how redirects handled UTM parameters so they could survive the jump from the ad click to the CRM login. In cases where parameters still dropped, we used GTM and server-side scripts to capture and store them before the redirect stripped them away.
Server-Side Tagging & dataLayer Standardisation
We moved all critical event tracking into a server-side GTM container, which helped bypass ad blockers and reduce data loss from browser restrictions. Simultaneously, we standardised the dataLayer across web and mobile, ensuring that event names and parameters are consistent on both platforms.
Product Tracking via Page URL
Because forex products don’t have SKUs, we set item_id and item_name in GA4 to match the product page URL. This simple adjustment unlocked detailed insight into which landing pages drove funded accounts and deposits—data the client had never been able to see before. 
Results and Benefits
The transformation was both immediate and quantifiable:
- Attribution accuracy has notably increased, particularly for what used to be ambiguous “Direct” and “Unassigned” traffic. Now, revenue tracking functions at the product URL level, so deposits are directly connected to the exact landing pages or campaigns that generated them
- All datasets are fully aligned, indicating cross-platform performance comparisons are now accurate and reliable.
- Marketing teams have complete transparency into campaign ROI.
- The tracking architecture is built for scalability, supporting future feature expansion and adapting to regulatory changes with minimal need for re-engineering.
Conclusion
This wasn’t just another GA4 implementation—it was a complete overhaul of how forex clients should approach analytics. By addressing a challenge widely regarded in the industry as unsolvable, we gave the client a distinct advantage—boosting marketing efficiency and operational intelligence.
The major difference here is custom session stitching, forex-oriented event mapping leveraging GA4 e-commerce events, server-side tracking, plus revenue attribution drilled down to the page URL. These features aren’t just enhancements—they set a new industry standard. Attribution in this sector? Usually a nightmare. But with this approach, it’s not just doable, it’s repeatable—as long as you’ve got the technical know-how.





