Segment.com and Marketo tracking?

Anonymous
Not applicable

Segment.com and Marketo tracking?

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!

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Segment.com and Marketo tracking?

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).