Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Browserstack visits #12402

Closed
bperel opened this issue Jan 4, 2018 · 6 comments
Closed

Ignore Browserstack visits #12402

bperel opened this issue Jan 4, 2018 · 6 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@bperel
Copy link

bperel commented Jan 4, 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
Copy link
Member

Findus23 commented Jan 4, 2018

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
Copy link
Author

bperel commented Jan 4, 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
Copy link
Member

Findus23 commented Jan 4, 2018

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
Copy link
Author

bperel commented Jan 4, 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
Copy link
Member

Findus23 commented Jan 4, 2018

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
Copy link
Author

bperel commented Jan 4, 2018

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

@bperel bperel closed this as completed Jan 4, 2018
@Findus23 Findus23 added the answered For when a question was asked and we referred to forum or answered it. label Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants