Add class if a person has visited a page

Anonymous
Not applicable

Add class if a person has visited a page

Hello. I am attempting to display a popup on a certain page of our website. However I only want to display this pop up if the lead is anonymous. I've scoured the site trying to find a solution to the following using javascript:

1. Check if the visitor is anonymous in our lead database
2. If the person is anonymous add a class to a div that will display the pop-up
Tags (1)
1 REPLY 1
Anonymous
Not applicable

Re: Add class if a person has visited a page

I have created something like this to hide/show a form this way. I used forms 2.0 with the option to show custom HTML of the visitor is known. In the custom HTML I added the code for it. So anonymous visitors see the form in a certain area, but for known visitors not only the form is hidden, but also other parts of the page changed (so not only the form area). You could try a hidden fields only form.

Another option is to use Marketo's RTP add-on, which enables you to do all kinds of personalization on your pages.

You could also use the API's to check wether a lead exists. if not you could execute code to alter the page. This is technically the bst solution, but requires extensive knowledge on programming and the API's.