@Rockvole opened this Issue on May 11th 2017

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

@mattab commented on June 21st 2017 Owner

It seems that TrackerConfig is altering my supplied /js/p.php to /js/p.php/piwik.php

What do you mean by this?

@Rockvole commented on June 21st 2017

From TrackerConfig.java :

public TrackerConfig(<a class='mention' href='https://github.com/NonNull'>@NonNull</a> 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.

@mattab commented on June 21st 2017 Owner

@Rockvole please report the issue in the Java SDK issue tracker here: https://github.com/piwik/piwik-java-tracker/issues

This Issue was closed on June 21st 2017
Powered by GitHub Issue Mirror