Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Tracking Marketo Form Submit via DTM

Avatar

Level 3

This seems like it should be pretty straightforward.... a good portion of AEM customers must be using marketo and wanting to track form submits but I can't find any documentation.

I have marketo forms embedded on several pages of my website, and I'd like to track how many form fills have occurred on any page each week. I used a standard marketo embed code (only edited for look n feel).

Support has been telling me that I need an event based rule (what would trigger this and what should be the outcome?). Somehow, it calls a direct call rule that adds to my "form complete" event each time the form is submitted (what triggers the direct call and what is the outcome?). At this point, I'm not as worried about people who are filling out the form and submitting it while it's incomplete.... I just need more reliable numbers that match what I an see in marketo.

Can someone suggest what should be in each field of the Event Based Tag & the Direct Call Tag? I have no idea where to start....

1 Accepted Solution

Avatar

Correct answer by
Level 1

You can leverage the marketo api to do something like this...

<script type="text/javascript">

    MktoForms2.whenReady(function (form) {

      // Add an onSubmit handler

      form.onSubmit(function(){

          // set function calls here, for example to fire google analytics or adobe analytics tracking

          _satellite.track('mrktoFormSubmit');

      });

  });

</script>

View solution in original post

3 Replies

Avatar

Former Community Member

http://developers.marketo.com/javascript-api/forms/api-reference/ … look at the onSuccess method. You could probably use an Event Based Rule’s custom Event Type with this and then use _satellite.track("your direct call rule String value"); in a Sequential JavaScript Tag. I say “likely“ because this is on my long list of things to do myself.

Avatar

Correct answer by
Level 1

You can leverage the marketo api to do something like this...

<script type="text/javascript">

    MktoForms2.whenReady(function (form) {

      // Add an onSubmit handler

      form.onSubmit(function(){

          // set function calls here, for example to fire google analytics or adobe analytics tracking

          _satellite.track('mrktoFormSubmit');

      });

  });

</script>