{"id":71,"date":"2009-07-16T20:28:54","date_gmt":"2009-07-17T01:28:54","guid":{"rendered":"http:\/\/gergltd.com\/?p=71"},"modified":"2009-07-16T20:28:54","modified_gmt":"2009-07-17T01:28:54","slug":"fixing-counterize-ii-when-stats-not-updating","status":"publish","type":"post","link":"https:\/\/www.gergltd.com\/home\/fixing-counterize-ii-when-stats-not-updating\/","title":{"rendered":"Fixing Counterize II When Stats Not Updating"},"content":{"rendered":"<p>I use the wordpress plugin Counterize II to track who visits my websites. \u00a0I recently noticed the plugin did not report any information for one of my sites. \u00a0At first I thought it was a database issue, but upon looking into it, this was not the case.<\/p>\n<p>I tried all sorts of methods to fix it: I deactivated and reactived the plugin, uninstalled and reinstalled the plugin, and messed around with the database tables. \u00a0None of these methods worked.<\/p>\n<p>As a last resort, I thought it could be related to the theme I was using since I had made some changes to it. \u00a0I double checked all the changes I made and they all seemed benign. \u00a0So, I began to look through the Counterize II code to see what function actually gets called to record the site hits and how it gets called.<\/p>\n<p>It turns out, that Counterize II gets called through a wordpress API hook. \u00a0Looking further into the problem, I realized that my theme never calls the function that is to invoke the hooks, specifically, the wp_head() function.<\/p>\n<p>After some more searching, I found <a href=\"http:\/\/josephscott.org\/archives\/2009\/04\/wordpress-theme-authors-dont-forget-the-wp_head-function\/\">this website<\/a> which helped me fix my problem. \u00a0For Counterize II to function, you have to have<\/p>\n<pre>&lt;?php wp_head(); ?&gt;<\/pre>\n<p>somewhere inside your &lt;head&gt; HTML section. \u00a0I added that line of code and Counterize II now works!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use the wordpress plugin Counterize II to track who visits my websites. \u00a0I recently noticed the plugin did not report any information for one of my sites. \u00a0At first I thought it was a database issue, but upon looking into it, this was not the case. I tried all sorts of methods to fix [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/comments?post=71"}],"version-history":[{"count":1,"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":72,"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/posts\/71\/revisions\/72"}],"wp:attachment":[{"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/media?parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/categories?post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gergltd.com\/home\/wp-json\/wp\/v2\/tags?post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}