Add a submodule to log parameters that lead to user registration

Created on 4 December 2024, 22 days ago

Problem/Motivation

One typical conversion in a Drupal project is user registration.
For that you may want to store the parameters that lead to the registration and associate that (1:1) with the user account.

As this module already solves the large part of storing the parameters for a session, it makes sense to add a submodule that takes these parameters on user creation (hook_user_insert).
All typical parameters should be logged into dedicated string fields and via views it should be possible to join the data to the user id for reports.

Large parts of that can be taken from the abandoned module: https://www.drupal.org/project/log_url_parameters

Note:
Don't log if the user insert is admin-created, for example with sth. like this?

if ($account->isNew() && user_is_anonymous()) {

(old D7 example)

Steps to reproduce

Proposed resolution

  1. Add a persistent_visitor_parameters_user_registration submodule
  2. Implement the schema and views integration from https://www.drupal.org/project/log_url_parameters (will need to be updated to current D11 standards)
  3. Add a settings page below the main module settings (tab) to enable the logging
  4. Add a basic installation test

Later, if needed, further settings can be added (YAGNI).

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024