matomo-org / piwik-python-api

Piwik API for Python
BSD 3-Clause "New" or "Revised" License
99 stars 43 forks source link

General Maintenance: New Maintainer wanted! #19

Open brendon-codes opened 7 years ago

brendon-codes commented 7 years ago

I am currently doing new maintenance in the refactor branch. When it is ready, I will merge it into master.

nkuttler commented 7 years ago

@mattab Please add @brendoncrawford to this repository's committers. It looks like I have no access to those settings for this repository.

brendon-codes commented 7 years ago

@nkuttler @mattab : Thanks. I will not merge anything into master until I have all tests passing and documentation updated in my forked repo. I expect it could be a few weeks until I am at that point.

mattab commented 7 years ago

Thank you @brendoncrawford for offering help here :+1: you have now write access to the repo. Happy hacking!

Do you plan to maintain this API or create a newer API for the SDK?

brendon-codes commented 7 years ago

@mattab : Thank you for adding me.

I am open to suggestions as far as strategy. One idea I have is to gradually refactor the Python API to match the JS SDK, since it seems that the JS SDK is the most actively maintained. What do you think?

mattab commented 7 years ago

Probably the most relevant SDK to look at would be the PHP as it contains the methods that are most useful for server side tracking (many of the JS methods don't apply to Python): https://github.com/piwik/piwik-php-tracker/

(of course you're welcome to split the code in multiple classes as you see fit, but it's interesting to see the API itself like: http://docs.piwik.org/PiwikTracker/files/PiwikTracker.html )

refactor is an option, but maybe it would also work to rewrite the library for a 1.0 version with the modern API. Would you maybe feel comfortable with a rewrite or would prefer refactor?

@pitbulk do you maybe have some thoughts on this?

brendon-codes commented 7 years ago

@mattab :

I have made a lot of changes which have been pushed into the refactor branch of this repo. This is still a work in progress, so is of course not stable or complete: https://github.com/piwik/piwik-python-api/blob/refactor/piwikapi/tracking.py

Here is a basic summary of what I have done so far. Your feedback is welcome.

I have a lot of fixes and features that I need to implement asap for my own needs on various projects. What do you think about a gradual/incremental rewrite? This way I can solve immediate needs, while still working towards a more long term elegant solution. Thoughts?

brendon-codes commented 7 years ago

@mattab : I have a miscellaneous question for you.

I see in the PHP client, it has doTrackGoal() and doTrackAction(). Each of these calls will execute an API request to the server, so this seems to suggest that it is not possible to set download/link and goal/revenue in the same request. Is this correct, or would it be ok to allow a client to send those at the same time? Is there a part of the documentation I can read that might explain this further?

mattab commented 7 years ago

Hi @brendoncrawford

When users want to track a goal while recording an Outlink or a Download, then they would typically create a Goal in Piwik and configure it as "is converted when an Outlink (or Download) contains ..."

If they want to track a goal manually in the code, then would call doTrackGoal after tracking for example an outlink, a download, or even a custom event, which would send multiple requests which is ok. So it's not needed to set goal/revenue in the action requests.

Hope this helps let me know?

brendon-codes commented 7 years ago

@mattab

  1. I suppose my question is more generic, in that I am wondering about being able to allow the user to send multiple properties in the same request. Another example would be the ability to set all of e_cvar, cvar, and _cvar in the same request, instead of 3 separate requests.

  2. I have another unrelated question. Could I get access to https://piwikapi.readthedocs.io/ ? I would like to update the documentation of my experimental refactor branch.

mattab commented 7 years ago

Could I get access to https://piwikapi.readthedocs.io/ ?

@nkuttler maybe you know how to access the account? I'm not sure if I have access already to this docs site.

in that I am wondering about being able to allow the user to send multiple properties in the same request. Another example would be the ability to set all of e_cvar, cvar, and _cvar in the same request, instead of 3 separate requests.

In general i'd recommend to follow the PHP SDK implementation as we would have already implemented any relevant logic, but there is not a lot that we restrict in the SDK itself. Users can call any function but the values may be ignored by the Tracking API itself depending on the request.

In general when it comes to Custom Dimensions (or the old, later-to-be-deprecated Custom Variables), they can be set on a Visit scope or Action scope. Typically you would allow to set them freely and yes, there could be cvar and _cvar in the same request.

nkuttler commented 7 years ago

@brendoncrawford @mattab I can add maintainers to the rtd repository. I think all I need are your rtd usernames.

mattab commented 6 years ago

Thanks @nkuttler my account there is mattab

nkuttler commented 6 years ago

@mattab I have added you as a maintainer.

mattab commented 6 years ago

Thanks @nkuttler

Hi @brendoncrawford - How is the Python SDK work going so far? if we can help in some way please share :+1:

brendon-codes commented 6 years ago

@mattab

I am still (slowly) working on the refactor branch. I am using it in production for a few months, so I can see how it works, and identify any possible problems. If everything looks good, I will begin to update the tests and documentation. This will have to be an ongoing slow and steady project.

mattab commented 6 years ago

@brendoncrawford That's good news and progress! As soon you have good documentation and tests for it, it would be great to publish a beta release and we can then advertise to the community to get feedback. Looking forward to it and well done so far :+1:

asokolsky commented 6 years ago

@brendoncrawford I consider using Matomo with an internal flask app. Should I stick with JavaScript or there is a chance of using piwik-python-api? Thanks!

mattab commented 6 years ago

Hi @brendoncrawford is there maybe an update on the Python Matomo SDK? We are still looking to publish an updated / actively developed SDK for Matomo in Python :+1:

mattab commented 5 years ago

Hi everyone, the Pull request with several new feaures, fixes, improvements, is now opened at https://github.com/matomo-org/piwik-python-api/pull/24

Testing & feedback welcome.

-> Would you like to contribute and maintain this Matomo Python API SDK?

We're still looking for help, and we'd like to give commit rights to someone new :ok_hand:

micwoj92 commented 4 years ago

@brendoncrawford do you plan on updating 0.4 on https://pypi.org/project/piwikapi ?