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

Include semantics in API result and metadata output #2611

Open
gka opened this issue Aug 4, 2011 · 1 comment
Open

Include semantics in API result and metadata output #2611

gka opened this issue Aug 4, 2011 · 1 comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@gka
Copy link
Contributor

gka commented Aug 4, 2011

I'm currently working on some kind of mini desktop client for Piwik (focus on visualization) and playing a lot with the API. When calling Referers.getRefererType I get something like this (I cut out some metrics. The final point here is, that there is no semantics for the rows in the result:

<result>
    <row>
        <label>Webseiten</label>
        <nb_visits>66</nb_visits>
    </row>
    <row>
        <label>Direkte Zugriffe</label>
        <nb_visits>44</nb_visits>
    </row>
    <row>
        <label>Suchmaschinen</label>
        <nb_visits>19</nb_visits>
    </row>
</result>

There's just the localized labels. Since I want to combine some of the metrics to get a bigger picture, it is necessary for the client to understand the meaning of the values. By now this only could be done by providing the client with a list of all translated versions of the terms "Websites", "Search Engines" and so on.

Wouldn't a more semantic API make more sense? Adding some kind of unique identifier along with the localized name would be a great improvement.

<result>
    <row>
        <id>websites</id>
        <label>Webseiten</label>
        <nb_visits>66</nb_visits>
    </row>
    <row>
        <id>directaccess</id>
        <label>Direkte Zugriffe</label>
        <nb_visits>44</nb_visits>
    </row>
    <row>
        <id>searchengines</id>
        <label>Suchmaschinen</label>
        <nb_visits>19</nb_visits>
    </row>
</result>
@mattab
Copy link
Member

mattab commented Aug 21, 2011

Good point, we should have some kind of standard ID for each row.

There is the same issue in the metadata output.

Thanks for the suggestion

@gka gka added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

2 participants