Hi team, hope you are doing well.
We have a GTM code (similar as the one described in this page: https://googletagmanagersolution.com/tracking-marketo-form-submissions-using-google-tag-manager/) and we would like to implement it into our Marketo Landing Pages Templates.
In order to do so, we think we need to modify the HTML code related to the LP template to apply it to all LP related.
We were wondering if there is a way to apply to all LP Templates (or a subset of them) at once and include that GTM code as default when new LP Templates are created.
Thanks.
Solved! Go to Solution.
When you update a landing page template, all the corresponding landing pages draw that change and get updated accordingly upon approving them (they go in draft mode when their respective template is updated). This is because LP assets are derived and based on their respective landing page template. However, you can't replicate that for LP templates, you'd have to make updates to all LP templates individually.
When you update a landing page template, all the corresponding landing pages draw that change and get updated accordingly upon approving them (they go in draft mode when their respective template is updated). This is because LP assets are derived and based on their respective landing page template. However, you can't replicate that for LP templates, you'd have to make updates to all LP templates individually.
Thank you. I wanted to validate that LP templates can't be updated at once with the code.
We have a GTM code (similar as the one described in this page: https://googletagmanagersolution.com/tracking-marketo-form-submissions-using-google-tag-manager/)
Sorry, but I don‘t see how that page shows in any way (let alone correctly) how to track success events for a Marketo form.
Placing the google tag manager code should not cover the tracking of the activity?
Thanks @SanfordWhiteman - Is there any official documentation? Searching on Google I only found posts here.
Like so:
MktoForms2.whenReady(function(readyForm){
const formId = readyForm.getId();
readyForm.onSuccess(function handleSuccess (submittedValues, thankYouHref) {
window.dataLayer.push({
"event": "mkto.form.success",
"mkto.form.id": formId,
"mkto.form.values": submittedValues,
"mkto.form.followUpUrl": thankYouHref,
"eventCallback" : function() {
document.location.href = thankYouHref
},
"eventTimeout" : 2000
});
return false;
});
});
As Sanford mentioned, this update needs to happen at the template level for each template that you'd like to update.
However, it IS possible to have one template that does "all the things" in Marketo and populates all the different use-case-specific layouts you use throughout the entire instance. If you've got a flexible enough template that can suit every use-case then something like this is possible by just updating the universal template in one place and thereby updating all the pages in one place.
It might also be worth mentioning that when you add the tracking script to your LP template and approve the template it'll kick your LPs in "Approved" status into the "Approved with Draft" status and you'll need to re-approve each page before the changes to the template are reflected on the live page.