Skip to content

sharedVisitorSession

sharedVisitorSession(shared): VisitorSession

Makes a form share the visitor your page already has, instead of keeping a second one. Pass the result as the visitor of <EbitexForm>:

  • The form sends the page’s token and consent signals with each request, so a returning visitor is recognised in the form exactly as they are elsewhere on the page.
  • What the form’s responses say (a possibly new token, and whether recognition is granted) is handed back to the page’s visitor, which applies one set of storage rules: the token stays on the device only while recognition is granted.
  • VisitorSession.forget forgets the device everywhere (the form, the page, and what the device was linked to), not only in this form, and rejects if that fails so you can say so and let the visitor try again.
  • A consent change made through this session is made on the page’s visitor.

Without it a form keeps its own visitor, exactly as before. Nothing here needs an Audience key of its own: the key belongs to the page’s visitor object, which is the only thing that uses it.

SharedVisitors

VisitorSession