I am afraid I have the same empty tracking code fields problem with a new install (not upgrade) of Piwik 2.1.0 (on both my dev and live sites). Both the JavaScript Tracking Code and Image Tracking Link fields are just empty s.
My hunch is that Piwik is maybe making a net connection to try to load certain files and these don’t seem to be working (see attached screenshot). I have tried to deny Files access (to “*” ), with exceptions for <Files ~ “^piwik.(js|php)|^index.php$|robots.txt$”>, to all but expected admin user computer IP addresses, and this seems to have stopped certain URIs from loading.
Sorry for the size of the image, I don’t seem to be able to widen the URL field by any means other than making the whole window wider. The URIs that don’t seem to be loading properly, and aren’t clear from the image above, (my Piwik installation is in the site root) are:
/index.php?module=CoreAdminHome&action=trackingCodeGenerator&idSite=1&period=day&date=yesterday
(which, if I’m reading Firebug correctly(?), seems to call the following…)
/index.php?module=Proxy&action=getCss&cb=id
/index.php?module=Proxy&action=getCoreJs&cb=id
/index.php?module=Proxy&action=getNonCoreJs&cb=id
/plugins/CoreAdminHome/stylesheets/jsTrackingGenerator.css
/plugins/CoreAdminHome/javascripts/jsTrackingGenerator.js?cb=id
(I have replaced the id number in the URIs above with ‘id’, just in case it’s sensitive information?)
I have temporarily removed my access restrictions and now my tracking link fields have come back, but the URIs above still seem to be shown as still loading…
I’m guessing I possibly need to tweak my Deny and Allow rules further… I don’t understand what is stopping these URIs from loading on one of my admin user computers, however. Do I need to tweak my rules to allow either the IP address of the Piwik installation (or 127.0.0.1) as well?
[Edit: added note that the Firebug output is for when loading the trackingCodeGenerator page.]