Merge pull request #1982 from jakedt/marsquito

Write our users to Marketo as leads.
This commit is contained in:
Jake Moshenko 2016-10-14 16:30:03 -04:00 committed by GitHub
commit 95ced00457
12 changed files with 253 additions and 10 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({