Facebook Pixel code provided in example is not working

63 views
Skip to first unread message

TBRN

unread,
Jun 6, 2018, 3:56:08 PM6/6/18
to Cookie Control Support

Hi,

I followed the example in the Cookie Control Documentation for setting the Facebook Pixel cookie. I updated the XXXXXXXX with my FB code. When I test it on my site and click Accept All Cookies, I use Firefox Developer Storage to see what cookies load and I do not see one for 'fr.' Wondering what I'm doing wrong. Thanks!

onAccept : function(){
                // Add Facebook Pixel
                !function(f,b,e,v,n,t,s)
                {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
                    n.callMethod.apply(n,arguments):n.queue.push(arguments)};
                    if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
                    n.queue=[];t=b.createElement(e);t.async=!0;
                    t.src=v;s=b.getElementsByTagName(e)[0];
                    s.parentNode.insertBefore(t,s)}(window,document,'script',
                    'https://connect.facebook.net/en_US/fbevents.js');
                fbq('init', 'xxxxxxxxxxxxxxx');
                fbq('track', 'PageView');
                fbq('consent', 'grant');
                // End Facebook Pixel
            },
            onRevoke: function() {
            	fbq('consent', 'revoke');
            }

Gerasimos Tzoganis

unread,
Jun 7, 2018, 3:55:44 AM6/7/18
to Cookie Control Support
Hi there,

Could you send us the link to your website so that we can take a look?

Thanks,
Gerasimos

TBRN

unread,
Jun 8, 2018, 11:54:06 AM6/8/18
to Cookie Control Support
Hi!

Thanks I figured it out with help from Support. It turns out I did have the Facebook Pixel working correctly, but it may have been cached in the developer console.

Thanks!
Reply all
Reply to author
Forward
0 new messages