@bperel opened this Issue on January 4th 2018

When checking the responsiveness of a website using Browserstack (https://www.browserstack.com/screenshots) I noticed that Browserstack's visits were shown in Piwik. Shouldn't they could be excluded from tracking?

@Findus23 commented on January 4th 2018 Member

Do you know any way to differentiate the visits of Browserstack from other real visits? (Preferably by user agent)
I think they try to be intentionally as realistic as possible to get websites to show the exact same content as to real users.

@bperel commented on January 4th 2018

I'm not sure if there is a deterministic way to see if the visit comes from Browserstack. I exported one of the visit profiles from Piwik but I don't see anything interesting. Are there certain tables in the DB that would tell me more about this visit, for instance about the user agent like you suggest?

@Findus23 commented on January 4th 2018 Member

The easiest way to get the user agent is to visit your website with browserstack and check your webservers access log.
Or you could simply visit http://www.useragentstring.com/ which should display the user agent string.

@bperel commented on January 4th 2018

Good idea. But it looks like we're out of luck on the user-agent side: when I use IE 7 through Browserstack for example, my access logs give:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
so nothing that indicates that it's not a real browser.

I saw that there is ongoing work on BrowserStack's side to provide to way to distinguish their sessions from real users' ones : https://www.browserstack.com/question/585

A dirty way would be to ignore visits that last less than a second, but I don't know how likely it is that I get wrongly excluded visits in that case; I'm not even sure if that's possible without changing Piwik's code.

@Findus23 commented on January 4th 2018 Member

Excluding via IP also doesn't work.
I guess any hack that will exclude Browserstack will also exclude some of your visitors as it's point is to be identical to visitors. (They are running real browsers either in VMs or on real smartphones).
So you'll need to either enable do-not-track in Browserstack before visiting your website (or get them to implement an option for it) or set the opt-out cookie.

@bperel commented on January 4th 2018

Thanks. That's the best I can do I guess. Closing

This Issue was closed on January 4th 2018
Powered by GitHub Issue Mirror