Marketers are often facing the challenges of associating data between CRM, MA (Marketing Automation), and Web anonymous customer tracking data. Marketers need the ability to track the complete customer funnel, and measure the end-to-end marketing campaign ROI.

With Treasure Data and Marketo Forms, tracking the complete customer journey is done by embedding a couple of JavaScript codes into your landing pages.


This topic includes:

Prerequisites

  • Basic knowledge of JavaScript and HTML

  • Basic knowledge of Treasure Data

  • Basic knowledge of Treasure Data JavaScript SDK

Tracking Marketo Forms Submission

Marketo Forms is commonly used to capture website leads.

The following JavaScript snippets will capture the events when web visitors submitted the forms, and record these events into Treasure Data. Because all the form values are also recorded, you can now associate Cookie ID (td_client_id (1st part cookie) or td_global_id (3rd party cookie)) with Email addresses.

  1. The APIKEY can be retrieved from the TD Console’s profile page. It’s recommended to use write-only API key for SDKs. Each event runs asynchronously.

  2. By calling the MktoForms2.loadForm() function, marketers can embed the forms created by Marketo.


<script type="text/javascript">
MktoForms2.loadForm(
  "<Marketo Instance URL>",
  "<Munchkin ID>",
  "<Form ID>",
  function(form) {
    // Marketo Form load callback
    form.onSubmit(function() {
      // Marketo Form submit callback.
      var td = new Treasure({
        writeKey:"<YOUR_WRITE_ONLY_APIKEY_IS_HERE>",
        database: "<DATABASE_NAME>"
      });
      var form_vals = form.vals();
      td.trackEvent("<TABLE_NAME>", form_vals); // Track form submit into TD table
    });
  }
);
</script>



  • No labels