You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mike Lyon <mi...@gmail.com> on 2009/04/10 01:51:51 UTC

[users@httpd] Inserting google analytics code onto pages with apache proxy?

Hello All,

So I am wondering if there is a way to have the Google Analytics code
inserted into requests as they come through an apache proxy? Or do I really
have to put the analytics code onto every page on each server?

Thanks,
Mike

Re: [users@httpd] Inserting google analytics code onto pages with apache proxy?

Posted by Brian Mearns <me...@gmail.com>.
On Thu, Apr 9, 2009 at 7:51 PM, Mike Lyon <mi...@gmail.com> wrote:
> Hello All,
>
> So I am wondering if there is a way to have the Google Analytics code
> inserted into requests as they come through an apache proxy? Or do I really
> have to put the analytics code onto every page on each server?
>
> Thanks,
> Mike
>
>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


People usually do this with server side scripting, e.g., serve up your
HTML content through PHP or something similar, and use that to drop
the javascript in the bottom of the page. There may be a
module/directive similar to the README used by directory indexer, but
you'll have to remember to only apply it to HTML pages, and you'll
still have to figure out a way to get it inside the closing </html>
tag, which probably means you'll have to put the closing tag into the
footer, and remove it from all your existing pages. But I don't know
if such a directive even exists.

- -Brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQEcBAEBAgAGBQJJ3z4xAAoJEHOUulIkSI7cBhEIAJliuTnEFAFiOexBv4Q7TOOf
3wdOu44dh6g0/6Uzwhtw3157fwCxlnp7/iUgm43v4qxuag8oYG+TKUPnDIg8d5ux
VJ1XWSgvD6xbfKeAcI1WIK1u2/10jtXqb/UZeVgJMMFmrc1hpGVENP6jzcUr52AS
9Yd3+33GD3tr1hO4hTxUamr2eeqoukR2d6ikhKRKbS2y4MWzxfhTToTFZUeLFTvp
oz9OF5N2/sVfFKfW82V4NPtSPmNTCuBEXql7sro4kbpwYJ336yhW+UmqE0FPI+nS
ncECMBVBwbMybpIOm+bxp7ExOOn3aGzzjw4LubIw6B8nJLLsTtyVeoZCn+P/vUM=
=0X8H
-----END PGP SIGNATURE-----

-- 
Feel free to contact me using PGP Encryption:
Key Id: 0x3AA70848
Available from: http://keys.gnupg.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org