dennis800121 Posted July 25, 2015 Report Share Posted July 25, 2015 Help!!I would love to have a visit counter on my page. I have been using googles analytics but i dont like it.I found statcounters counter and got the code that i want to put in the footer.php but the code is in HTML and not PHP.How do i solve this? I just want a counter on the bottom on my page The code i got from statcounter is this:#####################################################<!-- Start of StatCounter Code for WordPress (either .com or .org) --><script type="text/javascript">var sc_project=10544563;var sc_invisible=0;var sc_security="b635080d";var scJsHost = (("https:" == document.location.protocol) ?"https://secure." : "http://www.");document.write("<sc"+"ript type='text/javascript' src='" + scJsHost+"statcounter.com/counter/counter.js'></"+"script>");</script><noscript><div class="statcounter"><a title="shopify analytics ecommercetracking" href="http://statcounter.com/shopify/" target="_blank"><imgclass="statcounter" src="http://c.statcounter.com/10544563/0/b635080d/0/"alt="shopify analytics ecommerce tracking"></a></div></noscript><!-- End of StatCounter Code for WordPress (either .com or .org) -->#####################################################Please, can someone help me! Quote Link to comment Share on other sites More sharing options...
mahesh Posted July 25, 2015 Report Share Posted July 25, 2015 Just paste it at the end, without the ####, of course.I tried it in my template footer and the code works. Quote Link to comment Share on other sites More sharing options...
dennis800121 Posted July 25, 2015 Author Report Share Posted July 25, 2015 It worked. I was afraid it would brake my site. But the counter doesnt show in the footer. Quote Link to comment Share on other sites More sharing options...
Hiraeth Posted July 25, 2015 Report Share Posted July 25, 2015 How did it work if the counter didn't show in the footer?It should be inserted before </td> </tr> </table> At the end of the footer.php. That's where it is on my template8 site. Quote Link to comment Share on other sites More sharing options...
dennis800121 Posted July 27, 2015 Author Report Share Posted July 27, 2015 Thank you both! It works now!! Quote Link to comment Share on other sites More sharing options...
Robert Newman Posted August 16, 2015 Report Share Posted August 16, 2015 I am using template 12, I have added a counter by following your replies above but not in the footer. I couldn't see how to enter it in the footer, any ideas please Quote Link to comment Share on other sites More sharing options...
Hiraeth Posted August 17, 2015 Report Share Posted August 17, 2015 I am using template 12, I have added a counter by following your replies above but not in the footer. I couldn't see how to enter it in the footer, any ideas pleaseIn the Template12 footer.php, you need to add the StatCounter code immediately after the following: <?php $flags['basicfooter'] = true; echo tng_footer($flags); ?> Quote Link to comment Share on other sites More sharing options...
Jon @ HPx Posted March 4 Report Share Posted March 4 I have used StatCounter on different sites in the past. I would like to add it to my tng site, template 21. I've followed the suggestions in this thread, but the counter doesn't seem to work. I've added it to both the footer.php that comes with the basic install and the footer.php in the template folder. (Not quite sure yet which one is the one that is active.🙂) So I must be missing something or doing something wrong. Help, please. TIA Quote Link to comment Share on other sites More sharing options...
Jon @ HPx Posted March 4 Report Share Posted March 4 On further testing, I have found it does count (unless the browser blocks the tracker) but it isn't visible. I'm okay with it not being visible, but I will continue to work on it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.