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,