Custom Events

Custom events track anything that is dependent on the availability of a specific component on the page. This also includes events that are template-specific, as the page-component is treated as another component.

Tracking Custom Events On Page Load

This can be done using the pseudo-attribute data-tracking (the older record attribute is still supported for backwards compatibility). You can add this to any HTML tag.

At page load, all data-tracking attributes will be collected and added to the event section of the Client Context, where they can be mapped to SiteCatalyst events. Events that are not mapped will not be tracked by SiteCatalyst. See Connecting to Adobe Analytics for more details about mapping events.

Tracking Custom Events After Page Load

To track events that occur after a page is loaded (such as user interactions), use the CQ_Analytics.record JavaScript function: