Facebook Pixel ReferenceError: Set undefined (<IE11)

We are trying to implement Facebook Pixel on a website and work in all browsers except Internet Explorer 11 or lower. The exact error we get is: Facebook Pixel Error: ReferenceError: Set is not defined.

We could not find any information regarding this error.

+4
source share
1 answer

I saw it too. I don’t think that IE11 and below support Set as a relatively new ES6 function, but I’m not sure why Pixel code is trying to use it in these environments.

Perhaps due to whether you download Facebook Pixel via GTM?

 function p() {
            var s = []
              , t = b.querySelectorAll('[itemscope]')
              , u = new Set();
            for (var v = t.length - 1; v >= 0; v--) {
                var w = t[v]
                  , x = w.querySelectorAll('[itemprop]')
                  , y = w.getAttribute('itemtype');

Update: After reporting this error on Facebook, it was resolved.


. , , , . , .

,

+1

Source: https://habr.com/ru/post/1678270/


All Articles