how to accurately get referrer in actionscript widget -


I have an embed widget. For each impression, I want to track the referrer (on the page where the widget is embedded on). Right now I am using ExternalInterface to use javascript to check window.location.href, however, I think most of the time I am unable to set reference.

Is there a better way to do this? Or maybe I'm not using JavaScript to get the reference?

Thank you!

I do not think you can get it directly in this way. There are some options I can think of:

  1. Obtain referrer from your web server HTTP logs, for example, Apache logs referrer information by default.
  2. People have to include some referral codes in their widget request, so that you can identify where it came from.
  3. Widgets back to your server ... I think this request is pointing to the HTTP Referrer field where it is embedded
  4. Some such [spramm] Use [1] when it's requested to your server to embed itself in the actual SWW ... but it can have a lot of performance overhead.

Comments