Show certain screen at beginning of every session (Reactive)
Application Type
Reactive
Service Studio Version
11.14.5 (Build 57418)
Platform Version
11.13.2 (Build 32392)

I am working on an application with confidentiality requirements. The business would like all users to see a policy screen when they first enter the site, every time they visit.  That means even if they bookmark a different page, they'll be directed to the policy screen at the beginning of the session.

I've so far tried setting and getting a cookie and also tried doing a redirect at application start when the URL isn't the base URL.

Maybe I implemented these incorrectly, or maybe there's another solution.  Any help would be appreciated.

Thanks.

Solution

Hi Gaius,

use a client variable to mark if the user already visited the policy screen.

Create a block checking if that variable was already read and put the block on every screen. If the variable is false redirect the user to the policy screen. Don't forget to set the variable to true when he visits policy screen.

Regards

This is exactly what I needed. I knew I was missing something, Client Variables.

I've got it working now. Thank you!

mvp_badge
MVP

Hello Gaius.

You answered your own question.  Set a session variable saying if the user already saw the page.

On every page check it. If False, redirect to the page (with a parameter saying where from so the user can return after agreeing).

If True, stay in current page.

Solution

Hi Gaius,

use a client variable to mark if the user already visited the policy screen.

Create a block checking if that variable was already read and put the block on every screen. If the variable is false redirect the user to the policy screen. Don't forget to set the variable to true when he visits policy screen.

Regards

This is exactly what I needed. I knew I was missing something, Client Variables.

I've got it working now. Thank you!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.