Power Pages - Avoid Duplicate 'Tracking Code' in Portal Analytics

In Power Pages (Earlier Power Apps Portal), Analytics can be enabled with an Azure Application Insights connection.

In this article, Oleksandr Olashyn has nicely explained in detail how to achieve that.

https://www.dancingwithcrm.com/powerappsportals-tracking-using-azure-app-insights/

When we first time add an analytics code snippet to Portal Analytics, in the background, one new Content Snippet element is created automatically, called "Tracking Code".

Power Pages - Avoid Duplicate 'Tracking Code' in Portal Analytics

Whenever you make any custom changes to the analytics code snippet in Portal Analytics, it will always create a new "Tracking Code" element in the Content Snippets section.

Power Pages - Avoid Duplicate 'Tracking Code' in Portal Analytics

There is a way to avoid having duplicate "Tracking Code" elements created with every update in the Portal Analytics analytics code snippet.

When the first time this "Tracking Code" element is created, keep doing code update in this "Tracking Code" element instead of updating code in the Portal Analytics section.

If duplicate "Tracking Code" elements are already created, then only keep anyone and delete the remaining duplicate elements. And keep doing update in that "Tracking Code" element which was kept.

You will find that doing a code update in the "Tracking Code" element will get automatically reflected in the Portal Analytics code.

Power Pages - Avoid Duplicate 'Tracking Code' in Portal Analytics

Happy Learning, Anywhere!


Similar Articles