Reputation: 15
We've a sharepoint add-in to insert Application insights Js script file into classic site collection and include that in a master page. We need to change the key from the JS script before or after inserting. Key will be an user input. Can this instrumentation key taken from user be stored somewhere at site collection level and accessed by the javascript run time?
Upvotes: 0
Views: 38
Reputation: 124
You can change the instrumentation key at runtime from the config object.
window.appInsights.config.instrumentationKey = "ikey";
Upvotes: 0