ApplicationInsights-JS
ApplicationInsights-JS copied to clipboard
[BUG] parentId is not_specified when it's defined on a parent element in DOM
Description/Screenshot
I have copied example 3 from the documentation, but parentId attribute is not_specified.
Steps to reproduce
- go to playground https://codepen.io/krystof-matejka/pen/LYoYBQw
- replace
connectionStringon line 21
Environment
- OS/Browser: Edge
- SDK Version [e.g. 22]:
@microsoft/applicationinsights-clickanalytics-js: 3.2.0 - How you initialized the SDK: npm
Expected behavior
I expect that parentId is test6parent as the documentation says.
Additional context Add any other context about the problem here.
please try the following
parentElement.setAttribute("data-parentid", "testParentId"); or- set
parentDataTag:"parentgroup"under clickanalytics plugin config, setparentElement.setAttribute("data-parentgroup", "testParentGroup"); and let us know if any of these works!
hello @Karlie-777 first solution does not work, but the second does! thanks 🙇
i see what i did wrong, i haven't copied parentDataTag: "group" from the example. so there isn't any issue