title: get previous url before redirect
body: <p>I thought that if I used <code>document.referrer</code> I could get the previous url of  a pageview.</p>
  
  <p>Looks like this is the case when just browsing around pages within a site.</p>
  
  <p>We have a redirect set up via an ad platform. I was asked if I could track whether or not all traffic to the end result landing page are following this redirect as they should be.</p>
  
  <p>If the final page contains a parameter that I can listen for e.g. <code>?promo=via50</code> then <code>document.referrer</code> to to check the previous redirect URL.</p>
  
  <p>But I tried this and the result of <code>document.referrer</code> is just <code>""</code>.</p>
  
  <p>Is there a way to capture the redirect url?</p>
  
  <p>URL test case in question <a href="https://ad.doubleclick.net/ddm/trackclk/N120401.2134100VIARAIL/B9088936.125778075;dc_trk_aid=298696039;dc_trk_cid=67154314" rel="nofollow">here</a>. So I would like to return the referring url <code>"https://ad.doubleclick.net/ddm/..."</code> and can trigger the Javascript whenever someone lands on the final redirected page.</p>
  
  <p>Is this possible?</p>