假设有一个登陆页面。我需要能够计算来自 4 个不同 URL 的推荐数量。所以我可以稍后再回来看看每个人有多少。
有人可以告诉我如何做到这一点吗?
这可以通过使用数组和引用属性的 javascript 来完成,还是我必须使用 PHP
非常感谢您的帮助!
假设有一个登陆页面。我需要能够计算来自 4 个不同 URL 的推荐数量。所以我可以稍后再回来看看每个人有多少。
有人可以告诉我如何做到这一点吗?
这可以通过使用数组和引用属性的 javascript 来完成,还是我必须使用 PHP
非常感谢您的帮助!
I use Google Analytics for tracking statistics and referrals. You insert a small piece of JavaScript into your page with a ID number provided by Google. It's free and very effective.
Forget using any client side technology - that won't give you the ability to record the results in a central location (although you could use a client side technology in conjunction with a server side one, as Google Analytics does, but that would be complicated).
The simplest way would be to examine your log files, rather then start setting up another logging system altogether.
Something along the lines of:
grep "http://example.com/your/referer/here" /var/logs/apache/access.log | wc -l
… would probably do the trick.
Possibly with a bit more refinement should you want to check for specific dates.