Closed Rockvole closed 7 years ago
It seems that TrackerConfig is altering my supplied /js/p.php to /js/p.php/piwik.php
What do you mean by this?
From TrackerConfig.java :
public TrackerConfig(@NonNull String apiUrl, int siteId, String trackerName) {
try {
if (apiUrl.endsWith("piwik.php") || apiUrl.endsWith("piwik-proxy.php")) {
mApiUrl = new URL(apiUrl);
} else {
if (!apiUrl.endsWith("/")) apiUrl += "/";
mApiUrl = new URL(apiUrl + "piwik.php");
}
} catch (MalformedURLException e) { throw new RuntimeException(e); }
mSiteId = siteId;
mTrackerName = trackerName;
}
The code is forcing all url's to contain piwik, when any url's containing piwik will be blocked by ublock origin.
@Rockvole please report the issue in the Java SDK issue tracker here: https://github.com/piwik/piwik-java-tracker/issues
I configured my server for web and android analytics like this : /js/p.php is a symbolic link to /piwik/piwik.php /js/p.js is a symbolic link to /piwik/p.js The piwik directory is restricted access to my ip only.
I did this since I noticed that ublock origin blocks any url with the word "piwik" in it so my requests were not getting through. It seems that TrackerConfig is altering my supplied /js/p.php to /js/p.php/piwik.php