Web CEO tracking code
Web CEO tracking code
We use Web CEO for web statistics and I have to insert a snippet of code before the </body> tag. I am using the Competition template. Where or how do I place the code? Thanks.
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Web CEO tracking code
I presume you mean the "Coffee Cup" template, which is stored in a folder named "competition".... That template has a file named index.tpl... Look toward the bottom of the file for the </body> tag.
In a perfect world, you would first copy all files to a new folder of its own, then edit the file in that new folder named info.txt, giving the template a new name, such as "Modified Coffee Cup". Doing this will prevent any of your modifications from being overwritten if/when you upgrade serendipity as the coffee cup/competition is included in each full serendipity release.
In a perfect world, you would first copy all files to a new folder of its own, then edit the file in that new folder named info.txt, giving the template a new name, such as "Modified Coffee Cup". Doing this will prevent any of your modifications from being overwritten if/when you upgrade serendipity as the coffee cup/competition is included in each full serendipity release.
=Don=
Re: Web CEO tracking code
Depending on the "nature" of the code snippet, you might also have to do something to it which is called "escaping". Files like index.tpl are Smarty files. The code of your snippet might include characters which are reserved in Smarty, most likely { and }. This would i.e. happen if your code snippet was a piece of Javascript (which a lot of tracker codes are).
If that's the case, replace instances of { in your tracking code with {ldelim} as well as instances of } with {rdelim}. If you're unsure, you can post your tracking code here.
YL
If that's the case, replace instances of { in your tracking code with {ldelim} as well as instances of } with {rdelim}. If you're unsure, you can post your tracking code here.
YL
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Web CEO tracking code
Thank you both for great advice. It works great!