click-tracking

Is there a simple, universal outbound click tracking method for JQuery / Javascript?

让人想犯罪 __ 提交于 2019-12-11 23:51:53
问题 I'm looking for a way of tracking all outbound clicks from a web page using Javascript/ JQuery without modifying any of the existing page code. The solution must work with frames, iframes, content from different domains, AJAX etc. Perhaps, Javascript is the wrong technology for a universal solution. If so, please let me know what would be better. 回答1: It's easy enough to capture all clicks on external links. $(document).ready(function() { $("a[@href^=http]").each(function(){ if(this.href

Detect Click into Iframe using JavaScript

我的未来我决定 提交于 2019-11-25 23:59:28
问题 I understand that it is not possible to tell what the user is doing inside an iframe if it is cross domain. What I would like to do is track if the user clicked at all in the iframe . I imagine a scenario where there is an invisible div on top of the iframe and the the div will just then pass the click event to the iframe . Is something like this possible? If it is, then how would I go about it? The iframes are ads, so I have no control over the tags that are used. 回答1: Is something like this