def METHOD_NAME(f):
    """
    Only runs a decorated function if analytics is enabled and swallows the errors
    """
    @wraps(f)
    def inner_function(*args, **kwargs):
        try:
            if not settings.disable_analytics:
                return f(*args, **kwargs)
        except BaseException as e:  # NOSONAR
            try:
                analytics.track("tracking error", {"error": str(e)})
            except BaseException:  # NOSONAR
                pass
    return inner_function