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

GA session metrics equivalent in Piwik #6721

Closed
ArkeologeN opened this issue Nov 25, 2014 · 1 comment
Closed

GA session metrics equivalent in Piwik #6721

ArkeologeN opened this issue Nov 25, 2014 · 1 comment
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@ArkeologeN
Copy link

We recently moved from GA to Piwik. Our existing application & entire model is based upon the same phenomenon and principles that works over Google Analytics.

We have a call in Google Analytics to grab information about sessions based upon dimensions. It looks likes this:

.analytics.data.ga.get({
        'ids'        : CONFIG.google.analytics.profileId,
        'start-date' : moment(flipbook.created).format(ISODateFormat),
        'end-date'   : moment(new Date()).format(ISODateFormat),
        'metrics'    : 'ga:sessions',
        'dimensions' : 'ga:date,ga:deviceCategory,ga:source,ga:socialNetwork,ga:country',
        'filters'    : 'ga:pagePath=~^/flipbook/' + flipbook.id
      })

which returns arrays of row which includes date, device, social network, country & views. However, when it comes to Piwik, we need to deal with APIs as follow:

  • UserSettings.getBrowser
  • UserCountry.getCountry
  • VisitsSummary.getVisits
  • DevicesDetection.getType

Even more, it doesn't make date as a base column of the data set. The sample data returned by Google Analytics looks like this:

[
       { date: '2014-01-10', device: 'desktop', source: '(direct)', location: 'United Kingdom', views: 5},
       { date: '2014-01-10', device: 'tablet', source: 'website.com', location: 'Norway', views: 7},
       { date: '2014-01-11', device: 'mobile', source: 'Twitter', location: 'Norway', views: 10}
    ]

How can we achieve the same output in Piwik using a single call or atleast achieve it?

@mattab
Copy link
Member

mattab commented Dec 1, 2014

Hi @ArkeologeN this is a good question. Unfortunately Piwik is still lacking a proper Custom Reports feature that would let you generate reports with any number of custom dimensions. we recently added Pivot table see in the API ref doc the parameters pivotBy and pivotByColumn but they're pretty slow. see also #6227 and #4776

Please feel free to create another issue to request this particular feature of getting a grouping over a custom set of columns.

@mattab mattab closed this as completed Dec 1, 2014
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Dec 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants