Write our users to Marketo as leads.

This commit is contained in:
Jake Moshenko 2016-10-13 13:48:35 -04:00
parent 013e27f7d5
commit f04b018805
11 changed files with 250 additions and 6 deletions

View file

@ -53,6 +53,26 @@ function(ApiService, CookieService, $rootScope, Config) {
}
}
if (Config.MARKETO_MUNCHKIN_ID && userResponse['marketo_user_hash']) {
associateLeadBody = {'Email': userResponse.email};
if (window.Munchkin !== undefined) {
try {
Munchkin.munchkinFunction(
'associateLead',
associateLeadBody,
userResponse['marketo_user_hash']
);
} catch (e) {
}
} else {
window.__quay_munchkin_queue.push([
'associateLead',
associateLeadBody,
userResponse['marketo_user_hash']
]);
}
}
if (window.Raven !== undefined) {
try {
Raven.setUser({