This is a Python implementation of the Piwik tracking and analytics APIs.
There is an ongoing experimental rewrite of this library in the refactor branch.
Full Documentation at http://piwikapi.readthedocs.org/en/latest/index.html.
Piwik API for Python
License: BSD 3-Clause "New" or "Revised" License
This is a Python implementation of the Piwik tracking and analytics APIs.
There is an ongoing experimental rewrite of this library in the refactor branch.
Full Documentation at http://piwikapi.readthedocs.org/en/latest/index.html.
I don't see any mention of this library being non-blocking. Typically one wouldn't want the analytics to slow down the website. e.g. I currently use segment.com's analytics python client which is non-blocking: https://segment.com/docs/libraries/python/.
To track a single request with the API requires far too much work and too many API calls. It needs a more elegant, pythonic interface.
Hi @nkuttler @andrewschoen ,
we are making an effort to have all builds green in the Piwik project every week. See: matomo-org/matomo#6544
To help us in this effort would it be possible to make the build green for the piwik-python-api project? https://travis-ci.org/piwik/piwik-python-api
Thanks, keep up the good work! ๐
Looks like custom variables are supported in the tracking API whereas newer custom dimensions are not. I would be happy to help out and raise a PR if this client is still worked upon.
I am currently doing new maintenance in the refactor
branch. When it is ready, I will merge it into master
.
This is something that will be fixed as soon as I have some time to do it (or somebody sends a pull request). The docs and source have an example of a fake request class, it's quite trivial to build, but should still be avoided.
I just tested piwikapi on a view, and although I'm following cloasely the basic example, the IP is not transmitted , the log always shows the tracked site IP.
Here is the view
def tagview(request, slug):
tag = get_object_or_404(Tag, slug=slug)
pt = PiwikTracker(1, request)
pt.set_api_url('http://stats.myserver.com/piwik.php')
pt.do_track_page_view("Tag : %s" % tag.name)
pt.set_ip(request.META['REMOTE_ADDR'])
pt.set_token_auth('xxxxxxxxxxxx')
rdict = {'tag': tag}
return render_to_response('tag.html', rdict, RequestContext(request))
First I created a Piwik user, but forgot to give him admin rights
Now the user has admin rights over the tracked site, his token changed and I modifed it in the code, but I'm still getting only the site's IP
The IP passed is correct, it's just like if it's ignored
Any clue to where I should look at first ?
Due to github not allowing me to reopen #13 I open a new issue, because I won't be able to dedicate the necessary time to maintain this project.
Actually, I'd suggest a complete rewrite. It was my first API, it's a mess, it's modeled after the PHP tracking class and as such it's not pythonic.
Thanks for all the support from Piwik HQ.
https://matomo.org/docs/user-id/#user-id-with-direct-tracker-api-access
If you are using the Tracker API directly you may set the User ID via the Tracker API parameter &uid=USER_ID.
I was able to extend the PiwikTracker class and add this extra query param. It would be nice to have this in the python api itself. If helpful, I could submit a pull request. Cheers.
This is used in a few places (line 420 for me). Please fix and redeploy to pypi.
Is this supposed to be open source? LICENSE file doesn't indicate that.
looking at the date of the last commit I noticed that the last date for 2 years for that I just wanted to know if the package is updated with the API(matomo) or not.
Hello there!
In an effort to make it easier for users to understand which options are available to them we are considering marking this project as unmaintained/deprecated. The reason for this is that there are been no activity here for 2 years and we don't know if the project still work at all (the build fails), so we are afraid that users might want to use it but be left confused and without support if things do not work.
By explaining to users that this project is unmaintained, they can still try to use it but they would be at least aware of the situation.
Of course the project could be revived anytime if somebody wants to do it.
Is there anyone here that thinks this is a bad idea? Or anyone that would like to start maintaining this project again?
Take a look at http://piwik.org/docs/tracking-api/reference/#toc-tracking-api-reference. Documentations say about 'rand' parameter but tracking.py has no one. It has only 'r'. https://github.com/nkuttler/python-piwikapi/blob/master/piwikapi/tracking.py#L383
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.