CounterizeII SQL fix (no stats gathered)

For those of you who are installing CounterizeII (stats plugin for WordPress) and wonder why the heck CounterizeII is not…counting, here’s the explanation: the plugin “installs successfully” but it doesn’t creates the SQL tables. I suppose this is happening because the script was coded in PHP4.

You should open phpMyAdmin for your database and execute the following SQL commands:

NOTE: your WP tables should have “wp_” (without quotes) as table prefix. If you installed WP with another prefix you should replace the “wp_” within each CREATE TABLE line.

CREATE TABLE `wp_Counterize` (
`id` int(11) NOT NULL auto_increment,
`IP` varchar(16) NOT NULL default 'unknown',
`timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`pageID` int(11) NOT NULL,
`refererID` int(11) NOT NULL,
`agentID` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `wp_Counterize_Keywords` (
`keywordID` int(11) NOT NULL auto_increment,
`keyword` varchar(255) NOT NULL,
`count` int(11) NOT NULL,
PRIMARY KEY (`keywordID`),
KEY `keyword` (`keyword`)
);
CREATE TABLE `wp_Counterize_Pages` (
`pageID` int(11) NOT NULL auto_increment,
`url` varchar(255) NOT NULL,
`count` int(11) NOT NULL default '1',
`postID` bigint(20) default NULL,
PRIMARY KEY (`pageID`),
KEY `url` (`url`),
KEY `count` (`count`)
);
CREATE TABLE `wp_Counterize_Referers` (
`refererID` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`count` int(11) NOT NULL default '1',
`keywordID` int(11) NOT NULL,
PRIMARY KEY (`refererID`),
KEY `name` (`name`),
KEY `count` (`count`)
);
CREATE TABLE `wp_Counterize_UserAgents` (
`agentID` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
`count` int(11) NOT NULL default '1',
`browserName` varchar(255) NOT NULL,
`browserCode` varchar(255) NOT NULL,
`browserVersion` varchar(255) NOT NULL,
`osName` varchar(255) NOT NULL,
`osCode` varchar(255) NOT NULL,
`osVersion` varchar(255) NOT NULL,
PRIMARY KEY (`agentID`),
KEY `name` (`name`),
KEY `count` (`count`)
);

This worked pefectly for me. I hope it helps! 😛

Leave a Comment

Your email address will not be published. Required fields are marked *