How to assign event pixel face book when you click "add to cart"?

I'm not a dev, just a designer, but there was a need to add an event pixel facebook than on the page as a whole, and in particular the button "add to cart". The website in-house (наTildа), so to solve the issue just with the onclick attribute does not work. Tried as I could to write the function add:

the <script>
 $("#rec98787508 .t750__btn t-btn t-btn_sm ").click(function(){ fbq('track', 'AddToCart', { value: 999,
currency: 'RUB',
content_ids: 'coldbloodpump',
}) });
</script>


Not Robit. Probably misspelled. Could you help to write this correctly?
March 23rd 20 at 18:59
1 answer
March 23rd 20 at 19:01
You have, in principle an event is triggered in the console that says??
The event itself works, but just when primary testing page - trevor commented on March 23rd 20 at 19:04
@trevor, I meant by clicking. You have the same worth an event by clicking on the button with the class and id #rec98787508 .t750__btn t-btn t-btn_sm. When this button is pressed, something happens? - Elsie_Padberg62 commented on March 23rd 20 at 19:07

Find more questions by tags AnalystjQueryFacebookJavaScript