You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/javascript-click-analytics-plugin.md
+28-27Lines changed: 28 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ appInsights.loadAppInsights();
97
97
98
98
> [!CAUTION]
99
99
> 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-`.
101
101
102
102
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:
103
103
- 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
| 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. |
| 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. |
| 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.|
166
166
167
167
### behaviorValidator
168
168
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.
- Check out the [documentation on utilizing HEART Workbook](usage-heart.md) for expanded product analytics.
368
369
- 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.
369
370
- 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).
371
372
- 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