捕获谁点击从网站到网站B的链接? [英] Capture who clicked a link from Website A to Website B?

查看:80
本文介绍了捕获谁点击从网站到网站B的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个网站叫做网站,它有它到其他网站的一些链接。其中一个环节可能是B.网站的链接有没有一种方法,使用一些现有的解决方案,开源,或者你必须为此付出代价,你可以跟踪谁,什么,在哪里,等点击该链接从网站去A到网站B?

Assume I have a website called Website A and it has some links on it to other websites. One of these links could be a link to Website B. Is there a way, using some existing solution, open source, or something you have to pay for where you can track who, what, where, etc clicked the link to go from Website A to Website B?

网站B可以和#1我的网站是www.websiteA.com,所以在我的网站,我有一个链接www.stackoverflow.com。如果用户点击www.stackoverflow.com从我的网页,我想捕捉信息,如姓名,电话等(不知道如果我能做到这一点,除非用户实际登录到我的网站)。在这种情况下,这是一个在任何地方任何人都可以访问公共页面。如果我无法从我的网站做,有没有办法,我可以告诉计算器,这个特定的人点击我的链接到你的网站,我需要他们的信息。

Website B could be Stackoverflow and my website is www.websiteA.com, so on my website, I have a link to www.stackoverflow.com. If a user clicks on www.stackoverflow.com from my page, I want to capture information, such as name, phone, etc (not sure if I can do this unless the user is actually logged into my website). In this case, this is a public page which anyone from anywhere can access. If I can't do it from my website, is there a way I can tell stackoverflow that this particular person clicked on my link to get to your website and I need their information.

推荐答案

大多数网站使用这种方法是有一个脚本在您的网站处理重定向。因此,而不是直接链接其事:

The method most sites use for this is to have a script on your site handle the redirect. So instead of the link being directly to:

http://websiteB.com

的链接去是这样的:

http://websiteA.com/link/websiteB.com

链接脚本登录请求,然后将它们转发到地址(这应该是瞬间完成,不给他们一个在3秒内转发你网站B!页)。

The "link" script logs the request and then forwards them to the address (this should be done instantly, don't give them a "forwarding you to Website B in 3 seconds!" page).

请注意,作为的访问者的到您的网站,我更preFER其中链接的目​​标是显而易见的,当我将鼠标悬停在链接上,而不是某些网站使用那里的方法的方法你看到的是一个id。我的意思是,而不是链接是一些像:

Note that as a visitor to your site, I much prefer a method where the link's destination is apparent when I hover over the link, as opposed to the method that some sites use where all you see is an id. What I mean is, instead of the link being something like:

http://websiteA.com/link/websiteB.com

他们不是有这样一个链接:

they instead have a link like:

http://websiteA.com/link/483

显示目的地可以在几个方面来实现。一种方法是像我如上所述,这里的目的地是查询字符串的一部分的东西。另外,您也可以使用一些JavaScript这一点。状态栏的价值可以用JavaScript通过设置对window.status 变量被改变,但许多浏览器prevent这在默认情况下(火狐等)。

Showing the destination can be achieved in a few ways. One way is something like I described above, where the destination is part of the query string. Alternatively, you can use some Javascript for this. The status bar's value can be changed with Javascript by setting the window.status variable, but many browsers prevent this by default (Firefox, for example).

谷歌已经通过实际使用JavaScript来修改链接而不是在状态栏中发现了一个鬼鬼祟祟的方式解决这个问题。当加载页面时,在结果列表中的链接去他们的实际目的地,但每一个环节都有一个 onmousedown事件 JavaScript事件,当你点击它,改变的链接。您可以在行动中右键点击一个链接上看到这一点。当你这样做,将鼠标悬停在链接现在将显示在状态栏,而不是结果真实URL真正的目的地(谷歌的点击跟踪脚本)。

Google has found a sneaky way around this problem by actually using Javascript to change the link instead of the status bar. When the page is loaded, the links in the results list go to their actual destinations, but every link has an onmousedown javascript event that changes the link when you click on it. You can see this in action by right-clicking on a link. After you've done that, hovering over the link will now show the true destination (Google's click-tracking script) in the status bar instead of the result's real URL.

当然,与任何方法显示的信息可能是在那里我居然将被发送的misre presentation,但我还是preFER过来看到一个毫无意义的ID号。

Of course the information displayed with any method could be a misrepresentation of where I'm actually going to be sent, but I still prefer it over seeing a meaningless id number.

这篇关于捕获谁点击从网站到网站B的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆