Subject: Re: Need Include to be first thing after BODY tag
On second thought it just might work
Try this code instead:
cfif thistag.executionMode eq 'Start'body
script language=javascript1.1
src=/somedir
type=text/javascript
xxCreatePageViewTag(Housewares,Cool Kitchen Gadgets,Page 1
Try this on for size. You should be able to put it in your onrequestend file.
It basically gets what CF generated, captures it, does a replace on the body
tag with new content and outputs it. It worked in a simple test.
CFSET myContent = getPageContext().getOut().getstring()
CFSAVECONTENT
Hello,
I'm working on a project to change the web analysis tags on our CF8 site.
Currently we use onrequestend.cfm to tell the rendered page to include the
analysis javascripts at the end of the file and then put in the /body tag.
We are changing brands and the javascripts must be included
the javascripts must be included right after the opening body tag.
Are you sure they really specify right after the opening body tag
or do they just mean inside the body tag?
I cannot think of any valuable technical reason the Javascript couldn't
be right before the /BODY tag.
--
on the CF-Talk web page.
Thanks, Jerry
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2008 4:16 PM
To: CF-Talk
Subject: Re: Need Include to be first thing after BODY tag
the javascripts must be included right after the opening body tag
to be sure to count the page in the event that a user clicks away to
another page before the current page is fully loaded.
Ah ok, now this is a valuable reason I didn't think of. ;-)
--
___
REUSE CODE! Use custom tags;
See
Extract everything from the opening body tag for your pages and make a
common include file.
On Tue, Mar 25, 2008 at 5:04 PM, Gerald Weir [EMAIL PROTECTED] wrote:
Hello,
I'm working on a project to change the web analysis tags on our CF8 site.
Currently we use onrequestend.cfm to tell the
list - as I don't
see my own question on the CF-Talk web page.
Thanks, Jerry
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2008 4:16 PM
To: CF-Talk
Subject: Re: Need Include to be first thing after BODY tag
the javascripts must
Unless I'm not getting something (it is late in the afternoon.. need
caffeine)..
Can't you use the body onload=javascript:myFunc(...); /
On Tue, Mar 25, 2008 at 3:36 PM, Claude Schneegans
[EMAIL PROTECTED] wrote:
to be sure to count the page in the event that a user clicks away to
another
Ah.. I see.. you're wanting to do it without editing all the pages..
dunno there...
On Tue, Mar 25, 2008 at 3:55 PM, Greg Morphis [EMAIL PROTECTED] wrote:
Unless I'm not getting something (it is late in the afternoon.. need
caffeine)..
Can't you use the body onload=javascript:myFunc(...); /
:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2008 4:53 PM
To: CF-Talk
Subject: Re: Need Include to be first thing after BODY tag
Not to help you at all, and providing info you didn't ask for, but...
Best practices when counting pages is to wait for the page to load, or most
of the page to load
On Tue, Mar 25, 2008 at 5:01 PM, Gerald Weir [EMAIL PROTECTED] wrote:
Jerry, I appreciate your point and it is a good one. I'm just the
programmer however, it's their call I'm afraid.
Yes, your question is correct, this is the javascript report the page view
so in the end it must go on all.
to be first thing after BODY tag
Not to help you at all, and providing info you didn't ask for, but...
Best practices when counting pages is to wait for the page to load, or
most
of the page to load, before counting that page.
This is especially true when counting advertising page views
If you are using a version of ColdFusion that supports the
Application.CFC and can make use of this feature in your site, you can
use the Application.cfc onRequest method for this type of work.
There are a lot a ramifications with this, especially if you also use
templates in this site
-Original Message-
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2008 4:53 PM
To: CF-Talk
Subject: Re: Need Include to be first thing after BODY tag
Not to help you at all, and providing info you didn't ask for, but...
Best practices when counting pages
: Tuesday, March 25, 2008 4:53 PM
To: CF-Talk
Subject: Re: Need Include to be first thing after BODY tag
Not to help you at all, and providing info you didn't ask for, but...
Best practices when counting pages is to wait for the page to load, or
most
of the page to load, before
On second thought it just might work
Try this code instead:
cfif thistag.executionMode eq 'Start'body
script language=javascript1.1
src=/somedir
type=text/javascript
xxCreatePageViewTag(Housewares,Cool Kitchen Gadgets,Page 1);
/script/cfif
cfif thistag.executionMode eq
another reason would be for instance with google analytics / urchin
tracker and tracking ajax content.
you need to have the ga javascript loaded BEFORE the ajax calls you want
to track, so if you are dynamically loading an external page into a
container on the calling page, you need the ga js to
18 matches
Mail list logo