def _add_get_tracking_url(cls):
    """ Add a method to get the tracking url of an object. """
    def get_tracking_url(self):
        """ return url to tracking view in admin panel """
        url = reverse('admin:tracking_fields_trackingevent_changelist')
        object_id = '{0}%3A{1}'.format(
            ContentType.objects.get_for_model(self).pk,
            self.pk
        )
        return '{0}?object={1}'.format(url, object_id)
    if not hasattr(cls, 'get_tracking_url'):
        setattr(cls, 'get_tracking_url', get_tracking_url)