[英]How to count visitor of one website from another website(which are on totally different domain)
I want to count the visitor of a website(which is located totally different domain) from my website.Just like Alexa is counting the visitor of all website . 我想从我的网站上算一个网站(位于完全不同的域名) 的访问者。就像Alexa计算所有网站的访问者一样。 How it can be done?
怎么做? Any idea or implementation please.
任何想法或实施请。 Thanks in advance.
提前致谢。
For all i clarify my question. 对于所有我澄清我的问题。
Suppose I want to count the visitor of www.yahoo.com. 假设我想算一下www.yahoo.com的访客。 The total number of visitor, per day or per month etc. I know this will be very easy if i am the owner of www.yahoo.com, but if i have no connection with www.yahoo.com, then is it possible to know their visitor or any statistics?
访问者,每天或每月等的总数。我知道如果我是www.yahoo.com的所有者,这将非常容易,但如果我与www.yahoo.com没有联系,那么是否可以了解访客或任何统计数据?
Alexa uses statistics from it's toolbar to estimate the number of visits on a website. Alexa使用其工具栏中的统计信息来估算网站上的访问次数。 I would suggest using an API such as the Alexa API in order to find out this information as opposed to gathering it yourself.
我建议使用诸如Alexa API之类的API来查找此信息,而不是自己收集它。
您可以使用document.referrer在客户端计算它们,然后如果先前的域与您的目标增量匹配,则存储在localStorage中的数字并使用AJAX将此数字标记回母舰。
if you want to make stat to your own visitors I use Some thing like This 如果你想为自己的访问者制作统计数据,我会使用像This这样的东西
Using javascript code like google 使用谷歌等javascript代码
when you register in google analytic you will have javascript code to add in your website this code will connect to google in any visit to site 当您在谷歌分析中注册时,您将在您的网站上添加javascript代码,此代码将在任何访问网站时连接到谷歌
or using 1 pixel image this image hosted on your website 或者在您的网站上使用此图像使用1像素图像
this image insert data to your visitor database Using Code Of Site 此图像使用站点代码将数据插入访问者数据库
Like 喜欢
if i have client and i want to collect information about his visitors 如果我有客户,我想收集有关他的访客的信息
i will add client to my clients in database 我将客户端添加到数据库中的客户端
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ id + client_key + client_name + client_email + client_website + STATUS +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 + any key + Test + Test@domain + http://www... + 1 +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
and use his primary key as forign key in 并使用他的主键作为forign键
visits table which contain 访问表包含
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ id + client_id + time + ip + referrer + systeminfo +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
and get image like 并得到像这样的图像
<img src='http://mywebsite.com/stat.php?cid=client+key' alt='' />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.