noscript tags
pebosi - September 9, 2008 - 12:33
| Project: | Piwik - Web analytics |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | by design |
Description
The newest piwik version contains also tracking code via noscript - tag, could this be added?
regards

#1
I will take a look, thx for pointing this out.
#2
Do you know what this code does? I'm not sure how this could track something interesting. It's more to show some Piwik advertisement... Additional I don't like "object" very much...
<object><noscript>
<p>Open source web analytics <img src="http://example.com/piwik/piwik.php" style="border:0" alt="piwik"/></p>
</noscript>
</object>
#3
Hi,
i think it's enough if we add:
<noscript><img src="http://example.com/piwik/piwik.php" style="border:0;display:none" alt="piwik" /></noscript>#4
Hi,
i created a patch to add noscript tracking, and little changes to _footer.
please review.
regards
#5
corrected patch...
#6
another correction.
#7
This looks not logic to me. Browsers are aware if they have JS enabled or not. If they have they skip NOSCRIPT tags. Otherwise they execute the content inside.
Additional the
$_SERVER['HTTPS']verification is invalid/incompatible. It wouldn't work with load balancers that have SSL installed and the webserver behind them not. Additional you need to explicitly check for "on" as I remember or IIS will provide you "off" (also -> TRUE) in non-ssl and the isset() wouldn't work as expected. All this issues are the why - it is not yet implemented in GA and Piwik module... see also #218215: Support GA tracking in absence of JavaScript. Users having JS activated are no more able to use "any" website... there are not very much sites that works without JS.+ if ($url_https = variable_get('piwik_url_https', '') && isset($_SERVER['HTTPS'])) {+ return '<noscript><img src="'. $url_https .'/piwik.php?idsite='. $site_id .'" style="border:0" alt=""/></noscript>';
+ }
+ return '<noscript><img src="'. $url_http .'/piwik.php?idsite='. $site_id .'" style="border:0" alt=""/></noscript>';
Do you *really* think we need this? I think not and I don't like to track spiders with the tracking as this would change the numbers to be wrong and marketing only complains that their numbers are not accurate. With JS based tracking this the tracking results are much more better than without.
I tend to say "by design" here, but another plan of me is to implement a template file for the footer code. With Theming we are than able to provide you a template that you can change on theme level and you are able to add this lines if you think you need to implement the above code on your site. I would be more happy to see a patch for this...
#8
Default "noscript" part has been removed in Piwik v0.4.