Only track endpoint if an endpoint is set.

For compatibility with the V1 API layer.