Piwik integration doesn't work on LOCALHOST

I have been trying to test piwik on my local server using Wampserver. But the piwik javascript that I am using cannot record any statistics. I even tried switching the url in the javascipt code from LOCALHOST to but it doesn’t seem to work. Can anyone please help me out here?