Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-05-12 16:58:49
- immarabi
- Member
- Registered: 2008-04-29
- Posts: 57
can I just insert javascript into a page?
Hi,
can I just insert javascript, such as this script for Google tracking at the bottom of my page?
<script src=“http://www.google-analytics.com/urchin.js” type=“text/javascript”>
</script>
<script type=“text/javascript”>
_uacct = “UA-2350759-7”;
urchinTracker();
</script>
thanks
Offline
Re: can I just insert javascript into a page?
Yes you can, and I think its supposed to go after the end body tag, but I have it before the end body tag, and it works fine.
I put the Google code in a form, then include it in the page.
Offline
Re: can I just insert javascript into a page?
After the </body> tag there should be nothing but </html>.
<script> should go in <head> or <body> or see HTML reference
Offline
Re: can I just insert javascript into a page?
Correct Ruud – but that is what Google say to do…!
Offline
Re: can I just insert javascript into a page?
Google says (emphasis mine)
We generally recommend that you place the Google Analytics tracking code immediately before the closing </body> tag of your pages in order to avoid any issues with page loading delays for visitors with slow connection speeds. However, there are several situations where it might make more sense for you to install the code in the head
Offline
Re: can I just insert javascript into a page?
You are right! I should not have said anything, because I too have the tracking code just before the end body tag. But I could have sworn they said after the end body tag…!!
Offline
#7 2008-09-06 00:27:03
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: can I just insert javascript into a page?
I have installed the Google analytics code in a form and i am loading it into all my pages.
Google says the script is installed but is not tracking anything at all…
Is there something I am doing wrong?
Offline
Re: can I just insert javascript into a page?
There is some delay between install and furst data – use google help center – this question is there.
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline