Page 1 of 1
JS Error on every page if using Google Analytics
Posted: Tue Jan 03, 2006 3:33 pm
by angelo
I'm running 0.11.2
When you do Google-Analytics, you drop a hunk of JS code on each page. I handled this by creating an html blob wrapping the script in {literal} tags, and in the template, putting the html blob for the tracker right at the top in the correct location (that is, to say, inside the ... section).
I get a JS Error ("object expected") on every page.
Anyone else see anything like this?
I can give the URL in question for anyone that wouldn't mind taking a look.
Re: JS Error on every page if using Google Analytics
Posted: Fri Jan 06, 2006 11:40 pm
by Ted
Angelo, can you pm me a link when you get a chance? I'm interresting in getting this working for future things, so I'm willing to help out.
Thanks!
Re: JS Error on every page if using Google Analytics
Posted: Sat Jan 07, 2006 3:09 am
by angelo
Hey Ted...
This site is under development, so some pages are merely placeholders.
http://www.granvillegolfland.com
The core CMS is 0.11.2
Re: JS Error on every page if using Google Analytics
Posted: Sat Jan 07, 2006 3:13 am
by Ted
Hey Angelo,
The script URL has no http in it. That's my best guess.
Re: JS Error on every page if using Google Analytics
Posted: Mon Jan 09, 2006 1:51 pm
by angelo
Not sure if it was munged by FCKeditor or Smarty. I copied-pasted from the "here's your source" textbox. And sure enough, it stripped the http:// portion.
Was this documented somewhere? I've seen the "http://" get nixed from other things too.
I removed it from an html_blob and put it in the template directly.
Now it works.
But it sucks that I had to do that... because I even used the {literal} tag as per the documentation. It seems that I could say "hey, don't touch this -- it's literal" blah blah blah blah... http:// this, special character that, etc. and it honor it, but that's not what's happening if you try to use something in an HTML blob that has a "protocol identifier" prefix.
Angelo
Re: JS Error on every page if using Google Analytics
Posted: Mon Jan 09, 2006 4:55 pm
by Ted
That's the problem when WYSIWYG's get too smart. Personally, unless you really don't know HTML, the WYSIWYG should be turned off. Then that kind of stuff can be avoided.
Anway, I'm glad it's working now!
