as I’ve seen the tracking script code has changed. Using the new one works with the site that is placed on the same server where piwik itself. But it does not work for other sites with different site IDs. Those other sites are http:// the main site and the piwik installation are on a https:// server (via ssl proxy).
The old script got modified over the time, so it worked perfectly. Now, the new script seemed to be clear … but? No reaction. Why?
With the new style there is no reaction. No visit is shown. With the old style it works. BTW, I think the notation should ask if using HTML old style or new style for the tag, if using old html code, does not find, but this is not the problem here and now.
When you say the new JS code does not work, can you check if there’s any JS error on your site? CAn you reproduce the bug with a small HTML file that contains only the JS COde ?
What do you mean with JS error on the site? The source is, what I posted here. I tried it with three sites, the one where piwik is (https) – that works. Additional page 2 and additional page 3. Those are totally primitive sites with one, two pages, no scripts, just a little bit information and the above mentioned source. When visiting these sites, piwik does not react (with the new code). Before, and with the old (also above mentioned) source piwik reacts immediately. So, what is the difference between those two sources?
No, there is no JS on that sites. And the browsers react the same. The script works for the site where p resides, it does not work for the other sites.
It lookslike thepiwik.js is not loading correctly on the pages, that’s strange. Can you try remove the TRY CATCH block in the JS and see if a JS error shows up ?
If I remove (or comment out) that try-catch block piwik is not called anymore. It seems that this block »rescues«. Tested at www.thetrial.eu. After removing piwik did not recognize a visit.
[quote=“Fabian Becker”]
The new tracking code is asynchronous - that means your page loads even if Piwik is down.[/quote]Thanks so far.
But Piwik is running on same server as whole website, so if Piwik is down, whole server has a problem…:S
Piwik can run on any server, not necessarily the same as your webpage. Asynchronous in this case means that browsers will not wait for the piwik.js file to be downloaded in order to show your page.
Well, but that new code does not work! It works on the same server, but not with pages on different servers (as mentioned before). The old code did that job.
Maybe the code generating should be finetuned? It’s not logic to add something like to a html 4 site. And, maybe all the “&” should be masked as “&”?
Well, let your piwik give you some code and look at it.
The closing “/>” has been removed manually by myself. And no, not all ampersands are masked. Only my own, old ones. Carefully look at the code. Above and in your own piwik. One could call it buggy.
I just tried it with a corrected code now (ampersand masquerade), but it does not work. Maybe it has to do something with the 1&1 ssl proxy. The new code is not functionable when not used in a site on the server itself. Upsetting.
Ah, you use an SSL proxy from 1&1? Good, please give me the URL or post the code of sites that are not on that server, means http sites point to another server that’s redirected via ssl proxy to https. I’m waiting.