Browser Tracker : Collector URL not hitting

I am following browser-tracker documents to run trackPageView event but I could not able to hit the collector URL. when curl is OK
below is the code, can anyone tell me what is the issue?

import { newTracker, trackPageView } from “@snowplow/browser-tracker”;
newTracker(‘sp1’, ‘’, {
appId: ‘my-app-id’,
platform: ‘mob’


Try the endpoint without the protocol in the tracker configuration:

newTracker(‘sp1’, ‘’, {...

Nothing is screaming out at me as incorrect here. Are there any CORS errors for that endpoint in your developer console, or anyother errors/warnings that look relevant?

I am running on local system via Node js and there are no any error.

Thanks for the reply but I have tried this option by removing http or https protocal but still not hitting the collector url.