You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by David Heffelfinger <dh...@ensode.net> on 2006/10/14 23:09:45 UTC

MyFaces and Google Analytics

Hello,

I recently developed an online utility using MyFaces. This utility is hosted
on a public site. I am using Google Analytics to track traffic to the site.
Google analytics requires a snippet of Javascript to be added to the bottom
of every page, right before the closing </body> tag.

I added the required script to my JSP, however the rendered HTML places a
script generated by MyFaces below it, therefore the Google Analytics script
is no longer in the required place. Is there any way to get the MyFaces
generated script to be placed above the Google Analytics script?

Thanks,
David

-- 
http://ensode.net - A Guide to Java, Linux and Other Technology Topics

Re: MyFaces and Google Analytics

Posted by Matthias Wessendorf <ma...@apache.org>.
is it that?

http://www.ensode.net/pdf-crack/faces/pdf-crack.jsp

funny the terms page says 404 :)



On 10/14/06, Matthias Wessendorf <ma...@apache.org> wrote:
> David,
>
> what you can do is:
>
> -create a component that renders out the needed html/js and add in
> *each* page like:
>  </body><foo:goolgle/></f:view>
>
> or you can *customize* the myfaces code that at the very end of the
> render response phase your custom markup is send down to the client.
>
> -M
>
> On 10/14/06, David Heffelfinger <dh...@ensode.net> wrote:
> > Hello,
> >
> > I recently developed an online utility using MyFaces. This utility is hosted
> > on a public site. I am using Google Analytics to track traffic to the site.
> > Google analytics requires a snippet of Javascript to be added to the bottom
> > of every page, right before the closing </body> tag.
> >
> > I added the required script to my JSP, however the rendered HTML places a
> > script generated by MyFaces below it, therefore the Google Analytics script
> > is no longer in the required place. Is there any way to get the MyFaces
> > generated script to be placed above the Google Analytics script?
> >
> > Thanks,
> > David
> >
> > --
> > http://ensode.net - A Guide to Java, Linux and Other Technology Topics
>
>
> --
> Matthias Wessendorf
> http://tinyurl.com/fmywh
>
> further stuff:
> blog: http://jroller.com/page/mwessendorf
> mail: mwessendorf-at-gmail-dot-com
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Re: MyFaces and Google Analytics

Posted by Matthias Wessendorf <ma...@apache.org>.
David,

what you can do is:

-create a component that renders out the needed html/js and add in
*each* page like:
 </body><foo:goolgle/></f:view>

or you can *customize* the myfaces code that at the very end of the
render response phase your custom markup is send down to the client.

-M

On 10/14/06, David Heffelfinger <dh...@ensode.net> wrote:
> Hello,
>
> I recently developed an online utility using MyFaces. This utility is hosted
> on a public site. I am using Google Analytics to track traffic to the site.
> Google analytics requires a snippet of Javascript to be added to the bottom
> of every page, right before the closing </body> tag.
>
> I added the required script to my JSP, however the rendered HTML places a
> script generated by MyFaces below it, therefore the Google Analytics script
> is no longer in the required place. Is there any way to get the MyFaces
> generated script to be placed above the Google Analytics script?
>
> Thanks,
> David
>
> --
> http://ensode.net - A Guide to Java, Linux and Other Technology Topics


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com