Re: Tracking form submissions in Google Tag Manager

emilia
Level 1

Tracking form submissions in Google Tag Manager

Hi Community, 

 

Can you please provide advice on how to add the Google Tag Manager to a Marketo TY page?

Mentioning that the page is guided, and that both the Registration and the TY page use the same landing page template.

 

We attempted adding the <!-- Google Tag Manager --> to the landing page meta tags (custom HEAD HTML) in the format below, but it did not work.

 

<!-- Google Tag Manager -->

<script>(.......................................................................);</script>

<!-- End Google Tag Manager -->

 

Also, is there anything to do on the GTM side, in order to track the submissions?

 

Thank you, 

Emilia

3 REPLIES 3
Chris_Wilcox
Level 9

Re: Tracking form submissions in Google Tag Manager

Hi Emilia,

 

What we have actually opted to do on Marketo LPs where we want to capture form fills is to code a GA Event right into the form submission. So basically, inside the form.onSuccess process, we've dropped some code like this: 

ga('send', 'event', { 
eventCategory: 'event_registration', 
eventAction: 'form-submit', 
eventLabel: 'event_registration'
});

 

Those Category, Action, Label fields are GA fields for events. Then we have our Goals in GA setup to watch for event category/action/label combinations to trigger certain goals to fire. 


In my experience, we've had trouble getting GTM to work exactly as I wanted it to on Marketo LPs, and opted for this approach instead as really all we wanted to accomplish was tag the form submission into GA.

 

Hope this helps!

Chris 

Tammy_Chan
Level 3

Re: Tracking form submissions in Google Tag Manager

Hi @Chris_Wilcox  will this work if we do not use Marketo Landing pages? We still use our CMS (sitecore) to build our landing pages and only use Marketo for the forms...

SanfordWhiteman
Level 10 - Community Moderator

Re: Tracking form submissions in Google Tag Manager

You can do this with embedded forms as well. The Forms 2.0 events are supported with embeds (if they weren't, I'd be in big trouble!).

 

However, Chris's code is incomplete. You must the GA hitCallback feature, or you will lose tracking.  You can search past Community posts to see my other comments on that.