HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Log activity

Describes the Optimizely Activity system, which is a facility where recent changes to the solution are tracked.

📘

Note

The Activity API supersedes the deprecated ChangeLog API.

For example, changes to pages, blocks, and media items are logged as an Activity.

Activities are needed to support the project activity feed, mirroring, and other platform features and provide a general short-term auditing mechanism.

Activities are stored for at least one month unless another platform feature depends on certain activities, which may remain for an additional period. Activities without remaining dependencies are archived or deleted by a scheduled job.

Archived activities are persisted for 12 months by default, but you can modify this by configuring the ArchiveRetentionPeriod property on ActivityOptions. (For CMS 10.9-11, add an activityArchiveRetentionPeriod attribute to the applicationSettings element in web.config instead). The property value represents the number of months to retain activities in the archive.

  • To turn off archiving completely, set the value to 0.
  • To turn off the cleanup of the archive and let activities remain indefinitely, set the value to -1. You should not use this setting unless you put external safeguards in place.

You can retrieve archived activities only by using the IActivityQueryService.ListActivitiesAsync method, providing a query with the IncludeArchived flag set.

Administrators change log

The Change Log is an interface for administrators to list recent activities in Optimizely. See Change Log.

Programming interfaces

The classes and interfaces for the Activities API are in the EPiServer.DataAbstraction.Activities namespace in the EPiServer assembly.

Related blog post: Activity log with custom content security activity