Skip to main content

User Activity History Log

Overview

The user activity history log enables you to check the history of user operations on the SaaS.

warning

The User Activity Log feature is not available for customers on the legacy Starter or Standard plans.
To use this feature, you need to change to a new pricing plan.

You can view the "action history log" in the Actions column of the SaaS Operations Console > User Management.

users activity-history-log

The history of the screen transitions by users on the SaaS is displayed in chronological order. The log retention period is up to one month.

Setup

When executing GetUserInfo, set the Referer or X-SaaSus-Referer header. If both are set, X-SaaSus-Referer takes precedence.

Examples of SDK implementations for each language are as follows.

For example, if you are using Laravel, it would look like this.

Use AntiPatternInc\Saasus\Laravel\Middleware\Auth.

<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;

// Run GetUserInfo inside Middleware\Auth
// Retrieve the "Referer" and "X-SaaSus-Referer" from the request headers and add them as headers when executing
Route::middleware(\AntiPatternInc\Saasus\Laravel\Middleware\Auth::class)->group(function () {
Route::get('/users', 'App\Http\Controllers\UserApiController@index');
});

When sending HTTP requests from the SaaS screen to the SaaS, set the Referer or X-SaaSus-Referer header.

The Referer header is automatically set by the browser, but the path part of the URL may be omitted. If the expected value is not set, manually set the X-SaaSus-Referer header.

The activity history log displays the history of GetUserInfo executed with Referer or X-SaaSus-Referer headers. Therefore if a HTTP request is not sent to the SaaS or only HTTP requests that do not execute GetUserInfo are sent when navigating to a certain screen, the transition to that screen will not be recorded.

Implementation Details

For detailed information on implementing activity history logs, recommended patterns, and SPA implementation examples, please refer to the following dedicated page:

Implementation of Activity History Logs

This page provides detailed explanations of the following:

  • Implementation points and recommended patterns
  • How to use the X-SaaSus-Referer header
  • Implementation Points for Frontend
  • Methods for recording page views and in-page actions