npm install @retentioneering/datalayer @retentioneering/front-utils
import { getPersistIdStream } from '@retentioneering/front-utils'
const subscription = getPersistIdStream()
.subscribe(({ data }) => {
const { reteId, gaId } = data
// Do something ...
})
subscription.unsubscribe()
type PersistReteIdEvent = {
type: 'custom-event'
name: 'persist_rete_id'
data: PersistReteIdEventData
}
type PersistReteIdEventData = {
reteId: string
gaId?: string // Optional
}
Constant for persist_rete_id
event name.
Returns true
if value
is PersistReteIdEvent
.
Returns new PersistReteIdEvent
object.
Returns PersistReteIdEvent
stream.
For more details see here.
Emits new PersistReteIdEvent
event.