top of page
Filter using User Cookies

Available Version: 1.12.0 +

Available: Advanced Message Component
Package Tiers: Freemium, Basic and Advanced

​

This article will talk about a new feature that we have introduced which uses the end-user cookies as a filter to show or hide messages. The track of cookies is disabled by default, so current message and new message won't have this option enabled by default, which means we won't track any cookie. This is available only for Advanced Message, if you are using Simple Toast Message or Simple Modal Message, you won't be able to use this filter.

​

If you add a filter to use User Cookie, it will show a warning message and an alert message to remember you that you have to update any privacy policy that you have.

​

In The Filter Section, you have a new option now called "User Cookie", this filter criteria will have 3 options for you to select, which are Logged-in for First Time, Number of Page Access and Number of Record Page Access

​

Here is a screenshot on how the filter looks like:

Salesforce Advanced filter for popup using cookies

Here are how each option works:

​

Logged-in for First Time

This filter would show the message only once after the user has logged-in. If the user has seeing the message, then logged out and login again and access the page they would see the message again. If they do not logged out, they would not see the message till they logged and login again.

This is helpful in case you want to show a message only when the user access the home page and when they dismissed you don't want to show the message again because the user still logged-in.

If you want to show the message only once, it doesn't matter if the user logged-out or not, then you should use Event Tracker.

​

The cookie attribute name that tracks this feature is called "lastLogin", and it is locatted at evm-####-base cookie. Check the end of this article to know more about cookies.

​

Number of Page Access

​

User Cookie Filter for Number of Page Access

This filter would show the message when the user access the message for the 5 time. This would help in scenarios where you want to show a message after the user has accessed the page 2 or 3 times, so you might show a notification for the user.

​

The cookie attribute name that tracks this feature is called "count", and it is locatted at evm-####-base cookie. Check the end of this article to know more about cookies.

​

Number of Record Page Access

User Cookie Filter for Number of Record Page Access

This filter would show the message when the user access the message for the same record id/record detail page for the 2nd time. This is the same behaviour as the previous filter, but the difference is that this track the Record Id that the user is accessing, so we show a message for the user only if the record that the user is seeings is the same as he was seeing previous, if it is a new record we wouldn't show count the view a second time.

​

The cookie attribute name that tracks this feature is called "rid" and "count", and it is locatted at evm-####-record-id cookie. Basically, for each record the user sees, we would add that id and count how many times the user has seeing that record. Check the end of this article to know more about cookies.

Cookie Management

Adding a Filter for the cookie is not enough to enable the cookie, we do have a easy flag for you to enable or disabled the cookie, which is located in the message right menu settings. 

This menu you can enable or disable, reset the cookie on each message update, and set an expiration date for the cookie.

Enable or Disabled Cookie

Enable/Disabled Cookie

This option would allow the message to register a new cookie or update the cookie on the customer browser.

If disabled, no more cookie will be register by the message, the existing cookie will be deleted.

If enabled, and we have a filter, then we would write the cookies for that specific filter.

If enabled but there is no filter, we don't write anything.

​

Reset on update

This option would reset the cookie filters when the user access the message. Example, you set a message to show a message only the user access the page for the first time, so when the user access the page for the second or third or N times, we would not display the message because the user has a cookie which counts how many times the user is seeing that message and the user has seeing the message more than 1, which was on the filter. Now if you update the text of the message, and the Reset on update is checked, we would reset the configuration for that cookie, so the next time the user would access the message, this message would display, because we reset the settings of the cookie.

​

The way it works is when this flag is on, we get the update date of the message, and set into the cookie, so if you have updated the message, the updated date of the message record would change so we know that we need to reset all the cookie settings, and start from zero.

​

Expiry after(days)

Cookies is required to have an expiration date, so we set the default which is 90 days, after the end-user reach this, the cookie would be removed automatically by the browser. Every time we write in the cookie we set 90 days from the update that we made.

​

​

Cookie in the End-User's Browser

This is how a cookie looks like in the end-users' browser if they open the Browser Developer Console.

Salesforce Evm Cookies

For each message, we can have zero, one or two cookies. Remember that this is for each Advanced Message added into the Page with cookie enabled. So if you see more than 5 it is probably because you have multiple messages with cookie enabled.

​

Let's break the name of the cookies:

​

"LSKey-EvoluteMessage$": this name is added by salesforce, we don't have control over that, Salesforce adds LSKey + Namespace, which in our case our namespace is "EvoluteMessage".

​

Now we have two cookies that we add evm-####-record-id and evm-####-base.

​

evm-####-record-id: We add this when the message has the filter "Number of Record Page Access", which we would track record by record and how many times this browser has accessed that specific record.

The content inside would a list of Record Id("rid") and total of access for that record id("count").

We would update this list only if we have the filter "Number of Record Page Access" and we have accessed a record detail page which contains an id in the URL.

​

evm-####-base: This is what we added, our cookies always starts with evm-####, which is the message internal code that we create for each message, so if you have two different messages into the page, you would see 4 cookies, 2 cookies for one message, and 2 for another message.

The cookie ending with "-base" means that is used for "Logged-in for First Time" and/or "Number of Page Access" filters. 

The content of this cookie would be:

updateDateCode: which contains information when the message record was updated, this is a Unix Date Time format. This would update only if the "Reset on Update" is checked and we have updated the message.

count: This would have the total times that the user access the message. We would update this every time the user access a message that has the filter "Number of Page Access".

lastLogin: This has the information of when was the last time the user has logged-in into Salesforce, this is in a Unix Date Format, and this would be update and used when the message has the filter "Logged-in for First Time".

​

That is all the information that we collect and store, it is basically the records pages that the user has accessed, the total of times the user has accessed the page, and their logged-in date to know if they have  logged-in for the first time.

​

I hope this section helps to clarify those information, if you feel we should make it more clear, please send us an email so we can update this and make this more clear.

​

​

Here are some videos showing how these filters work.

​

©2025 by EvoluteMessage

bottom of page