Open Preovaleo opened 9 years ago
Yes, you should be able to use Piwik just fine using the PHP api. Simply paste the PHP code into all the layout files (layout-.php, admin/layout-.php) at the place you need them to appear.
Yes, But this was not exactly what i mean, i want to integrate piwik in the r.php file.
Ah, I see. You should be able to integrated it nonetheless. You can try something like this in r.php
Try adding this before line 45 on r.php
$piwikTracker = new PiwikTracker( $idSite = {$IDSITE} );
$piwikTracker->setUrl($row['rurl']);
// Sends Tracker request via http
$piwikTracker->doTrackPageView('Polr Redirection');
You can also replace $row['rurl']
with "http://$wsa/$row['baseval']"
if you want Piwik to receive the Polr short link rather than the "long" shortened link.
@cydrobolt have you considered adding built-in and proper Piwik support for v2?
I think it would be reasonable to have it as a plugin to 2.0
Asking in #126 how to add plugin?
Has this been revisted since then? Sounds reasonable to me :-).
Would be nice to see some options appear instead of being forced to hack in something pretty basic these days.
@vectr0n, @cydrobolt (presumably) maintains this in their spare time. If you think Piwik support is important, you are welcome to write and contribute the feature yourself.
I do maintain the project in my spare time. If you'd like to contribute this feature, please send a PR and I'll take a look at it. If you've already implemented it through a simple hack on your instance, it shouldn't be too much work to send in a PR for this change.
Here's an interesting package that could be used: https://github.com/RobBrazier/Laravel_Piwik
As I've mentioned before, there are also many other issues to be addressed, so I can't give you any ETAs on when this can be implemented. Please take a couple minutes to send a PR if you can! That would be super helpful :)
Any other update since 2015, will try https://github.com/RobBrazier/Laravel_Piwik
Hello,
Is it possible to replace your stat with piwik by using the PHP api ? http://piwik.org/docs/tracking-api/#piwik-tracking-api-advanced-users http://developer.piwik.org/api-reference/PHP-Piwik-Tracker
Thank you