Facebook Ads Lead Tracking via EnvisionCloud?

Question from Reddit:

Hi all, I wanted to ask about the proper way to go about tracking a “Book Appointment” for a fitness trainer.

For instance, they want to run Facebook ads and have an overall website. What they want to do is have a user book and appointment for a consultation. This will ultimately lead them to a sale. They do not have an eCommerce website so no purchases will be made, just booking appointments (Lead) event.

Here is the caveat… when on the website and clicking the Book Appointment button, it goes to a landing page that has a different URL which looks to be some sort of online booking service called envicioncloud.

So my question is, how would I track “Booked Appointment” leads from that URL since it gets redirected upon clicking the button on the actual website?

I hope this all makes sense, and if not below is a journey mockup

  • User sees ad and clicks “Learn more” button
  • User land on website, reads content and clicks “Book Appointment” button
  • User gets redirected to a different URL to schedule and book appointment
  • User books appointment and the lead is captured in Facebook events tracking etc

All help appreciated.

Answer from Nabil:

The short answer is:

How do I set up Facebook Ads lead tracking when using EnvisionCloud?

The correct and most reliable way to track your desired Book Appointment as a Lead event across your main website and the third-party booking service, EnvisionCloud, is to implement cross-domain tracking using Google Tag Manager (GTM) on the front-end, and then to use a server-side integration via the Facebook Conversions API.

Since the final conversion happens on a domain you don’t control, the best solution is to wait for the conversion to be confirmed by EnvisionCloud and then send that confirmed lead data directly from your server to Facebook using the Conversions API, guaranteeing that the attribution is accurate and the event isn’t lost due to browser restrictions.

The long answer is:

Your scenario is a classic challenge in digital marketing known as cross-domain tracking, where the user journey starts on your owned domain and then completes the conversion on a third-party domain that you cannot directly place your tracking code on.

The first step to improve client-side tracking is to ensure your GTM setup has cross-domain linking enabled, often referred to as a linker parameter, which attempts to pass session information between your main site and envisioncloud.com.

This helps GA4, and potentially Facebook, connect the two sessions.

However, relying on this is fragile because the third-party domain may block the parameter, or the booking service might be housed within an iframe, which breaks cross-domain tracking.

The superior, long-term solution is to implement a server-side tracking architecture using the Facebook Conversions API combined with the EnvisionCloud API and a server-side container hosted on a platform like Stape or Google Cloud Platform.

Here’s how this solves the problem: When a user clicks the “Book Appointment” button, you use GTM to capture key user data, such as a browser ID and an identifying click ID, and store it in a cookie.

You also send a low-fidelity event like a button_click to Facebook.

The final, definitive Lead event is the actual booked appointment.

Since you cannot place the Facebook Pixel on the final EnvisionCloud thank you page, you must rely on server-to-server communication.

You would need to access the EnvisionCloud API to be notified whenever a new appointment is confirmed for your client.

This is the single source of truth for the conversion.

The moment EnvisionCloud confirms the booking, your server-side environment fetches that confirmed lead data, extracts a piece of identifying information (like the client’s hashed email or phone number), and combines it with the browser ID you stored earlier.

Finally, your server environment uses the Facebook Conversions API to send the high-quality, server-validated Lead event directly to Facebook.

This is an excellent solution because it is not affected by browser redirects, ad-blockers, or third-party cookie restrictions, ensuring that the final, most valuable conversion event is never missed, and Facebook receives the strong customer matching data needed for accurate attribution and ad optimization.

About The Author