discrepancy b/w the no of unique visitors reported in Google Analytics and custom visitor counter

I implemented a custom unique visitor counter to my website developed in Codeigniter. The visitor counter is based on cookies similar to the following link http://webeasystep.com/blog/view_article/how_to_build_unique_visitors_counter_with_codeigniter

My cookie expiration time is 30 mins. When I compare my custom counts with Google analytics counts there is a large difference.

Can someone help me out to address this problem?

Hi @ratest789,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the Project Development Help board. No action is needed on your part; you can continue the conversation as normal here.

Let me know if you have any other questions or if I can help with anything else.