# Is it possible to track third-party clickthroughs via a fram

**URL:** <https://www.ruby-forum.com/t/is-it-possible-to-track-third-party-clickthroughs-via-a-fram/104910>\
**Category:** Rails\
**Created:** [May 23, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-track-third-party-clickthroughs-via-a-fram/104910 "2007-05-23T19:49:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 23, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-track-third-party-clickthroughs-via-a-fram/104910/1 "2007-05-23T19:49:49Z")

</div>

Does anyone know if the following is possible with a framed page?  
Basically, we would frame a web page allow the user to navigate to  
third party sites. Every time the user clicks through to links within  
that other site, our framing site would somehow receive an AJAX click-  
through with the URL that was clicked on. In this way, we would be  
able to track where users go through the framed page.

This could obviously be done by first pulling the third party site and  
replacing the links with re-directs that are then captured on click-  
through. However, I don’t want to do that because (1) it’s intensive,  
slow and could break links, and (2) it may upset the third party site  
and create a copyright issue.

Any thoughts are greatly appreciated!

Gary

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 23, 2007, 9:28pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-track-third-party-clickthroughs-via-a-fram/104910/2 "2007-05-23T21:28:03Z")

</div>

I’m no expert at this type of thing, but I would check to see if you  
can capture an onclick event from the frame/iframe. If you can’t do  
that then I’m guessing you can’t do it easily, although maybe you  
could put a transparent absolute-positioned block over the whole frame  
and capture the click then retransmit it through, but that might be  
really tricky and buggy.
