Skip to main content

Analytics

We provide a range of analytics for 5app and customer use. These are available in the form of reports and team manager / admin analytics dashboards.

Event tracking​

Activity events​

We track selected user events via the activityEvents table.

New tracking events can be added via to the frontend the track util.

import track from 'utils/track';

function onButtonClick() => {
// Trigger a playlist action
updatePlaylist()

// Track the click
track('collection', 'update', 'updateDetails', refId);
}

Heap​

Additional frontend tracking and analytics are compiled using Heap

import track from 'utils/track';

function onButtonClick() => {
// Trigger a playlist action
updatePlaylist()

// Track the click via Heap
window.heap?.track('Playlist upload confirmed', {
// Add any additional information via the object
playlistUrl,
});
}

Changelog table​

We track selected backend events, e.g. Patch events, via the changelog table. The changelog util is used for this.

import {
ACTION_UPDATE,
REFERENCE_TYPE_TAG,
} from '../../constants/changelog.js';

import { changelog } from './_utils.js';


function updateTag(tagId, updateInfo) {
// Patch tag
const resp = await updateTag(tagId, updateInfo)

// Add changelog entry
await changelog([
{
domainId,
user_id: options.state.user.id,
action: ACTION_UPDATE,
ref_id: tagId,
ref_type: REFERENCE_TYPE_TAG,
details: updateInfo,
},
]);

return resp;
}

The set ref_type is used to determine which changelog report the changelog entry will be added to.

See Audits / Changelog for more.