'Update the isActive flag in mailchimp for activated users.'

def _track_activation(self):

    has_segment_key = getattr(settings, 'LMS_SEGMENT_KEY', None)
    has_mailchimp_id = hasattr(settings, 'MAILCHIMP_NEW_USER_LIST_ID')
    if (has_segment_key and has_mailchimp_id):
        identity_args = [self.user.id, {'email': self.user.email, 'username': self.user.username, 'activated': 1}, {'MailChimp': {'listId': settings.MAILCHIMP_NEW_USER_LIST_ID}}]
        analytics.identify(*identity_args)
