'How to install facebook event pixel in react component

I have a Facebook base code for lead tracking installed in my React app. All I want to do is to add fbq('track', 'Lead'); to my "Thankyou.jsx" component.

All examples I have seen used NextJs but I'm writing just React and Redux.

How do I add fbq('track', 'Lead'); in the react component where I want it to reside?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source