PathmonkHelp
Help/CRO/Display & targeting/Showing or hiding Pathmonk for logged-in visitors

Showing or hiding Pathmonk for logged-in visitors

CategoryCRO › Display & targeting
CreatedNov 27, 2026
UpdatedNov 27, 2026

If your website has a login, you may not want micro-experiences to show to people who are already customers and are working in your product, where they get in the way. You can tell Pathmonk when a visitor logs in and when they log out, with a CSS class or with a JavaScript function. Both need the Pathmonk snippet on the page.

Option 1: add a CSS class

Add the class to your login and logout buttons. Pathmonk reacts to the click on desktop and to the tap on mobile.

CSS classWhat it does
pathmonkLogInUserStops showing micro-experiences to that visitor
pathmonkLogOutUserShows micro-experiences again

Example:

<button class="pathmonkLogInUser">Log in</button>
<button class="pathmonkLogOutUser">Log out</button>

If the button already has classes, add the Pathmonk class to them.

Option 2: call a JavaScript function

JavaScriptWhat it does
Pathmonk.logInUser();Stops showing micro-experiences to that visitor
Pathmonk.logOutUser();Shows micro-experiences again

Call it from your own code, for example when your login succeeds:

<script>
  if (window.Pathmonk) { Pathmonk.logInUser(); }
</script>

Or put it in a link:

<a href="javascript:Pathmonk.logInUser()">Log in</a>

The names are case sensitive: logInUser and logOutUser, with a capital I, O and U.

Check that it works

  1. Publish the change on your website.
  2. Log in. Micro-experiences should stop showing while you browse.
  3. Log out. Micro-experiences should show again as usual.

If nothing changes, check that the Pathmonk snippet is on the page and that the class or function is spelled exactly as above. See Is Pathmonk not connecting to your website?.

Other ways to keep Pathmonk off parts of your site