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.
- Add either a CSS class or JavaScript to the login-button.
- 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 Class | Corresponding Action |
pathmonkLogInUser | Will prevent Pathmonk opening |
pathmonkLogOutUser | Will 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.