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

Provide API to get browser/OS maps used in Piwik #1058

Open
anonymous-matomo-user opened this issue Dec 9, 2009 · 6 comments
Open

Provide API to get browser/OS maps used in Piwik #1058

anonymous-matomo-user opened this issue Dec 9, 2009 · 6 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@anonymous-matomo-user
Copy link

Currently in the database logs, browsers, operating systems, or countries are defined as static array :

static protected $browsers = array(
'opera' => 'OP',
'msie' => 'IE',
'microsoft internet explorer' => 'IE',
'internet explorer' => 'IE',
...

So I's currently impossible to format data with the label values accessing only database. (I must maintain a mapping list manually).

Proposal: provide API to publish this data. What data should it return appart from the Browsers and OS maps? Where should this API be?

@robocoder
Copy link
Contributor

For performance, no, we have no plans to read from such tables, but I don't see why we couldn't maintain such tables or at least, make it export-ready via API.

@mattab
Copy link
Member

mattab commented Dec 9, 2009

Export ready via API sounds like a plan, not having these mapping in the DB (redundant data that we want to keep in files)

@mattab
Copy link
Member

mattab commented Dec 9, 2009

Of course, ideally the API would be used for everything, now that the Live! plugin (#44) has an extensive API to return the data from the piwik_log_* tables.

@anonymous-matomo-user
Copy link
Author

Ok thanks for your reply.

@robocoder
Copy link
Contributor

For the purpose of discussion, I'm going to refer to this static data as System Tables.

We could add an API method for each system table in the closest/corresponding plugin, e.g., PluginName.getSystemTableName($parameters_if_any) for:

  • SitesManager: Currencies
  • UserCountry: Countries, Continents
  • LanguagesManager: Languages, LanguageToCountry
  • Referers: SearchEngines
  • UserSettings: Browsers, OperatingSystems, Plugins, Screens

Example: SitesManager.getCurrenciesSystemTable()

We could also have API.getSystemTableMetaData().

@mattab
Copy link
Member

mattab commented Mar 22, 2011

System Tables are not required for any use of the API, since the API gives friendly name in output.

System tables are only used for low level SQL requests. I think API.getSystemTableMetaData() is less code & better to have all in 1 place, since one typically needs all system tables or none. Maybe named getSystemTables() ?

@anonymous-matomo-user anonymous-matomo-user added this to the Future releases milestone Jul 8, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 23, 2015
@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

3 participants