Reporting
The ARN Client provides the capability to perform various tracking operations. These operations involve reporting events such as page views or other custom events. Once the ARN Client is initialized, the tracking service is exposed through the track
property of the arnClient
object.
Configuration
The configuration of the tracking service is specified in the track
section of the ARN Client configuration. The track
section allows you to set up multiple implicit tracking systems by providing an array of tracker configurations. The properties available in each tracker configuration are as follows:
arnTrackerType
: Specifies the type of tracker to be used. The possible tracker types include:google
: For Google Analytics tracking. In this case, an additional propertygtag
of typeGTag
is required.matomo
: For Matomo tracking. In this case, an additional propertytrackingCode
of typestring
is required.sentry
: For Sentry tracking. In this case, additional propertiesdsn
(of typestring
) andtracesSampleRate
(of typenumber
) are required.
Notifying Events
To report explicit tracking information, you can use the relevant APIs provided by the ARN Client's tracking service. Here are the available methods:
arnClient.track.ctaClicked(ArnCtaEvent)
: Used to report that a call-to-action (CTA) was clicked. You can provide anArnCtaEvent
object containing relevant details about the clicked CTA.arnClient.track.pageViewed(ArnPageViewEvent)
: Used to report that a page was viewed. You can provide anArnPageViewEvent
object containing information about the viewed page.arnClient.track.report(ArnTrackedEvent)
: Used to report a custom tracked event. You can provide anArnTrackedEvent
object with custom event details.
Updated 5 months ago