Yesterday I created a plugin to track the user actions on the client-side and send them to a Facebook Pixel. I hope it will be helpful. If you like the plugin, don't mind giving it a star on GitHub.
How The Facebook Pixel Works
When someone visits your website and takes an action (for example, buying something), the Facebook pixel is triggered and reports this action. This way, you'll know when a customer took an action after seeing your Facebook ad. You'll also be able to reach this customer again by using a Custom Audience. When more and more conversions happen on your website, Facebook gets better at delivering your ads to people who are more likely to take certain actions. This is called conversion optimisation.
npm install nodebb-plugin-facebook-pixel