Service worker is only working on editor preview

I have set up a worker on my account, it sends log data on another endpoint.
the worker is working in editor, but when I deploy, it’s not sending data on the endpoint.
*I have added routes

  1. .domain.com/
  2. domain/*

Have you defined https:// or http:// on the route?

domain.com/* not the same as domain.com

Add domain.com too.