@classmethod
def email_open_rate(cls, user_id, campaign_id=None):
    """Get email open rate"""
    if campaign_id:
        return cls.get_count(cls.objects.filter(data__sender_id=str(user_id
            ), data__type='email', data__campaign_id=str(campaign_id)))
    return cls.get_count(cls.objects.filter(data__sender_id=str(user_id),
        data__type='email'))
