Show/not show Pathmonk to logged-out/logged-in visitors

Modified on Mon, 25 Apr 2022 at 10:51 AM

Are you considering to hide Pathmonk when a website visitor logged-in to your product?


You can provide website visitors a tailored experience with very little effort. This article outlines how to either use CSS or JavaScript to trigger show/not show Pathmonk to a visitor that is logged-out/logged-in.


  1. Add either a CSS class or JavaScript to the login-button.
  2. Confirm that Pathmonk behaves accordingly on your website.


Control Pathmonk via CSS


Adding the following classes to a button will make the element react to a click event on desktop or touch event on mobile devices and execute the corresponding action.


CSS Actions Guide
CSS ClassCorresponding Action
pathmonkLogInUserWill prevent
Pathmonk opening
pathmonkLogOutUserWill enable
Pathmonk opening


Control Pathmonk via JavaScript


Adding the following classes to a button will make the element react to a click event on desktop or touch event on mobile devices and execute the corresponding action.


JavaScript Actions Guide
JavaScript
Corresponding Action
Pathmonk.logInUser();
Will prevent
Pathmonk opening
Pathmonk.logOutUser();
Will enable 
Pathmonk opening



Control Assistant via a link


Here is some extra help if you want to create a link.

For example: <a href=”javascript:Pathmonk.loginUser()”> Log-in </a>


Still Having Trouble Installing?

You can verify the setup manually by checking your website or by creating a support ticket so we can help you.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article