:S Error when calling w/ API UserSetting Browser & Segmentation


#1

For my sites using PIWIK it occured to me that calling the user settings with segmentation is kinda … wrong.

I call

index.php?module=API&method=UserSettings.getBrowser&idSite=6
&period=month&date=2011-12-31&format=xml&token_auth=[snipped]

and receive XML code as seen in [attachment 462 attachment_1.pdf]. Just to throw in a few values:
[ul]
[li] IE 8 - 610 visits
[/li][li] IE 9 - 474 visits
[/li][li] IE 7 - 99 visits
[/li][/ul]

but when I do new segment this API-call by browserName

index.php?module=API&method=UserSettings.getBrowser&[b]segment=browserName==IE[/b]&idSite=6
&period=month&date=2011-12-31&format=xml&token_auth=

I do receive:
[ul]
[li] IE 8 - 381 visits
[/li][li] IE 9 - 299 visits
[/li][li] IE 7 - 62 visits
[/li][/ul]

as in [attachment 463 attachment_2.pdf].
Why is there a difference between these values? This error occurs to all other 3 of my sites using PIWIK.


(Matthieu Aubry) #2

It seems to work fine in the demo:

Without segment: http://demo.piwik.org/index.php?module=API&method=UserSettings.getBrowser&format=XML&idSite=7&period=day&date=yesterday&token_auth=anonymous&expanded=1&filter_limit=100

with segment: http://demo.piwik.org/index.php?module=API&method=UserSettings.getBrowser&format=XML&idSite=7&period=day&date=yesterday&token_auth=anonymous&expanded=1&filter_limit=100&segment=browserName==IE

Maybe try to update to 1.7 beta in case a similar bug is already fixed? 301 Moved Permanently