Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

browserCode or browserName (1 reply)

$
0
0
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:
<result>
<error message="Segment 'browserName' is not a supported segment."/>
</result>

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:
<result>
<error message="Segment 'browserCode' is not a supported segment."/>
</result>

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:
<row>
<type>dimension</type>
<category>Visit</category>
<name>Browser</name>
<segment>browserCode</segment>
<acceptedValues>FF, IE, CH, SF, OP, etc.</acceptedValues>
</row>

Response2:
<row>
<type>dimension</type>
<category>Visit</category>
<name>Browser</name>
<segment>browserName</segment>
<acceptedValues>FF, IE, CH, SF, OP, etc.</acceptedValues>
</row>


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 (http://developer.piwik.org/api-reference/segmentation).


Would you please help here how to resolve this issue?

Viewing all articles
Browse latest Browse all 4243

Trending Articles