Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Facebook Pixel code on specific button click events

Having trouble with Pixel code. I have button click event which fetches data on ajax calls. The problem is that facebook button click event SubscribedButtonClick is also triggered which interferes with the ajax call failing any response from the server.

I have looked into their API but did not get anything helpful. Is there any setting or code which can help to bypass this button click event or disable the SubscribedButtonClick call on specific button clicks?

like image 725
Chittaranjan Avatar asked Feb 19 '18 02:02

Chittaranjan


People also ask

Should I turn on track events automatically without code?

Note: Please do not switch on the option to Track Events Automatically Without Code. The code has already been set up on your website to a much higher degree of accuracy by us. Switching this option on could interfere with the Create setup and corrupt your tracking.


1 Answers

It is possible to disable automatic SubscribedButtonClick and MicroData tracking events:

fbq('set', 'autoConfig', false, 'FB_PIXEL_ID')
like image 109
AlexB Avatar answered Oct 07 '22 08:10

AlexB