Convert Javascript to Php
How can I turn this Google Analytics tracking code to a php. I tried
looking for something to convert javascript to php, had no luck. Doesnt
look like a big code, I dont want to have this javascript load on my site,
a php would be better, even if i add to add a fake img to the footer to
trigger the php, that would be fine too.
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXX-XXXX-XX']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type =
'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
No comments:
Post a Comment