matomo-for-wordpress icon indicating copy to clipboard operation
matomo-for-wordpress copied to clipboard

Import possibility for Wordpress Stats by Jetpack

Open errotu opened this issue 5 years ago • 14 comments

First of all: Thank you very much for this project! I'm pretty confident that it will enhance the use of Matomo for many Wordpress Admins interested in protecting the privacy of their users.

There's one suggestion I have: I think it would facilitate the migration from currently used analytics tools (such as Wordpress Stats by Jetpack in my example) if an option for an automated import of the currently existing tracking data to Matomo existed.

Are there any chances to implement such a functionality?

errotu avatar Jan 19 '20 12:01 errotu

Thanks @errotu

It looks like Jetpack has some API but we'd need to see if we can get any reporting data through this and whether we get raw data from Jetpack which could make things bit easier (raw data meaning the data they recorded for each individual visit like which pages they viewed, what visitorId it was etc). Or whether aggregated data would need to be imported.

We've done the import for aggregated data recently for Google Analytics and it's a multi month project since these things are quite complex. If they provide raw data, this could make things easier.

tsteur avatar Jan 20 '20 19:01 tsteur

@errotu do you maybe know some documentation on whether they provide access to the tracked data?

tsteur avatar Jan 20 '20 19:01 tsteur

Unfortunately, I do not have any detailed information. There's one forum post from 2017 referring to this API. Maybe that's worth a shot?

errotu avatar Jan 20 '20 19:01 errotu

That's definitely helpful cheers. It looks like we could only import aggregated data nad mostly only import the number of visitors and views.

There are some other metrics like the number of comments, etc. This we could eventually import as events.

Since there is very limited data it might not be that much work to import this data.

tsteur avatar Jan 20 '20 20:01 tsteur

Considering Jetpack has 5M+ active installs and a 7% overall market share it could be quite useful https://w3techs.com/technologies/overview/traffic_analysis

The rest API in https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/ should work for this.

tsteur avatar May 28 '20 04:05 tsteur

Are there any news on this? I think it would be a great feature!

errotu avatar Sep 14 '20 08:09 errotu

@errotu we're currently working heavily on the new Matomo 4 release. We might look into it afterwards

tsteur avatar Sep 15 '20 22:09 tsteur

it's a bit tricky.

there are two ways to export data from jetpack: https://wordpress.org/support/topic/api-to-export-stats-data/#post-15170429

  • the rest api of the stats plugin https://developer.wordpress.com/docs/api/1.1/get/sites/%24site/stats/ and
  • a csv export http://stats.wordpress.com/csv.php.

Both of them requires an api_token to authenticate.

This api_token is available from:

  • the confirmation email provided when creating the wordpress account https://www.wikihow.com/Find-Your-WordPress-API-Key
  • when you buy a paid wordpress plugin (such as akismet) https://www.wikihow.com/Find-Your-WordPress-API-Key
  • when requesting the oauth service with a app which has been created in your wordpress developer account https://developer.wordpress.com/docs/oauth2/ https://developer.wordpress.com/apps/

all data collected from these two export way are aggregated. it is not possible to get daily data except the number of visits and visitors from the rest api.

mattmary avatar Dec 23 '21 02:12 mattmary

Moving it for now back into backlog. If someone is interested in this feature please comment.

tsteur avatar Dec 23 '21 02:12 tsteur

Did this feature get into Matomo?

wpgaurav avatar Nov 05 '22 17:11 wpgaurav

Hello @wpgaurav

We have stopped our investigations for now, as there are some technical questions we are not able to answer for now, and the result would be limited. Would you be interested in this feature? Kind regards

Mat

mattmary avatar Nov 06 '22 20:11 mattmary

Yes. Even if there is a complicated way to do so, I'd like to know.

wpgaurav avatar Nov 08 '22 20:11 wpgaurav