Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #1845, switch to async JS in other places and apply fixes to tra…
…cking code admin page & other pages. Notes: * Fix bug in Installation page that displays JS where newlines were not displayed and text would not be selected on click. * Modify piwik.js to make sure setTrackerUrl is called before _paq is processed. * Move _paq modifications in tracker code to global scope outside every anonymous function. * Fix bug in rewritten site selector widget where selecting the same site didn't fire an event (necessary for some uses). * Fix bug where change of site resulted in delay before site name in labels changed. * Fix bug where site name was double encoded in tracking code admin page. * Rewrite piwik_tag.tpl to use async tracking code.
- Loading branch information
diosmosis
committed
Feb 25, 2013
1 parent
b3486f7
commit c6ac229
Showing
11 changed files
with
143 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
<!-- Piwik --> <script type="text/javascript"> | ||
var _paq = _paq || []; | ||
(function(){ var u=(("https:" == document.location.protocol) ? "https://{$piwikUrl}/" : "http://{$piwikUrl}/"); | ||
_paq.push(['setSiteId', {$idSite}]); | ||
_paq.push(['setTrackerUrl', u+'piwik.php']); | ||
_paq.push(['trackPageView']); | ||
_paq.push(['enableLinkTracking']); | ||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.defer=true; g.async=true; g.src=u+'piwik.js'; | ||
s.parentNode.insertBefore(g,s); })(); | ||
</script><noscript><p><img src="http://{$piwikUrl}piwik.php?idsite={$idSite}" style="border:0" alt="" /></p></noscript> | ||
<!-- Piwik --> | ||
<script type="text/javascript"> | ||
var _paq = _paq || []; | ||
_paq.push(['setSiteId', {$idSite}]); | ||
_paq.push(['trackPageView']); | ||
_paq.push(['enableLinkTracking']); | ||
(function() { | ||
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://{$piwikUrl}/"; | ||
_paq.push(['setTrackerUrl', u+'piwik.php']); | ||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; | ||
g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); | ||
})(); | ||
</script> | ||
<noscript><p><img src="http://{$piwikUrl}piwik.php?idsite={$idSite}" style="border:0" alt="" /></p></noscript> | ||
<!-- End Piwik Code --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.