-
Notifications
You must be signed in to change notification settings - Fork 53
Action and Download URLs should support more protocols #15
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
Comments
Hi Andrea, Trying out a few experiments, it seems like Piwik will accept a subset of protocols (including RTMP) for fields such as ACITON_URL, but will not recognize certain other protocols and arbitrary strings. @mattab would you be able to point us to some documentation about what formats are supported by fields such as "url" and "download"? If there is a defined type I would like to accept that as the method parameters, to prevent individuals from submitting unsupported strings and not seeing their results displayed in Piwik. |
Hi Brett, I am using your classes to track video streaming access. I modified PiwikRequest.java, here are the methods I changed:
So far I did not find any problem with Piwik accepting the tracking data. Andrea |
All URL based getters and setters now have a get...AsString and a set...WithString methods allowing users to input String values. Overloaded the original getter/setter methods and the constructor was not done to prevent breaking API changes when a "null" value was used. |
Hi @bcsorba - our general policy is to try and store as much data as possible, so we do as little validation as possible. Therefore, I think it is best that the SDK forwards all URLs as Strings so that the requests still make it to the Tracking API and it is up to the tracking API to decide what to do. For example, some plugins may change the behavior of what is accepted for a given parameter. |
Released in v1.1 |
ACTION_URL and DOWNLOAD_URL are defined as java.net.URL.URL objects in the getters and setters.
I think they should be set and get as strings in order to accept more protocols than the ones supported by the URL class.
This for example would allow tracking of RTMP URLs.
TODO: verify if Piwik accepts RTMP and other non-HTTP protocols!
Thank you,
Andrea
The text was updated successfully, but these errors were encountered: