Improvement of Piwik Tracker Code


(eugen723674) #1

Hi !

Wouldn’t it very important to change the “non-javascript” part in the tracking code like shown below to avoid weird “movements” on pages???

<noscript><p><img src="www.domain.com/piwik.php?idsite=1" 
style="border:0" [b]width="1" height="1"[/b] alt=""/></p></noscript>

This would be much better as the code is sized to 1x1 px and wont “snap” from big to small while loading … if you know what i mean style_emoticons/<#EMO_DIR#>/wink.gif


(vipsoft) #2

Why not:

 <p style="display:none;">

(eugen723674) #3

Because i am oldschool style_emoticons/<#EMO_DIR#>/smile.gif lol
Also my code works even with very old browsers style_emoticons/<#EMO_DIR#>/biggrin.gif

But what i would know very hardly is:
WHYYYY isnt there any width=“1” height=“1” image sizing or even the p style=“display:none;” included in the original piwik code ???


(vipsoft) #4

It’s fixed in svn.

Generally, any “weird movement” at the bottom of the page is going to go unnoticed as this is in a noscript block. Bots, lynx, and barely functional mobile web browsers fall in this category.


(eugen723674) #5

Hi!

Ok, so in next release it will be included … great.
Where can i find the SVN?
Want to see what you have changed … wanna use the same.

About the weird movement:
You wont believe how much users deactivate javascript style_emoticons/<#EMO_DIR#>/wink.gif


(eugen723674) #6

Ehm vipsoft…

if i use style=“display:none;” as follows:

… does he even counts the image call? Does he calls the image even if display is none? … does piwik still counts the visitor (who visits the site with disabled javascript)?

Thanks


(eugen723674) #7

ok forget about it … i tried it… and he counts style_emoticons/<#EMO_DIR#>/biggrin.gif


(Matthieu Aubry) #8

[quote=eugen723674 @ Oct 12 2009, 09:42 PM]Because i am oldschool style_emoticons/<#EMO_DIR#>/smile.gif lol
Also my code works even with very old browsers style_emoticons/<#EMO_DIR#>/biggrin.gif

But what i would know very hardly is:
WHYYYY isnt there any width=“1” height=“1” image sizing or even the p style=“display:none;” included in the original piwik code ???[/quote]

the width=1 and height=1 are not set in the Javascript in order to allow plugins to return an image of any size in the noscript - for example, there could be a plugin returning a visitor counter or other images (flag of the visitor, visitor IP, etc.)