Analytics
2.7K members online now
2.7K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Javascript redirect messing up source of "thank you page"

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hey guys,

 

I've been at this problem for 2 days straight now:

 

I have an iFrame which sends a postMessage with content URL to the parent.

When the parent catches this message it redirects to the content of this URL. --> usually a thank you page.

 

Now when I look at the thank you page in analytics I get the source: "direct".

I want to change the source of the page to the page where the iFrame is located.

I tried sending out a pageView with: 

ga('send', 'pageview', URL I GOT FROM IFRAME);

before redirecting.. but this only tracks a pageView (and won't change the source).

 

Is this possible, and how would I have to approach this?

 

Thanks in advance and with kind regards,

 

Simon