Segment.com and Marketo tracking? | Adobe Experience League Community
Skip to main content
November 21, 2016
Question

Segment.com and Marketo tracking?

  • November 21, 2016
  • 1 reply
  • 1484 views

Hey all,

I recently started embedding Marketo forms into our website, and noticed that this stops triggering the "identify" event in Segment. I want to be able to see all events in Segment, as we are passing this over to a data warehouse.

Has anyone come across this issue, and if so, what was the workaround?

thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
November 22, 2016

You need to run identify in the onSuccess of a Marketo form. If you're deduping on Email, then you can use the email address as submitted:

MktoForms2.whenReady(function(form){

  form.onSuccess(function(vals,tyURL){

   analytics.identify(

    vals.Email, // id

    {

     name: vals.FirstName + ' ' + vals.LastName,

     email: vals.Email

    }, // traits

    {}, // options

    function(){

     document.location.href = tyURL;

    } // hit callback

    );

    return false;

  });

});

While Email is not ideal, true database-level identifiers like the Lead ID are harder to access in this context for technical reasons. You should augment the session with the lead ID when it is available (that step is outside of the scope of a Community post, I'm afraid).