Raj
Raj

Reputation: 15

Modify the JS file in the site collection with the user input text using a Add-in

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

Answers (1)

Mark Wolff
Mark Wolff

Reputation: 124

You can change the instrumentation key at runtime from the config object.

window.appInsights.config.instrumentationKey = "ikey";

Upvotes: 0

Related Questions