Disable mailchimp integration for most segment identify requests

This commit is contained in:
Bill DeRusha
2016-02-17 13:40:36 -05:00
parent f58c2cd6b0
commit b686abc18d
4 changed files with 47 additions and 13 deletions

View File

@@ -5,10 +5,21 @@
// We can't use JQuery's on load method because it
// screws up RequireJS' JQuery initialization.
var onLoadCallback = function() {
analytics.identify("${user.id}", {
email: "${user.email}",
username: "${user.username}"
});
analytics.identify(
"${user.id}",
{
email: "${user.email}",
username: "${user.username}"
},
{
integrations: {
// Disable MailChimp because we don't want to update the user's email
// and username in MailChimp on every page load. We only need to capture
// this data on registration/activation.
MailChimp: false
}
}
);
};
if (window.addEventListener) {
window.addEventListener("load", onLoadCallback, false);