简体   繁体   中英

Quora pixel issue when refreshing

I'm actually facing a weird error on Angular with quora pixel. I've included the script in HTML code like this:

! function(q, e, v, n, t, s) {
    if (q.qp) return;
    n = q.qp = function() {
        n.qp ? n.qp.apply(n, arguments) : n.queue.push(arguments);
    };
    n.queue = [];
    t = document.createElement(e);
    t.async = !0;
    t.src = v;
    s = document.getElementsByTagName(e)[0];
    s.parentNode.insertBefore(t, s);
}(window, 'script', 'https://a.quora.com/qevents.js');
qp('init', 'API_KEY');
qp('track', 'ViewContent');

And when I refresh my page, I get this error: Refresh issue

Behind that, I found that window.qp value changed when the error appears:

Normal behavior: 在此处输入图片说明

Buggy behavior: 在此处输入图片说明

So as you can see, the error appears only when window.qp is equal to 1. How can this value be equal to 1 ?

Thanks in advance.

I face the same issue! I don't know exactly where the issue comes from but when I hit "Ctrl + Maj + R" or "Open in a new tab", the quora pixel fails 1/2 and throws this error!

I also have a window.qp = "1".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM