Skip to main content

Hello!

Has anyone used Segment together with a PWA Source? My current set up has a React based website as Source and the Team is looking at offering an app-like experience in 2025. From what I understand, Page calls need some attention. And then there is offline activities that need looking into.

Can events from both regular website and PWA flow to the same single Javascript Source? If I do that, how can I tell regular web usage apart from PWA?

Another option would be to add a second Javascript Source. Prefer not to go down this path as I'll have to manage 2 copies of all the Destinations

Hey Ramanathan,

In general, we would recommend splitting out the sources so that you can better identify where they are coming from. If you really need to build out both the website and PWA flow as a single Javascript source, you can try adding a custom trait to the events that will help you differentiate between them.

As a quick question - is there a reason why you’ll need to have multiple copies of your destinations? Your schema setup should allow you to send data from multiple sources into a single destination. Which destinations are you looking to send data to?

Cheers,

Tyler


Hi Tyler. 

 

Thanks for looking into my question and providing a response. Apologies for not being clear on the “copies of destination” part. As you’ve described, if I have Mixpanel as a destination, I can configure JS Source 1 and JS Source 2 to send events to the same Mixpanel project. 

 

I still have to configure and maintain Mixpanel as destination in 2 JS Sources though. I need to replicate a change in 2 places and do that for every Destination I hook up. 

 

Agree that creating 2 JS Sources clearly separates events based on Source ID. If I don’t do that, I may have to introduce something like a Source ID as a custom trait. I was hoping that the PWA application will send events with Current URL being different to the regular website, and I can use that to build that custom trait. 

 

Regards,

Rama


Reply