Analytics Interaction Gtag
forceCommunity:analyticsInteractionGtag
Tracks events that are triggered by custom components in Aura-based Experience Builder sites and sends the data to Google Analytics.
For Use In
Experience Builder Sites
This example creates a custom button and includes the forceCommunity:analyticsInteractionGtag event in the button's client-side controller. Clicking the button sends event data to Google Analytics.
This example sends a user timing event to Google Analytics indicating that it took 3549 milliseconds for the current web page to load all external JavaScript dependencies. (Credit to Google Analytics documentation.)
This example sends an exception event to Google Analytics if the divisor y is zero. (Credit to Google Analytics documentation.)
This event is supported in Aura-based Experience Builder sites only. To enable event tracking, add your Google Analytics tracking ID in Settings | Advanced in Experience Builder and publish the site.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
description | A description of the error. | string | ||
event | The string that will appear as the event action in Google Analytics Event reports. | string | ![]() | |
event_category | An event category is a name that you supply as a way to group objects that you want to analyze. Also, a string for categorizing all user timing variables into logical groups. | string | ||
event_label | Provides additional information for events that you want to analyze. Also, a string that can be used to add flexibility in visualizing user timings in the reports. | string | ||
fatal | True if the error was fatal. | boolean | ||
name | A string to identify the variable being recorded. Required for 'timing_complete' event. | string | ||
value | An integer used to assign a numerical value to a page object. Also, he number of milliseconds in elapsed time to report to Google Analytics. Required for 'timing_complete' event. | integer |
