Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop _isMatchingDomain reference errors coming from Facebook referrer URLs?

This morning I got loads of javascript errors:

ReferenceError: _isMatchingDomain is not defined at parseCookie                  at HTMLDocument.set [as cookie]  

Variable _isMatchingDomain is not on our website and is coming only from certain browsers:

Mozilla/5.0 (X11; Linux x86_64)

AppleWebKit/537.36 (KHTML, like Gecko)

Chrome/61.0.3163.100

Safari/537.36

Additional information from comments below:

The IPs triggering the error seem to be owned by Facebook. Possibly a Facebook crawler? (Chris Morbitzer)

The referrer URLs are all from Facebook (Rob Wierzbowski)

Does anyone know the source of this error, if it affects users, and how to fix?

like image 342
Vikram Avatar asked Sep 13 '18 12:09

Vikram


People also ask

Why do we need to change the referrer on Facebook?

To check whether a clicked link is spammy/malicious. If yes, then warn the user of the malicious website ahead. To rewrite referrer in order to hide personally identifiable information and thus protect users’ privacy. To preserve Facebook referrer data esp. when a user navigates from an HTTPS to a Non-HTTPS website.

How does Facebook Hide Your referrer data?

Google and Twitter follow the same tactic. They create and send their own referrer data instead of the original referrer data. Now since Facebook does not send the original referrer data, they can rewrite the referrer data, whatever way they want and can hide any information they like.

What is m Facebook com / referral in Google Analytics?

lm.facebook.com is a link shim referrer for mobile devices. c) What is m.facebook.com / referral in Google Analytics? This referral shows traffic that has come from mobile devices. The regular one “facebook.com” indicates traffic from desktop devices. m.facebook.com just shows Facebook traffic from mobile devices. 2.

Is Facebook referral traffic directed to the link Shim page?

Only the traffic from l.facebook.com or lm.facebook is directed through the link shim page. All the traffic from facebook.com or m.facebook is not directed through the link shim page. The only thing we can safely conclude, at this point, is that Facebook is not consistent with the naming of its referral data.


2 Answers

We're getting the same thing too. All of the request IPs come from Facebook-owned addresses so we think they are the crawlers executing some script. It's irritating to say the least.

Edit: I'm wondering if this has something to do with also using Piwik/Matomo? Here's our full stacktrace in one example:

:1:32551:43parseCookie :1:32551HTMLDocument.set [as cookie] https:///piwik.js:42:141c0 https:///piwik.js:48:240bo https:///piwik.js:65:146Q.setCookieDomain https:///piwik.js:23:60ac https:///piwik.js:70:900c https:///piwik.js:71:348aa https:///piwik.js:72:279Object.addTracker https:///piwik.js:75:386 
like image 139
Chris Morbitzer Avatar answered Sep 20 '22 08:09

Chris Morbitzer


I think it is not related specifically to Piwik/Matomo, more like to general cookie setting/accessing. We are also using Piwik, but ReferenceError · _isMatchingDomain is not defined gets thrown here:

:1:32396:43parseCookie   :1:32396HTMLDocument.set [as cookie]     https://trk.opentrack.org/v2:1:1253Function.b.dc     https://trk.opentrack.org/v2:1:1979Function.b.pu     https://trk.opentrack.org/v2e:1:121  https://trk.opentrack.org/v2e:1:326 
like image 21
Achim Avatar answered Sep 21 '22 08:09

Achim