Just bundle it in with the rest of JS payload with something like webpack. Individual calls to certain domains (GA, Heap, etc) might still get blocked, but the payload itself will be fine.
To me this is the primary challenge of outsourcing your client side tracking -- you risk a wholesale block of your analytics if the Segment file gets blacklisted.