Pardot Lead Integrator
usage:
import { submitLead } from 'pardot-lead-integrator'
submitLead('https://example.com/something', {
email: 'hodger@hodger24.gbr',
salutation: 'mr',
firstName: 'Jmoney',
lastName: 'Hodger',
company: 'Hodger GbR',
comment: 'Hodger4life',
jobTitle: 'Chief Hodger',
phone: '062216484940',
utm_name: 'name',
utm_term: 'term',
utm_soure: 'source',
utm_medium: 'medium',
utm_campaign: 'campaign',
}).then(() => console.log('success'), error => console.log(error))
The error is an object that contains keys which are invalid with the value false, e.g.
{
email: false,
comment: false,
}
if email
and comment
are invalid or not present.