Statcounter Code
-
I added my blog to Statcounter.com for traffic to my blog. I copied it, but it doesn’t say where to post it on y page. Please, I’m very confused and I am not used to all of this. All I need to know is where to paste it on my page.
WP.com: Yes
Correct account: YesThe blog I need help with is: (visible only to logged in users)
-
Hi there,
Can you paste the code you’re trying to use here for me, please? Make sure to wrap the code in backticks, else it won’t save correctly.
I need you to do this so I can see what type of code is being used. Most third-party visit counters use JavaScript code, which isn’t allowed on WordPress.com for security reasons, so if your code also includes JavaScript, you won’t be able to use it on your WordPress.com site.
-
<div id="statcounter_image" style="display:inline;"><a title="Web Analytics Made Easy - Statcounter" href="https://statcounter.com/" class="statcounter"><img src="https://c.statcounter.com/12767485/0/ab9e1222/0/" alt="Web Analytics Made Easy - Statcounter" referrerPolicy="no-referrer-when-downgrade" /></a></div> -
Hi there,
Thanks for clarifying. That code seems just fine to use, but perhaps you are not clear on how to add it to your site.
In this case we recommend the HTML block (what you would have once called widgets) in your sidebar. This will show on all pages of your site and seems like the best place to add it.
You can do that by clicking on the Widgets tab here, and then adding the HTML block: https://wordpress.com/customize/
This is difficult to explain in words, so I recorded a quick video to show you how to add the HTML block with your code.
You can view the at this link: https://d.pr/v/pMqCU8
Hope that helps. Please let us know if you have any more questions.
-
Statcounter no longer works properly. WordPress are stripping the code so that you cannot see what posts have been clicked on. All you will get on Statcounter is the home page. It doesn’t matter what someone clicks on, it will only show as the home page (your blog URL). I had a long email conversation with someone at Statcounter a few months ago, and he even gave me a different code to try, but it was still the same, it gets stripped. WordPress strip the code even though the code is specifically for WordPress.com and doesn’t contain any Javascript. All you will get on Statcounter is the country of any visitor, but Worpdress stats show that anyway. Once you have added your code in the widgets and saved it, if you go back to it, you will see it has changed. I just thought this was worth mentioning for anyone else thinking of using Statcounter. It used to work but doesn’t any longer. Perhaps staff could tell us why they are stripping the code?
-
This is the code given by Statcounter (I have removed my security numbers only)
<div id=”statcounter_image” style=”display:inline;”><a
title=”Web Analytics” href=”https://statcounter.com/”
class=”statcounter”><img
src=”https://c.statcounter.com/”
alt=”Web Analytics”
referrerPolicy=”no-referrer-when-downgrade” /></div>And this is the code after WordPress have stripped it (again I removed my numbers only)
-
-
- The topic ‘Statcounter Code’ is closed to new replies.