Click or drag to resize
KenticoActivityLoggerController Class
Controller responsible for activity logging via javascript. Provides method for logging an activity and method which returns script which logs activity via javascript AJAX on client side.
Inheritance Hierarchy
SystemObject
  ControllerBase
    Controller
      Kentico.Activities.Web.MvcKenticoActivityLoggerController

Namespace: Kentico.Activities.Web.Mvc
Assembly: Kentico.OnlineMarketing.Web.Mvc (in Kentico.OnlineMarketing.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public class KenticoActivityLoggerController : Controller

The KenticoActivityLoggerController type exposes the following members.

Constructors
  NameDescription
Public methodKenticoActivityLoggerController
Creates an instance of KenticoActivityLoggerController
Top
Methods
  NameDescription
Public methodLog
Logs activities (pagevisit, landingpage).
Public methodScript
Returns javascript file which calls Log(String, String, String) action via AJAX immediately after it is loaded.
Top
Remarks
Call routes.Kentico().MapActivitiesRoutes(); before you register all your routes. Furthermore, include script tag in your layout @Scripts.Render(Url.RouteUrl("KenticoLogActivityScript")) which is @Scripts.Render("Kentico.Resource/Activities/Logger/Logger.js") or create AJAX post request Kentico.Activities/Logger/Log. Make sure that the AJAX call is performed at every page all required fields are filled correctly (Log(String, String, String)).
See Also