title: Google Analytics & iFrame
body: <p>So I have a simple page and when a user clicks on a link an iframe opens. I am trying to use the </p>
  
  <p><a href="http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;answer=55527" rel="nofollow noreferrer">http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;answer=55527</a></p>
  
  <pre><code>pageTracker._trackPageview('/outgoing/example.com');
  </code></pre>
  
  <p>Inside the iframe - but it seems that its not working ? I have read this page </p>
  
  <p>code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#trackingIFrames</p>
  
  <p>And it seems that I use the "iframe.src = pageTracker._getLinkerUrl" to pass some cookie info to the iframe - the problem is that I want to track stuff INSIDE the iframe (i.e. such as events etc) and I get a "pageTracker is undefined" error.</p>
  
  <p>Do I need to include something like </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
      document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
      &lt;/script&gt;
  </code></pre>
  
  <p>inside the iFrame - to get the pageTracker to work. I take it that the "Publisher UA-XXXXX-X" ID will be passed via cookies and everything will work?</p>
  
  <p>Any ideas</p>