Support » Plugin: GDPR Cookie Compliance » How to add scripts

  • Resolved zebrahosting


    Just tried adding the Facebook pixel code in the header field of the third party cookie field.

    Something like this:
    <!– Facebook Pixel Code –>
    s.parentNode.insertBefore(t,s)}(window, document,’script’,;);
    fbq(‘init’, ‘179040319425970’);
    fbq(‘track’, ‘PageView’);
    <noscript><img height=”1″ width=”1″ style=”display:none”
    <!– End Facebook Pixel Code –>

    But don’t get the pixel in the pages. It seems so simple but doesn’t work on any or our sites. Should I remove the script tags? Only place the pixel itself?

    Please advice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    Thanks fro your comments. The script tags should be there, and the tracking script looks good to me. You can add to the 3rd party or advanced tab head section. Our plugin loads the script with Javascript, and that’s why you can’t find it in the view-source page. You can try the developer console in Chrome (inspect element) and find the scripts.

    I hope this helps.

    Hi Gasper, thanks for the clarification. We did everything by the book but the pixels never worked. At least FB complaints and my FBpixels helper info in Chrome could not find it properly. Not when placed in head, not when placed in footer.
    We see the setting back in the console as warning:
    [Warning] {strict: “1”, thirdparty: “1”, advanced: “1”} (main.js, line 1)

    When we switch on our preferred option PixelYourSite it all works but see no way to switch it on or off by GDPR extension. (See question in other thread)
    GDPR Cookie Compliance is still our preferred plugin voor all our sites and would love to get it working properly.

    (thank you very much for making this plugin available)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add scripts’ is closed to new replies.