Tracking Code Empty On Settings->Manage->Tracking Code


#1

Help! I updated to 2.0.3 and it encountered 2 errors (needed to change where it was looking for the zipped update file and I can’t remember the other one), but then seemed fine.

Now there are 3 issues:

  1. The tracking code is empty on the Tracking Code section of Settings->Manage. Also, the contents of the page are all scrunched down so something is wrong!
  2. I can’t update my User Settings, I keep getting Token is not valid
  3. It’s not tracking anything

Thanks,
jborn

Here are some images so you can see.



(Matthieu Aubry) #2

Do you see a javascript error in the console? does it work with another browser eg. Firefox?


#3

I did all of this in FF as requested.

There’s no error when I try to change my User Settings, still just getting Token is not valid.

There IS an error on the JS Tracking Code page.

I’ve attached images of both.


(Matthieu Aubry) #4

Go to the NET panel. Look for a request that contains “action=trackingCode”

What is the “response” for this request?

Otherwise you can also try this: After I updated Piwik, it stopped working (blank page, widgets not loading, error message, etc.). How can I fix this? - Analytics Platform - Matomo


#5

OK, the response was massive. I copied it into a file and have attached it.


(Matthieu Aubry) #6

Can you PM this forum URL, the piwik URL, login and password and bug description / how to reproduce? i’ll take a look and try to reproduce / fix it!


(sunda-islands.com) #7

I keep having the same problems for a very long time (~1,5 years ago after an update. Did manual copy a fresh piwik and just my config file etc. but I seem unable to fix this):

  • Can not change any settings, not even my own SuperUser-PW -> “Token is not valid”
  • If I try to add a new user (filling all fields of course) I get: “Please specify a value for ‘userLogin’.”
  • Dash Board Changes do not save -> no error message shown
  • can not add new websites (filling all fields of course!) -> “Please specify a value for ‘siteName’.”
  • Tracking Code does not show in settings etc. etc. etc.

Piwik is logging perfect and as designed, just the above stuff keeps not working and I’m going nuts about it… :slight_smile:

Any ideas?

Kind regards,
Oliver


(Matthieu Aubry) #8

can you PM your piwik url + login + password + link to this post, I will take a look


#9

Same here. I have sites with multiple hosts, and the problem seem to be across multiple MySQL versions with some, while not with all.


(Matthieu Aubry) #10

please try upgrade to 2.1 rc 301 Moved Permanently


#11

I can confirm that this problem still exists in the 2.1 RC, for me since 2.x started. I get the EXACT same symptoms as the OP.


#12

what php versions are you guys using? have you tried to delete tmp folder contents and check php.ini memory setting to see if a boost will help?


(Matthieu Aubry) #13

Any error in javascript console ?


#14

Got this when used error console in Firefox:

Error: TypeError: elem.tagName is undefined
Source File: chrome://fdm_ffext/content/fdm_fmbtn.js
Line: 409


#15

No change after last update to 2.1.0. Tracking code still empty.


(Matthieu Aubry) #16

Maybe send me PM with your piwiK + login + password?


#17

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.]


#18

I have now tweaked my <Files “*”> section to once again allow only my permitted IP addresses, and to add:

Allow from 127.0.0.1

…and the tracking code fields still seem to be working

Now I also seem to see the following in the “stalled loading”(?) section of the Firebug output…

/plugins/Morpheus/images/logo.svg
/plugins/Morpheus/images/loading-blue.gif
/plugins/Zeitgeist/images/reload.png
/plugins/CoreHome/images/reset_search.png

logo.svg does appear on the page, and the other 3 images appear to be ‘display:none’ (or otherwise hidden) by default, so possibly these are just red herrings…?


#19

I’m not sure about the rest, but this is still an issue for me, five hosting packages with two different hosts. Tracking code is simply empty. Any clue?


(Matthieu Aubry) #20

@pwkuser

we have some clue, actually spent few hours trying to find solution, and hopefully we got it right. The problem likely can be explained if your hosts and servers are using apache. We discussed bug in: Unicorn! · GitHub

It is fixed in the 2.3.0-rc2 release, please test it, and if you have a problem create a new post here, thanks