Hi there! Julianne from Mixpanel Support here.
Diving right in, neither JS SDK is a good fit for Workers. Instead, you should send events directly to our /import API. The main reason is that the browser SDK expects browser-specific APIs like window, document, and browser storage, which aren’t available in the Workers runtime. Our Node SDK isn't a clean fit either- it leans on Node APIs that Workers don't fully provide.