browserCode or browserName

Hi

I have been using piwik REST api to get browser details, but found a very wierd behaviour on piwik segmentation api. While checking stats for IE, the URL sometimes works with segment=browserName==IE, and sometimes works with segment=browserCode==IE. Most of the time i get errors response when i use one of them(which is very much intermittent). I am facing following two scenarios

Scenario 1:
URL:https://localhost:7110/piwik/index.php?module=API&idSite=1&period=day&date=yesterday&format=xml&method=UserSettings.getBrowser&segment=browserName==IE
Response:


this url some times works fine, and some times gives the above error resonse

Scenario 2:
URL:https://localhost:7110/piwik/index.php?module=API&idSite=1&period=day&date=yesterday&format=xml&method=UserSettings.getBrowser&segment=browserCode==IE
Response:


again, this url some times works fine, and some times gives the above error resonse.

After going through some piwik documentation , i ran the following url to see available segments in piwik but ended up with another wierd response

URL:https://localhost:7110/piwik/index.php?module=API&idSite=1&period=day&date=yesterday&format=xml&method=API.getSegmentsMetadata

Response1:

dimension
Visit
Browser
browserCode
FF, IE, CH, SF, OP, etc.

Response2:

dimension
Visit
Browser
browserName
FF, IE, CH, SF, OP, etc.

that is, it sometime gives me response1 while sometimes response 2.

Even the piwik segmentation documentation mentiones browserCode in the api table and uses browserName in the example (Segmentation: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3).

Would you please help here how to resolve this issue?

Thansk for report, this was a typo in the doc. Only browserCode should work (browserName will not work with 2.0)
http://developer.piwik.org/api-reference/segmentation

Hi

I am currently using piwik 1.12, would you please suggesst what segment name should I use to get browser stats(browserName or borwserCode). Also, since I am facing intermittent issues for internachanging segments names(browserName or borwserCode), how do i resolve it?

please upgrade to 2.0 and use browserCode