Substitute for Activity

Srikanth Sharma asked on August 4, 2017 00:20

We're currently migrating to version 10 and blocked at the below error. Can you please suggest an alternative for the Activity

'CMS.WebAnalytics.Activity' is obsolete: 'Inherit from CustomActivityInitializerBase class or implement IActivityInitializer

  Activity internalSearch = new ActivityInternalSearch(searchtext.Text, DocumentContext.CurrentDocument, AnalyticsContext.ActivityEnvironmentVariables);
        internalSearch.Log();

Recent Answers


Mariia Zhokh answered on August 4, 2017 10:45

In Kentico 10 you should use

CMS.WebAnalytics.PagesActivityLogger pagesActivities = new CMS.WebAnalytics.PagesActivityLogger();
pagesActivities.LogInternalSearch(searchtext.Text, DocumentContext.CurrentDocument);
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.