SessionW
Forum Replies Created
-
Forum: Plugins
In reply to: [Connect Matomo - Analytics Dashboard for WordPress] Site not created yet.I have reconfigured plugin and I looked deeper into the code, then I found this: “<!– Site will be created and tracking code added on next request –>” in my page source. I have not seen this before because I was looking for Piwik code. I activated the logger by setting the WP_PIWIK_ACTIVATE_LOGGER in config.php to “2”.
I went to the requested URL address: piwik.example.com/?module=API&method=API.getBulkRequest&format=json&urls[0]=method%3DSitesManager.getSitesIdFromSiteUrl%26idSite%3Dn%2Fa%26url%3Dhttp%3A%2F%2Fexample.com%2Fdevelopment%2Fplayground&token_auth=… and I noticed that server response an empty value (), but when I delete the subdirectories from path by assigning the http%3A%2F%2Fexample.com to the &url I receive the correct idSite.The following codes limit my ability to use your plugin successfully:
$id = WP_Piwik\Request::register ( 'SitesManager.getSitesIdFromSiteUrl', array ( 'url' => $isCurrent ? get_bloginfo ( 'url' ) : get_blog_details ( $blogId )->siteurl ) ); [...] if ($this->isNetworkMode () && self::$settings->getGlobalOption ( 'track_mode' ) == 'manually') { $siteId = $this->getPiwikSiteId (); if ($siteId != 'n/a') echo str_replace ( '{ID}', $siteId, $trackingCode->getTrackingCode () ); else echo '<!-- Site will be created and tracking code added on next request -->'; }It uses get_bloginfo(‘url’) to create the request, however I have only global domain added to Piwik for all my WordPress Network pages (http://example.com instead
http://example.com/development/playground), so it can not get proper Piwik idSite. I would venture an attempt to make a patch extending plugin class, but I do not know if I will succeed. Perhaps I’m asking too much, but would you mind adding the ability to manually enter idSite or the address of the page that id should be used or maybe checkbox that enables plugin to use the main domain (without subdirectories) for WordPress Network ? I will be very grateful and I think this feature would be usefull not only for me.Forum: Plugins
In reply to: [Connect Matomo - Analytics Dashboard for WordPress] Site not created yet.Thanks for the quick reply. The thing is that my hosting provider share a special instance of Piwik on fast drives, so I do not have super admin privileges. Through the hosting panel I can add the root domain (www.example.com), which should be operated by Piwik, however my WordPress network is placed in the subdirectory (www.example.com/development/). I use a path-based network, in which on-demand sites use paths, so current site address is something like: http://www.example.com/development/playground/ perhaps there is the root of problem.
I noticed that Test 2/3: SitesManager.getSitesWithAtLeastViewAccess returns correct values such as “idsite”, “name” and “main_url”, Test 3/3: SitesManager.getSitesIdFromSiteUrl gives proper results “piwik_url” and “piwik_path”, there are some other values, but I think it is not relevant. Only one value arouses my suspicions: [“settings”][“site_id”]=”n/a”, but [“tracking_code”] is correct (entered manually). I do not see other irregularities.
My hosting provider can not help me, because without a plugin application works properly, but I still would like to use your awesome plugin.