Hi Everybody have a few questions

Hi Everybody have a few questions regarding Zaraz and Managed components: 1) I noticed the information regarding managed components was last posted in 2022, is this something that is still maintained? 2) for the managed components, does the manager support listening to all standard javascript events? (the typescript types only show the ones attached to this screenshot) more importantly; I will like to generate my own device identifier in a CF worker and persist those through cookies, ideally before Zaraz sends the default pageview. I know that worker variables run after Zaraz events are invoked, but is there another option available involving a worker that would work together w Zaraz but be invoked before it fires the pageview?
No description
3 Replies
Mackenly
Mackenly2mo ago
1. Managed Components are alive and well. 2. The manager only listens to what you tell it to and it only listens to events that are fired. Firing those events is up to you via zaraz.track(). 3. I wouldn't recommend using the default pageview event for this. Instead, generate and set your unique id on pageview with zaraz.set() and then use a different pageview trigger to start your tracking logic (ideally delayed until after your page loads to help with perf)
adeola13.
adeola13.OP2mo ago
thank you!! Regarding point number 3: are you suggesting to basically use a different custom tracking event named Page or something else to send the events? Or would it be best to disable the default pageview, and then use the zaraz.spagePageView event? Lastly; I know managed components run on workers basically. Can I use those managed components to send messages to a consumer queue natively? Push based essentially? @Mackenly
Mackenly
Mackenly2mo ago
It would depend on your implementation, but yes. Yeah, just so you for sure have that set before you send off actions that need it. A few ways you could do that though.

Did you find this page helpful?