
About
Loyalist uses simple, non-invasive techniques to help site administrators identify site "loyalists". By default, a loyalist is defined as a user who visits the site three times or more in one week. The number of visits, duration, and "cooldown" time between visits can be modified via configuration.
Requirements
No special requirements.
Recommended Modules
-
Rules: When enabled, the Loyalist module provides two Rules events:
-
After a visitor is defined as a (new) loyalist.
This event will be dispatched after (or soon after, see LIMITATIONS) a visitor is newly defined as a loyalist. -
A loyalist visits the site.
This event will be dispatched when a known loyalist visits the site again.
-
Installation
Install as you would normally install a contributed module for your version of Drupal.
Configuration
Configure user permissions in Administration » People » Permissions:
-
Administer Loyalist
Users need this permission to access and configure the Loyalist module's settings.
The site's loyalist definition can be configured from Configuration » People » Loyalist.
-
Interval (default: one week)
The amount of time to look at when evaluating the Number of visits from a potential loyalist. -
Number of visits (default: 3)
The number of visits by a single site visitor within the Interval to qualify the visitor as a loyalist. -
Visit cooldown (default: 30 mins.)
Amount of times between page loads before considering a page load to be a new visit.
Functionality
The Loyalist module sets two variables for visitors in a loyalist
session array. This array is primarily intended for other module and theme developers to build from.
-
loyalist
(integer)
Theloyalist
session variable will be either0
(not a known loyalist) or1
(a known loyalist). -
Drupal 7:
invoke
(string); Drupal 8:event
(object)
The name of a Rules event that should be invoked (Drupal 7) or the event being dispatched (Drupal 8). See README.md file for more information.
Limitations
The Loyalist module uses the Javascript construct LocalStorage to record and process information about individual users. This module does not store any information on the server, personal or otherwise, about visitors. This is an intentional decision to avoid potential privacy invasive techniques like fingerprinting.
This approach has a couple of drawbacks that are import to understand:
-
Users can disable or limit access to LocalStorage (e.g. in a private browsing mode). This effectively prevents the Loyalist module from functioning for that user/session.
-
Users can modify LocalStorage data. The functionality of the Loyalist module should never be used for things like access to sensitive information or site configuration.
-
Rules event invocations are delayed. Because loyalist status is determined client-side in Javascript, event invocations for the Rules module are delayed until that status can be communicated to PHP (server-side).
Sponsorship
Development of this module is supported by Cascade Public Media for KCTS9.org and Crosscut.com.
Project information
Unsupported
Not supported (i.e. abandoned), and no longer being developed. Learn more about dealing with unsupported (abandoned) projectsObsolete
Use of this project is deprecated.- Module categories: Automation
- Created by wells on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.