Visit injection

Hi

We yet have big databases from which we can extract some web analytics data, and we’re thinking about injecting them inside a piwik database.

I took a look at the code[/url] of [url=http://dev.piwik.org/trac/ticket/1374]Visitor Generator plugin that inject visits in a sense (but only with random data). It’s an interesting base, but maybe not the right way to inject specified visits.

At last, the “Log replay” section of the Ticket 134 (definitely containing eagerly awaited features) let suppose that API will be updated to propose “stats recording”.

Does some people already dealed with such an “injection” feature ?
Can you tell me your opinion of the right way to do ?

You can use the Tracking API: Tracking API - Analytics Platform - Matomo

You can set the IP & date time & all other attributes with this API. It will record visits nicely in the DB, not the fastest way but it will work (I know a user who imports millions of rows from apache logs using this)

Thank you Matt for your reply !

Yes I saw this Tracking API a little time after having posted my question, that’s why I edited it.
You example you give is very encouraging, but I have a little more question:
As far as I understand, informations commonly contained in cookies will not be available using the PHP Tracking API with PiwikTracker class ( moreover, shouldn’t the $PiwikTracker->disableCookieSupport() be called everytime when using PHP Tracking API ? ).
I didn’t find any method to force the unicity of visitors (instead of let Piwik heuristic choose). Is there a reason there is not, for example, a $PiwikTracker->setForceIdVisitor() method ( or at least $PiwikTracker->setForceIdVisit() ) ?

setting the visitor id is covered in Paypal tracking: Tracking API improvements & how to · Issue #2222 · matomo-org/matomo · GitHub