Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

Importing historical data via the API doesn't show on Piwik (no replies)

$
0
0
I'm running a custom script to import data in a very specific way. Historical visits are logged properly, however I can't get them to show up in reports on the Visitors or Actions tabs. I've tried the command line reprocessing, dropping tables and signing out/in, to no avail.

This is the code I'm using. What am I missing?

        $pwk = new PiwikTracker( $idSite = 3, 'http://site.dev/' );
        $pwk->setTokenAuth( 'TOKEN' );
        $pwk->setIp( $record['ip'] );
        $pwk->setForceVisitDateTime( $record['date']  );
        $pwk->setCustomVariable( 1, 'VarName', 'VarValue','VarScope');
        $pwk->setUrl( $record['action'] );
        $pwk->doTrackAction( 'ActionUrl', 'ActionType' );
        $pwk->doTrackEvent( 'EventCat','EventAction','EventName',10.00 );
        $pwk->doTrackPageView( 'PageName' );

Viewing all articles
Browse latest Browse all 4243

Trending Articles