Skip to content

Commit 2414eeb

Browse files
authored
Merge pull request #181704 from adityaganjoo1991/patch-4
add HEART to next steps of Click analytics
2 parents 9ba7f32 + e3b7c25 commit 2414eeb

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

articles/azure-monitor/app/javascript-click-analytics-plugin.md

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ appInsights.loadAppInsights();
9797

9898
> [!CAUTION]
9999
> Once `parentDataTag` is used, the SDK will begin looking for parent tags across your entire application and not just the HTML element where you used it.
100-
4. `customDataPrefix` provided by the user should always start with `data-`, for example `data-sample-`. In HTML the `data-*` global attributes form a class of attributes called custom data attributes, that allow proprietary information to be exchanged between the HTML and its DOM representation by scripts. Older browsers (Internet Explorer, Safari) will drop attributes that it doesn't understand, unless they start with `data-`.
100+
4. `customDataPrefix` provided by the user should always start with `data-`, for example `data-sample-`. In HTML, the `data-*` global attributes are called custom data attributes, that allow proprietary information to be exchanged between the HTML and its DOM representation by scripts. Older browsers (Internet Explorer, Safari) will drop attributes that it doesn't understand, unless they start with `data-`.
101101

102102
The `*` in `data-*` may be replaced by any name following the [production rule of XML names](https://www.w3.org/TR/REC-xml/#NT-Name) with the following restrictions:
103103
- The name must not start with "xml", whatever case is used for these letters.
@@ -111,62 +111,62 @@ The following are some of the key properties captured by default when the plugin
111111
### Custom Event Properties
112112
| Name | Description | Sample |
113113
| --------------------- | ---------------------------------------|-----------------|
114-
| name | The `name` of the customEvent. More info on how this is populated is shown [here](#how-to-effectively-use-the-plugin).| About |
114+
| Name | The `name` of the customEvent. More info on how name gets populated is shown [here](#how-to-effectively-use-the-plugin).| About |
115115
| itemType | Type of event. | customEvent |
116-
|sdkVersion | version of Application Insights SDK along with click plugin|javascript:2.6.2_ClickPlugin2.6.2|
116+
|sdkVersion | Version of Application Insights SDK along with click plugin|JavaScript:2.6.2_ClickPlugin2.6.2|
117117

118118
### Custom Dimensions
119119
| Name | Description | Sample |
120120
| --------------------- | ---------------------------------------|-----------------|
121-
| actionType | Action type that caused the click event. Can be left-click or right-click. | CL |
121+
| actionType | Action type that caused the click event. Can be left or right click. | CL |
122122
| baseTypeSource | Base Type source of the custom event. | ClickEvent |
123123
| clickCoordinates | Coordinates where the click event is triggered. | 659X47 |
124124
| content | Placeholder to store additional `data-*` attributes and values. | [{sample1:value1, sample2:value2}] |
125125
| pageName | Title of the page where the click event is triggered. | Sample Title |
126-
| parentId | Id or name of the parent element | navbarContainer |
126+
| parentId | ID or name of the parent element | navbarContainer |
127127

128128
### Custom Measurements
129129
| Name | Description | Sample |
130130
| --------------------- | ---------------------------------------|-----------------|
131-
| timeToAction | Time taken in millisecs for the user to click the element since initial page load | 87407 |
131+
| timeToAction | Time taken in milliseconds for the user to click the element since initial page load | 87407 |
132132

133133
## Configuration
134134

135135
| Name | Type | Default | Description |
136136
| --------------------- | -----------------------------------| --------| ---------------------------------------------------------------------------------------------------------------------------------------- |
137-
| autoCapture | boolean | true | Automatic capture configuration. |
138-
| callback | [IValueCallback](#ivaluecallback) | null | Callbacks configuration. |
139-
| pageTags | string | null | Page tags. |
140-
| dataTags | [ICustomDataTags](#icustomdatatags)| null | Custom Data Tags provided to override default tags used to capture click data. |
141-
| urlCollectHash | boolean | false | Enables the logging of values after a "#" character of the URL. |
142-
| urlCollectQuery | boolean | false | Enables the logging of the query string of the URL. |
143-
| behaviorValidator | Function | null | Callback function to use for the `data-*-bhvr` value validation. For more information, go to [behaviorValidator section](#behaviorvalidator).|
144-
| defaultRightClickBhvr | string (or) number | '' | Default Behavior value when Right Click event has occurred. This value will be overridden if the element has the `data-*-bhvr` attribute. |
145-
| dropInvalidEvents | boolean | false | Flag to drop events that do not have useful click data. |
137+
| auto-Capture | Boolean | True | Automatic capture configuration. |
138+
| callback | [IValueCallback](#ivaluecallback) | Null | Callbacks configuration. |
139+
| pageTags | String | Null | Page tags. |
140+
| dataTags | [ICustomDataTags](#icustomdatatags)| Null | Custom Data Tags provided to override default tags used to capture click data. |
141+
| urlCollectHash | Boolean | False | Enables the logging of values after a "#" character of the URL. |
142+
| urlCollectQuery | Boolean | False | Enables the logging of the query string of the URL. |
143+
| behaviorValidator | Function | Null | Callback function to use for the `data-*-bhvr` value validation. For more information, go to [behaviorValidator section](#behaviorvalidator).|
144+
| defaultRightClickBhvr | String (or) number | '' | Default Behavior value when Right Click event has occurred. This value will be overridden if the element has the `data-*-bhvr` attribute. |
145+
| dropInvalidEvents | Boolean | False | Flag to drop events that do not have useful click data. |
146146

147147
### IValueCallback
148148

149149
| Name | Type | Default | Description |
150150
| ------------------ | -------- | ------- | --------------------------------------------------------------------------------------- |
151-
| pageName | Function | null | Function to override the default pageName capturing behavior. |
152-
| pageActionPageTags | Function | null | A callback function to augment the default pageTags collected during pageAction event. |
153-
| contentName | Function | null | A callback function to populate customized contentName. |
151+
| pageName | Function | Null | Function to override the default pageName capturing behavior. |
152+
| pageActionPageTags | Function | Null | A callback function to augment the default pageTags collected during pageAction event. |
153+
| contentName | Function | Null | A callback function to populate customized contentName. |
154154

155155
### ICustomDataTags
156156

157157
| Name | Type | Default | Default Tag to Use in HTML | Description |
158158
|---------------------------|---------|-----------|-------------|----------------------------------------------------------------------------------------------|
159-
| useDefaultContentNameOrId | boolean | false | N/A |Collects standard HTML attribute for contentName when a particular element is not tagged with default customDataPrefix or when customDataPrefix is not provided by user. |
160-
| customDataPrefix | string | `data-` | `data-*`| Automatic capture content name and value of elements that are tagged with provided prefix. For example, `data-*-id`, `data-<yourcustomattribute>` can be used in the HTML tags. |
161-
| aiBlobAttributeTag | string | `ai-blob` | `data-ai-blob`| Plugin supports a JSON blob attribute instead of individual `data-*` attributes. |
162-
| metaDataPrefix | string | null | N/A | Automatic capture HTML Head's meta element name and content with provided prefix when capture. For example, `custom-` can be used in the HTML meta tag. |
163-
| captureAllMetaDataContent | boolean | false | N/A | Automatic capture all HTML Head's meta element names and content. Default is false. If enabled this will override provided metaDataPrefix. |
164-
| parentDataTag | string | null | N/A | Stops traversing up the DOM to capture content name and value of elements when encountered with this tag. For example, `data-<yourparentDataTag>` can be used in the HTML tags.|
165-
| dntDataTag | string | `ai-dnt` | `data-ai-dnt`| HTML elements with this attribute will be ignored by the plugin for capturing telemetry data.|
159+
| useDefaultContentNameOrId | Boolean | False | N/A |Collects standard HTML attribute for contentName when a particular element is not tagged with default customDataPrefix or when customDataPrefix is not provided by user. |
160+
| customDataPrefix | String | `data-` | `data-*`| Automatic capture content name and value of elements that are tagged with provided prefix. For example, `data-*-id`, `data-<yourcustomattribute>` can be used in the HTML tags. |
161+
| aiBlobAttributeTag | String | `ai-blob` | `data-ai-blob`| Plugin supports a JSON blob attribute instead of individual `data-*` attributes. |
162+
| metaDataPrefix | String | Null | N/A | Automatic capture HTML Head's meta element name and content with provided prefix when capture. For example, `custom-` can be used in the HTML meta tag. |
163+
| captureAllMetaDataContent | Boolean | False | N/A | Automatic capture all HTML Head's meta element names and content. Default is false. If enabled this will override provided metaDataPrefix. |
164+
| parentDataTag | String | Null | N/A | Stops traversing up the DOM to capture content name and value of elements when encountered with this tag. For example, `data-<yourparentDataTag>` can be used in the HTML tags.|
165+
| dntDataTag | String | `ai-dnt` | `data-ai-dnt`| HTML elements with this attribute will be ignored by the plugin for capturing telemetry data.|
166166

167167
### behaviorValidator
168168

169-
The behaviorValidator functions automatically checks that tagged behaviors in code conform to a pre-defined list. This ensures tagged behaviors are consistent with your enterprise's established taxonomy. It is not required or expected that most Azure Monitor customers will use this, but it's available for advanced scenarios. There are three different behaviorValidator callback functions exposed as part of this extension. However, users can use their own callback functions if the exposed functions do not solve your requirement. The intent is to bring your own behaviors data structure, the plugin uses this validator function while extracting the behaviors from the data tags.
169+
The behaviorValidator functions automatically checks that tagged behaviors in code conform to a pre-defined list. This ensures tagged behaviors are consistent with your enterprise's established taxonomy. It is not required or expected that most Azure Monitor customers will use these functions, but they're available for advanced scenarios. There are three different behaviorValidator callback functions exposed as part of this extension. However, users can use their own callback functions if the exposed functions do not solve your requirement. The intent is to bring your own behaviors data structure, the plugin uses this validator function while extracting the behaviors from the data tags.
170170

171171
| Name | Description |
172172
| ---------------------- | -----------------------------------------------------------------------------------|
@@ -365,7 +365,8 @@ appInsights.loadAppInsights();
365365

366366
## Next steps
367367

368+
- Check out the [documentation on utilizing HEART Workbook](usage-heart.md) for expanded product analytics.
368369
- Check out the [GitHub Repository](https://github.com/microsoft/ApplicationInsights-JS/tree/master/extensions/applicationinsights-clickanalytics-js) and [NPM Package](https://www.npmjs.com/package/@microsoft/applicationinsights-clickanalytics-js) for the Click Analytics Auto-Collection Plugin.
369370
- Use [Events Analysis in Usage Experience](usage-segmentation.md) to analyze top clicks and slice by available dimensions.
370-
- Find click data under content field within customDimensions attribute in CustomEvents table in [Log Analytics](../logs/log-analytics-tutorial.md#write-a-query). See [Sample App](https://go.microsoft.com/fwlink/?linkid=2152871) for additional guidance.
371+
- Find click data under content field within customDimensions attribute in CustomEvents table in [Log Analytics](../logs/log-analytics-tutorial.md#write-a-query). For more information, see [Sample App](https://go.microsoft.com/fwlink/?linkid=2152871).
371372
- Build a [Workbook](../visualize/workbooks-overview.md) or [export to Power BI](../logs/log-powerbi.md#integrating-queries) to create custom visualizations of click data.

0 commit comments

Comments
 (0)