Skip to content

Admin Activity Log

Module: Magenx_AdminActivity · admin only

Magento Open Source has no record of who changed what in the admin. This module adds one: every change, field by field, with who made it, when, from which IP address and browser. When several people share an admin, “who deleted that CMS block?” finally has an answer.

The Admin Activity Log grid
System > Admin Activity Log.
ChangesAdd, edit, delete, print, view and mass update of tracked records.
Field detailOld and new value of every field that changed.
LoginsSuccessful logins, failed attempts (with the username tried) and logouts.
ContextIP address, browser, admin user, admin role, page and URL.
AI and integrationsChanges made through the AI MCP Connector, with the connector and role behind them.
Page visitsOne row per admin page view. Off by default.

Tracked out of the box: products, categories, product attributes, CMS pages and blocks, customers, customer groups, orders, admin users and roles, stores, store groups, websites, cart and catalog price rules, tax rules, and configuration values.

Open System > Admin Activity Log. The grid can be filtered and exported. Each row opens the full context and a field / old value / new value table.

  • The log is read-only. Nothing can be deleted from the admin; rows leave only through the retention cleanup.
  • The IP filter is an exact match: type the whole address.
  • A mass action over more than 200 records writes one summary row with the count.
  • Logging never blocks the action it records. A logging failure is written to var/log/magenx_admin_activity.log.
One activity entry for a configuration change: action, status, entity, admin, source, role and request details, then the Changed Fields table with old and new values
An activity entry opened from the log: who changed what, and every changed field.
  • Passwords, reset tokens, API keys, secrets, private keys and card data are never stored. The field name is logged and both values show ***.
  • Encrypted configuration values, and configuration paths that look like secrets, are masked the same way.
  • The admin URL secret key and secret-looking query parameters are removed from stored URLs.
  • For failed logins only the username is stored, never the password tried.

Admin edits a record

  1. An admin saves a product, changing its price and name.
  2. Once the save is committed, one edit activity with two details is recorded, with user, role, address, browser, action and address of the page.
  3. A save that is rolled back leaves no entry.

Mass action

  1. An admin updates 50 products at once: 50 activities are recorded together.
  2. Above 200 records in one request, a single summary entry names the count instead.

Sign-in events

  1. A sign-in records an entry once per session (not on re-authentication prompts).
  2. A failed attempt records the username tried and a generic reason — never the password.
  3. A sign-out records an entry naming the user.

External change

  1. An agent updates a product on behalf of admin "alice" through connector "X" with role "Catalog".
  2. The change is recorded with source = the agent channel, the connector and the role.
  3. Ordinary storefront saves are never logged.

Review

  1. A permitted user opens the log, filters by user, action, record type, source or exact address, and exports.
  2. Opening an entry shows the request context and the field / old / new table.
  3. Nothing can be edited or deleted from the screen.

Retention

  1. A scheduled job deletes entries older than the window in bounded batches, details included.

These always hold:

  • An entry exists only for a change that was committed.
  • No secret (password, token, key, private key, card data, encrypted setting, setting whose path names a secret) is ever stored.
  • Entries cannot be changed or removed from the admin.
  • All entries of one request are stored together or not at all.
  • A stored record type is only ever acted on if it is on the tracked list.
  • A field is in the diff only if old and new values differ after normalising (no change from "1" to 1).
  • Protected = exact names on the protected list, names or setting paths containing a protected pattern (case-insensitive), and every encrypted setting. Name kept, both values ***.
  • Values longer than 128 KB are cut on a byte budget without splitting a multi-byte character.
  • "Who changed X" is answerable for every tracked type within the retention window.
  • Entries show the role that authorised the change at the time.
SituationWhat happens
Save rolled back.No entry.
Mail password stored as a plain setting named …_password.Masked by pattern.
Page address contains ?api_key=….Stored as ***.
"Select all" on 10,000 products.One summary entry.
300 KB field value.Cut at 128 KB, valid text.
Database error while logging.Admin action succeeds; error written to the module's log.
Entry tampered to name another record type.Ignored, never acted on.
Re-authentication prompt.No second sign-in entry.
Cleanup has not run for months.Deletes in bounded batches.
  • Admin-panel actions on tracked types; external callers only inside an actor scope.
  • Rolling a change back from the log.
  • Logging storefront shopper actions.
  • Real-time alerting.
  • Changes made directly in the database or from the command line.
  • Per-store settings (the admin panel is global).
Terminal window
composer require magenxcommerce/module-admin-activity
bin/magento module:enable Magenx_AdminActivity
bin/magento setup:upgrade
bin/magento setup:di:compile # production mode only
bin/magento cache:flush
  • PHP ~8.4.0||~8.5.0, Magento 2.4.8.

All settings are global: the admin is not a store view.

Stores > Configuration > Magenx > Admin Activity

General

SettingDefaultScopeNotes
Enable Admin Activity Logs
magenx_admin_activity/general/enabled
YesGlobalYes/No. Master switch. Off means nothing is recorded; existing records are kept.
Record Login Activity
magenx_admin_activity/general/log_login
YesGlobalYes/No. Shown when Enable Admin Activity Logs = Yes. Successful logins, failed attempts and logouts, each with the IP address behind them.
Record Page Visits
magenx_admin_activity/general/log_page_visits
NoGlobalYes/No. Shown when Enable Admin Activity Logs = Yes. Off by default. Enable only if you need admin navigation history: it writes one row per admin page view, which on a busy install is by far the largest source of rows in the log.
Clear Admin Activity Logs After (days)
magenx_admin_activity/general/cleanup_days
90GlobalText. Records older than this are deleted by cron. 0 keeps everything forever.
Cleanup Schedule
magenx_admin_activity/general/cleanup_schedule
0 3 * * *GlobalText. Shown when Enable Admin Activity Logs = Yes. Cron expression for the cleanup job, e.g. 0 3 * * * for 3am daily.
  • System > Admin Activity Log

Grant these under System > Permissions > User Roles > Role Resources:

ResourceUnderID
Admin Activity LogSystemMagenx_AdminActivity::activity
Admin Activity SettingsStores > Settings > ConfigurationMagenx_AdminActivity::config
JobGroupDefault scheduleChange it at
magenx_admin_activity_cleandefault0 3 * * *magenx_admin_activity/general/cleanup_schedule
TermMeaning
ActivityOne log entry: an action on a record, a sign-in event or a page visit.
DetailOne changed field of an activity: name, old value, new value.
Tracked record typeA kind of record whose changes are logged (product, category, customer, order, page, rule, user, setting…).
Action typeadd, edit, delete, view, print, mass update, sign-in, failed sign-in, sign-out, page visit.
Protected fieldA field whose name is logged but whose values are replaced by ***.
Skipped fieldA field never logged (noise such as "updated at").
External actorAn integration or agent that declares whom it acts for.
SourceWhere the change came from: the admin panel, or the external caller's name.
Retention windowDays an entry is kept; 0 = forever.