Meta CAPI installation

How to install Meta CAPI on the right page

Installing Meta CAPI does not mean pasting the same script everywhere. The safest setup connects one event to the exact page and form where that conversion happens.

Updated July 2026 7 min read Practical setup guide
Quick answer

What to do

Create the server event first, copy the generated installation script, place it in the custom code area for the exact landing page or form, publish the page, and complete a real conversion. For GoHighLevel, use the page or funnel custom code area and a unique selector for the intended form when the setup requires one.

Install the script where the conversion happens

A Lead event belongs on the page containing the intended lead form. A Schedule event belongs in the booking flow or success step that confirms the appointment.

Avoid adding one unrestricted event script to every page. That can attach listeners to the wrong forms and make it difficult to prove which page created the conversion.

  • Lead script: exact lead form page
  • Schedule script: completed booking flow
  • Purchase script: successful checkout confirmation
  • Do not reuse one event script across unrelated pages

Install Meta CAPI on a GoHighLevel page

Open the intended funnel or website page in GoHighLevel and use the page's custom code or tracking-code area. Paste the script once and save the page.

When the script targets a form, use a unique form selector rather than a broad selector that could match several forms. Publish the page before testing the live version.

  • Open the exact GHL page
  • Paste the script in the recommended custom code area
  • Confirm the unique form selector
  • Save and publish
  • Test the public URL, not only the editor preview

What to check after installation

Open the browser console for obvious script errors, then complete the real conversion while Meta Test Events is open. Confirm the event appears once and comes from the expected source page.

If no event appears, check whether the script loaded, whether the form selector matches, whether the request reached the server, and whether the server used the correct dataset.

  • Script loads on the published page
  • Correct form or booking action triggers it
  • One event appears in Meta
  • Event source URL matches the intended page
  • Pixel and server events deduplicate when both are used
Before you publish

Meta CAPI installation check

01Use one exact page

02Use one exact conversion

03Confirm the intended form selector

04Publish the page

05Run a real conversion test

06Check the event in Meta Events Manager

Frequently asked questions

Common questions about this setup

How to install Meta CAPI?+

Create the protected server event, paste the provided installation script on the exact conversion page, publish it, and test a real conversion in Meta Events Manager.

Where do I paste Meta CAPI code in GoHighLevel?+

Use the custom code or tracking-code area for the exact website or funnel page. Follow the placement instructions provided with the generated script.

Can I use the same Meta CAPI script on several forms?+

A restricted event script should be tied to one intended page and form. Create a separate setup for a different conversion location.

Why does the script work in preview but not on the live page?+

The published page may have different code, caching, form markup, or domain behavior. Always test the final public URL.

Official references

Use these official references when checking the current Meta setup and account screens.

Keep learning

Related conversion tracking guides

Simple CAPI workspace

Turn the answer into a working Meta conversion.

Choose Lead or Schedule, paste one protected script on the intended page, and verify the real conversion.

Create your script