Extension website statistics
I want to create an extension that can keep a count of the websites that I visit and the number of times I visit each website.
I dont want t ouse the history API in order to get the statistics. I have tried the onUpdated event listener it just keeps on storing the websites whenever I shift tabs.
How can I do this ?
开发者_Go百科background.html :
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
if(changeInfo.status == "complete")
console.log(' url: ' + tab.url + ' change: ' + changeInfo.url);}
});
Create a google extension which adds a javascript counter to every page and then callback a server which collects the analytics data from the counter. Then you can use that database to create a website that can report on that data. I am just a newbie on this.
精彩评论