This is a function that we use extensively across our pages and it seems to have been removed recently. Some context to our requirement:
In the landing page editor, if a form follow-up page is set using Follow-up type > Landing Page > ThankYou Page, or Follow-up Type > External URL > Absolute Path URL when the form is used Google Analytics will reset the submitter's session, removing any referral or source/medium information. The session reset may not affect all users, it's a side-effect of the type of cross-domain tracking we've had to use to maintain sessions between Marketo landing pages and our main websites.
By setting a thank you page with a relative path (Follow-up type > External URL > Relative Path URL) we are able to prevent Google Analytics from restarting a submitter's session. This was possible until not long ago so we are hoping relative paths can be allowed again. Our active pages are all using relative URLs right now, it's only when we try to change them do we receive an error.
Any other ideas on the above problem would also be much appreciated.
Solved! Go to Solution.
Let me know. In any case, there's an easy JS workaround using the Forms 2.0 API.
I tried a dummy token with the default value set to a relative link, all seems to be working fine.
Thank you for the clever solution!
Glad it worked! Definitely an unintended regression, I'd think. Maybe broken while fixing the ability to use tokens (which is why I pointed to that to try).
Just an update on this issue.
The 'dummy token trick' works well for our landing pages hosted on Marketo, but unfortunately it doesn't work for embedded forms as tokens cannot be used. Because of this the embedded forms on our sites are still resetting Google Analytics sessions, so a user that fill out a form is recorded as just a single view of the thank you page.
Really hoping Marketo will allow relative paths in future.
var loc = document.createElement('A');
loc.href = tyURL;
document.location.href = loc.pathname + loc.search + loc.hash;
You seem to really knowledgeable about URL capture and landing pages in general so this might be a very simple question. I am basically trying to create form that is being embedded on a web page called get-started but the form should automatically redirect to a relative 'thank you' page that one level down in the hierarchy 'get-started/thank-you' . How do I setup a redirect to a relative page on the website that this form is located on?
the form should automatically redirect to a relative 'thank you' page that one level down in the hierarchy 'get-started/thank-you' .
Answering on your new thread.