Sync Lead

Last Updated: 30 Apr 2016

Sync Lead refers to the synching of collected user data to a Marketo service.

In order to push data to Marketo, a Marketo Bridge must be created and the Marketo Settings     configured. For more information, refer to the Marketo Bridge chapter in this manual.

The Sync Lead API can be enabled in the Sync Lead API Settings section of the Marketo Bridge.

The following example code will sync lead to Marketo using the Sync Lead API, specifying 'FirstName' and 'LastName' attributes.

Please note that this example assumes that the jQuery JavaScript library is available in the code and that the Marketo Cookie is already set for the current user. Refer to the Marketo Cookie chapter for more information. 

<script type="text/javascript">
$.post("https://matrix.squiz.net/releases/archived-releases/5.1/5.1.13.1?action=syncLead",{"FirstName" : "Test", "LastName" : "User"}, function( data ) {
console.log(data); }, 'json');
</script>

Note: 1234 is the asset id of the Marketo Bridge asset.
The Sync Lead API only accepts POST requests. 

If an 'Email' attribute is required to be synced to Marketo, the email must be verified for the session, or a trusted email source specified in the Marketo Bridge. For more information, refer to the Verifying a User's Email Address chapter.

The Allowed Attributes setting on the Marketo Bridge allows you to specify the attributes to sync with the Sync Lead API. 

Alternatively, you can Sync Lead using the Marketo Sync Lead submission action on a Custom Form Page. For more information on this submission action, refer to the Form Contents chapter in the Custom Form manual.

Please note that the Sync Lead API and the associated form submission action have a default daily limit of 10,000 requests, imposed by Marketo. The Munchkin API is a recommended alternative for larger scale sites with greater tracking needs