forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: ukdenny on October 11, 2011, 04:35:09 pm

Title: Adding StatCounter
Post by: ukdenny on October 11, 2011, 04:35:09 pm
Hello people,

I am looking to add an invisible Stat Counter to my Coppermine pages but am unsure where to insert it. I normally just put it in the footer but cannot find the right overall page, I inserted it in the template html but the code showed on my live site.
I would appreciate any help.
Thanks.
Title: Re: Adding StatCounter
Post by: Αndré on October 11, 2011, 04:56:30 pm
What kind of code do you want to add? PHP or JavaScript?
Title: Re: Adding StatCounter
Post by: ukdenny on October 12, 2011, 05:06:29 pm
The code is actually html from statcounter.com, it's just a matter of copy and paste into the footer whichever it's called.
Title: Re: Adding StatCounter
Post by: Αndré on October 12, 2011, 05:08:03 pm
Without any further information it's impossible to help you. You should insert that code again to your template.html file and then attach it to your next reply, so we can see what exactly you've done.
Title: Re: Adding StatCounter
Post by: ukdenny on October 12, 2011, 07:52:02 pm
I have now added the script back into the template.html.
The code is:-
<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
var sc_project=2240995;
var sc_invisible=1;
var sc_security="8d42d868";
</script>
<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script>
<noscript><div class="statcounter"><a title="free web
stats" href="http://statcounter.com/free-web-stats/"
target="_blank"><img class="statcounter"
src="http://c.statcounter.com/2240995/0/8d42d868/1/"
alt="free web stats"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->

If you look at the url http://www.stardustbenidorm.com/photos
you will see my problem.
Thanks
Title: Re: Adding StatCounter
Post by: Αndré on October 12, 2011, 08:37:54 pm
I guess you used a WYSIWYG HTML editor to insert that code, as all special chars have been replaced with their entities. Please use a plain text editor (e.g. notepad) to insert the code.

Additionally you should upgrade your gallery to cpg1.5.16.
Title: Re: Adding StatCounter
Post by: ukdenny on October 13, 2011, 12:11:05 am
Thanks for your help, that worked fine.
Title: Re: Adding StatCounter
Post by: Αndré on October 13, 2011, 09:06:20 am
Then please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.