Q: How to add Meta Events like fbq('track', 'CompleteRegistration');

I couldn´t find the way to add tracking codes like fbq('track', 'CompleteRegistration') to tell Meta I generated a lead. It would be great idea to implement tracking code in the lead form or make Head Scripts section independent for every TAB.

JorgeHPLUSFeb 24, 2025
Founder Team
subpageco

subpageco

Feb 25, 2025

A: Hello,

You can try to add t he following script on the page custom scripts:

document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("click", function (event) {
if (event.target.type === "submit") {
fbq('track', 'CompleteRegistration');
}
});
});

Enter on a specific page and click on "Page Scripts & CSS" in the sidebar.

Thanks!

Share
Helpful?
Log in to join the conversation
JorgeHJorgeHPLUS
Posted: Feb 25, 2025

Thanks a lot for the fast response.

I am going to give it a try.

Cheers. Regards.