Piwik – cant`t find piwik.js/404 Error
-
Hi,
When soeone visits my homepage, Piwik can´t track the visit, because there is a bad request, because Piwik uses the wrong url to us piwik.js
But in the Dashboard is the correct Url.
http://peerhoflauf.ti-leichtathletik.at/piwik/Piwik does the request to this Url: http://peerhoflauf.ti-leichtathletik.at/:/peerhoflauf.ti-leichtathletik.at/piwik/
Any ideas to solve the problem?
I’m using WP-Piwik 1.0.1 with Piwik 2.13.1/WordPress 4.2.2.
Thanks
-
Can you please run the test script (Settings -> WP-Piwik -> Support) and post it’s results here?
There is a slash missing in your url. It should be ://peerhoflauf.ti-leichtathletik.at/piwik/ instead of :/peerhoflauf.ti-leichtathletik.at/piwik/ (which causes the pre-added URL).
Thank you!
Thanks for the fast answer: I think that the missing slash is part of the problem. But in the Dashboard of wp-piwik is the correct url.
here is the result of the test script:
WP-Piwik 1.0.1 Mode: http Test 1/3: global.getPiwikVersion string(6) "2.13.1" array(2) { [0]=> string(288) "HTTP/1.1 200 OK Date: Mon, 01 Jun 2015 11:21:03 GMT Server: Apache Cache-Control: no-store, no-cache, must-revalidate, max-age=0 Expires: Mon, 01 Jun 2015 12:21:03 GMT Vary: User-Agent,Accept-Encoding Pragma: no-cache Content-Length: 23 Content-Type: text/plain; charset=utf-8 " [1]=> string(159) "http://peerhoflauf.ti-leichtathletik.at/piwik/?module=API&method=API.getBulkRequest&format=php&urls[0]=method%3DAPI.getPiwikVersion%26idSite%3D1&token_auth=..." } Test 2/3: SitesManager.getSitesWithAtLeastViewAccess array(1) { [0]=> array(16) { ["idsite"]=> string(1) "1" ["name"]=> string(21) "Peerhoflauf Innsbruck" ["main_url"]=> string(39) "http://peerhoflauf.ti-leichtathletik.at" ["ts_created"]=> string(19) "2015-04-26 16:00:16" ["ecommerce"]=> string(1) "0" ["sitesearch"]=> string(1) "1" ["sitesearch_keyword_parameters"]=> string(0) "" ["sitesearch_category_parameters"]=> string(0) "" ["timezone"]=> string(13) "Europe/Vienna" ["currency"]=> string(3) "USD" ["excluded_ips"]=> string(0) "" ["excluded_parameters"]=> string(0) "" ["excluded_user_agents"]=> string(0) "" ["group"]=> string(0) "" ["type"]=> string(7) "website" ["keep_url_fragment"]=> string(1) "0" } } array(2) { [0]=> string(289) "HTTP/1.1 200 OK Date: Mon, 01 Jun 2015 11:21:03 GMT Server: Apache Cache-Control: no-store, no-cache, must-revalidate, max-age=0 Expires: Mon, 01 Jun 2015 12:21:03 GMT Vary: User-Agent,Accept-Encoding Pragma: no-cache Content-Length: 568 Content-Type: text/plain; charset=utf-8 " [1]=> string(182) "http://peerhoflauf.ti-leichtathletik.at/piwik/?module=API&method=API.getBulkRequest&format=php&urls[0]=method%3DSitesManager.getSitesWithAtLeastViewAccess%26idSite%3D1&token_auth=..." } Test 3/3: SitesManager.getSitesIdFromSiteUrl array(1) { [0]=> array(1) { ["idsite"]=> string(1) "1" } } array(2) { [0]=> string(288) "HTTP/1.1 200 OK Date: Mon, 01 Jun 2015 11:21:03 GMT Server: Apache Cache-Control: no-store, no-cache, must-revalidate, max-age=0 Expires: Mon, 01 Jun 2015 12:21:03 GMT Vary: User-Agent,Accept-Encoding Pragma: no-cache Content-Length: 47 Content-Type: text/plain; charset=utf-8 " [1]=> string(228) "http://peerhoflauf.ti-leichtathletik.at/piwik/?module=API&method=API.getBulkRequest&format=php&urls[0]=method%3DSitesManager.getSitesIdFromSiteUrl%26idSite%3D1%26url%3Dhttp%3A%2F%2Fpeerhoflauf.ti-leichtathletik.at&token_auth=..." } array(2) { ["global_settings"]=> array(52) { ["revision"]=> string(10) "2015053001" ["last_settings_update"]=> string(10) "1433148622" ["piwik_mode"]=> string(4) "http" ["piwik_url"]=> string(46) "http://peerhoflauf.ti-leichtathletik.at/piwik/" ["piwik_path"]=> string(0) "" ["piwik_user"]=> string(0) "" ["piwik_token"]=> string(3) "set" ["auto_site_config"]=> string(1) "1" ["default_date"]=> string(9) "yesterday" ["stats_seo"]=> string(1) "0" ["dashboard_widget"]=> string(8) "disabled" ["dashboard_chart"]=> string(1) "0" ["dashboard_seo"]=> string(1) "0" ["toolbar"]=> string(1) "0" ["capability_read_stats"]=> array(5) { ["administrator"]=> string(1) "1" ["editor"]=> string(1) "0" ["author"]=> string(1) "0" ["contributor"]=> string(1) "0" ["subscriber"]=> string(1) "0" } ["perpost_stats"]=> string(1) "0" ["plugin_display_name"]=> string(8) "WP-Piwik" ["piwik_shortcut"]=> string(1) "0" ["shortcodes"]=> string(1) "0" ["track_mode"]=> string(7) "default" ["track_codeposition"]=> string(6) "footer" ["track_noscript"]=> string(1) "0" ["track_nojavascript"]=> string(1) "0" ["proxy_url"]=> string(0) "" ["track_content"]=> string(8) "disabled" ["track_search"]=> string(1) "0" ["track_404"]=> string(1) "0" ["add_post_annotations"]=> string(1) "0" ["add_customvars_box"]=> string(1) "1" ["add_download_extensions"]=> string(0) "" ["disable_cookies"]=> string(1) "0" ["limit_cookies"]=> string(1) "0" ["limit_cookies_visitor"]=> string(7) "1209600" ["limit_cookies_session"]=> string(1) "0" ["limit_cookies_referral"]=> string(8) "15778463" ["track_admin"]=> string(1) "0" ["capability_stealth"]=> array(0) { } ["track_across"]=> string(1) "0" ["track_across_alias"]=> string(1) "0" ["track_feed"]=> string(1) "0" ["track_feed_addcampaign"]=> string(1) "0" ["track_feed_campaign"]=> string(4) "feed" ["cache"]=> string(1) "1" ["disable_timelimit"]=> string(1) "0" ["connection_timeout"]=> string(1) "5" ["disable_ssl_verify"]=> string(1) "0" ["piwik_useragent"]=> string(3) "php" ["piwik_useragent_string"]=> string(8) "WP-Piwik" ["track_datacfasync"]=> string(1) "0" ["track_cdnurl"]=> string(0) "" ["track_cdnurlssl"]=> string(0) "" ["force_protocol"]=> string(8) "disabled" } ["settings"]=> array(6) { ["name"]=> string(0) "" ["site_id"]=> string(1) "1" ["noscript_code"]=> string(126) "<noscript><p><img src="//peerhoflauf.ti-leichtathletik.at/piwik/piwik.php?idsite=1" style="border:0;" alt="" /></p></noscript>" ["tracking_code"]=> string(534) "<!-- Piwik --> <script type="text/javascript"> var _paq = _paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//peerhoflauf.ti-leichtathletik.at/piwik/"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', 1]); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Piwik Code --> " ["last_tracking_code_update"]=> string(10) "1433148622" ["dashboard_revision"]=> string(1) "0" } }
`
Sorry – now after this test – the error is disappeared.
Ok, thank you.
Looks like the URL was not properly prepared the first time. I will re-check the callback methods which should take care of this and provide an update if necessary.
- The topic ‘Piwik – cant`t find piwik.js/404 Error’ is closed to new replies.