Blocked script and “Uncaught ReferenceError: fbq is not defined”
-
Hello,
I developed Smart Cookie Kit, a plugin that helps sites admins to block cookies (for the GDPR) and to unlock them if the visitor accept the policies.When Smart Cookie Kit (but also other plugins that really make a server-side block) blocks the FB external script, the error “fbq is not defined” is raised up by the following JavaScript.
As the base code of the pixel is splitted in separated script tags (script load, pixel init, pageview track), could you modify the code for the “fbq” tasks testing if the object is defined?
I think that something similar could be sufficient
if ( fbq ) { ... }
or
if ( ! fbq ) return; ...
Hope to get a feedback from you.
Regards, Nicola.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Blocked script and “Uncaught ReferenceError: fbq is not defined”’ is closed to new replies.