New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Tracking API and Analytics API clients #3079
Comments
Btw, at the moment the work is happening on the more_features branch if anybody is looking at this. I have started the work to support more features and have dropped the Django dependency. |
The project was renamed and moved: https://github.com/nkuttler/python-piwik-tracking The Django dependency is gone. |
ah, nonsense, it's https://github.com/nkuttler/python-piwiktracking |
Oh well, only implementing the tracking API didn't make much sense as it's not possible to verify in unit tests that the data was submitted properly. So I have started to implement the analytics API as well and renamed the project again to reflect the new scope. Certainly the last time. Source: https://github.com/nkuttler/python-piwikapi Docs: http://piwikapi.readthedocs.org/en/latest/index.html Still in alpha. Btw, could somebody remove both keywords and add Python Piwi API or somesuch? |
nkuttler, really well done! excellent work... Currently we offiially advertise the PHP and Java Analytics API on the Tracking API doc page. Also in our recent blog post from yesterday we only mention php/java API: Mobile app analytics Is the Python Tracking API stable? would you feel confident advertising it on the piwik.org website tracking api page? Thanks! |
Thanks matt! The tracking API is pretty stable. With today's push to github everything that doesn't involve cookies should be implemented and unit tested, but I'll have to check that again once I decide how to test the session stuff. I think it's ok to advertise the tracking API as more testers would be good. I hope to make a 0.2 release this or next week with complete unit testing and docs for the tracking API. Then it will be ready for the official tracking API doc page. |
Let me know when you're happy with your code and i'll update the page. Then more users will be able to find it. We can also announce it on the blog and changelog for the next release.
Thanks! |
Will do! I have a few tests for the classes themselves, exceptions etc. Most of the tests check that the submitted data was received by Piwik, either by checking the debug output or by querying the analytics API. I think I'll refactor the debug parsing to query the API as well, that seems better. Probably not for the release though. Of course the code can be added to SVN. Development should be done on git/github though, I guess I'll document that just in case. The code is already licensed as BSD :-) |
I'm a little confused with cookie handling in the PHP tracking API. There are methods like setCustomVariable() that I would have expected to set cookies, or that Piwik would set the cookies when I do the tracking request. However, it seems like it assumes that cookies are always set through JS? Just wondering what the point of setCustomVariable() in PHP is then? Or maybe there's a better place to ask if I have generic API questions? |
Replying to nkuttler:
Oh my I guess I should go out... Piwik would recognize if the custom variables were set through cookies, and setCustomVariable() in PHP is just to submit them manually as the server has no cookies, right? Anyway... will look into this over the weekend :) |
Yes correct, the PHP client does not set /forward first party cookies, but it will read the existing javascript cookie if any was set by javascript for this user. |
Thanks matt! I've made a 0.2 release, but the cookie stuff didn't make it in. I consider this an alpha release and am pushing the code to a few live sites to test it there. I've already found a few things I'd like to add/change before an official announcement. I'll keep you posted. |
Please let me know when the API is stable, and we could list it on the new page Piwik integration plugins & libraries |
Hi matt, the code is being used by more people now so I consider the API stable for now. Feel free to list my code anywhere you like. |
Great news. Thank you for your contrib and work! The Python Tracking API and Analytics API client is now listed on: http://piwik.org/integrate/#python and also on: http://piwik.org/docs/tracking-api/#toc-python-tracker-class Kuddos for your work! |
I can confirm it is still listed at http://piwik.org/integrate/#programming-language-platforms-and-frameworks Hope your library is getting more users and that it works well. Keep up the good work! |
Hi. I've written a simplified python tracking API class. It was written for a client so I have only implemented a subset of the features, and the class is Django-specific. But the code should be reasonably easy to extend and port if anybody else needs it.
The code is at https://github.com/nkuttler/django-piwik-tracking
Seems to work for me so far but some more testing is needed.
Keywords: third-party-plugin
The text was updated successfully, but these errors were encountered: