Hey Marketo Nation ( and Sanford Whiteman),
I've seen some threads about tracking forms via GTM and would like some clarification. Before getting some clarification, here is my problem I'm trying to solve.
I have marketo landing page with a form on it and once completed, a user receives the ebook they requested. When trying to track via GTM, I'm trying to create a datalayer.push to see what I can use to create a tag. But I can't even figure that out yet because when I'm testing, the page doesn't open up a new tab and I'm unable to see what data is being pushed in GTM's debug mode.
So my first problem is, how can I have a form completion open up a new tab? Do I embed this script in the HTML?
MktoForms2.loadForm("//app-sj11.marketo.com", xxx-xxx-xxx", 3949);
thankYouWindow = window.open('');
thankYouWindow.document.location = followUpUrl;
If yes, is there a recommended spot to place it?
Secondly, once that's working should I create a data layer push like this (for example):
window.dataLayer = window.dataLayer || ;
OR have a script like this (that's either on the page or fired through GTM):
form vals tyURL
document location href tyURL
Thanks in advance!
Hi Sanford....thanks for getting back to me and apologize for the dumb question, but what do you mean by "Pls syntax-highlight *all* the code blocks."?
I mean you highlighted the 3rd bit of code (the) but not the other 2. Please make them all readable.
I guess to start off, I'd like the form to open a new tab after a user provides their info. Here is the test landing page: Cadence
Please excuse the coding....I know it's terrible and I was not responsible for creating our templates.
Again, thanks and I really appreciate any assistance!!