Question from Reddit user:
I am running a lead gen campaign to a landing page built on WP. To collect leads, people have to proceed from the landing page to a form built on Jotform.
How do you guys recommend inserting the pixel to track the customer journey? As there are 2 steps involved, built on different platforms.
The pixel has to be in the Jotform, because that is where the leads info will be collected, however, I’m not sure how to go about the WordPress landing page.PS: I cannot send people directly to the form, they need to be educated about the product first so removing the middle step is not an option unfortunately.
Thanks in advance.
Answer from Nabil:
The short answer is:
The classic method for tracking a multi-platform funnel like yours is to use cross-domain tracking with Google Tag Manager (GTM) on both your WordPress landing page and the Jotform, ensuring that the user’s session ID and tracking data persist across the domain change.
However, due to browser restrictions and the nature of the Jotform embed or redirect, the most robust and accurate solution is to leverage server-side tracking using the Facebook Conversions API combined with the Jotform API.
This allows you to track the conversion directly from the Jotform server after the lead is collected, bypassing all browser-related tracking challenges and ensuring you get a complete picture of the customer journey, including crucial user-level data for Facebook optimization.
The long answer is:
The challenge with your multi-step, multi-domain funnel is that every jump between domains (WordPress to Jotform) risks losing the attribution data needed by the Facebook Pixel, especially the fbc
and fbp
parameters, which are essential for connecting the click on your ad to the final conversion.
While you should install the standard Facebook Pixel base code on both the WordPress page and the Jotform (or use GTM on both to manage it), the most reliable method for your conversion event – the lead submission – is to move the tracking server-side.
The most excellent solution is to implement the Facebook Conversions API (CAPI).
Here’s the precise workflow:
First, on your WordPress landing page, you use GTM to capture the fbc
and fbp
parameters, along with any other identifiable user data, and store this information in a persistent layer, such as a first-party cookie or the data layer, and pass it with the user to the Jotform embed or redirect URL as hidden fields.
Second, when the user successfully submits the form on Jotform, you use the Jotform API to trigger an action.
Since the lead data is collected and verified on the Jotform server, this server is the most reliable place to fire the conversion event.
Third, the Jotform API webhook, or a script triggered by it, sends the complete conversion data – the lead details (email, phone, etc.) and the captured fbc/fbp parameters
– to your server-side tagging environment, such as Stape or Google Cloud Platform.
This server environment then uses the Facebook Conversions API to send the Lead
standard event directly to Facebook’s server.
This server-to-server connection is superior because it is immune to ad blockers, browser Intelligent Tracking Prevention (ITP), and issues related to cross-domain tracking in GTM.
Furthermore, sending the lead’s email and phone number as Customer Information Parameters (CIP) via CAPI allows Facebook to perform a highly accurate match between the server-side lead event and the original ad click, significantly improving your campaign attribution and audience building, which is necessary for effective lead generation campaigns.