Finding Your Scripts in the Web Browser's Development Tools
Before you start debugging your scripts, learn how to find and view them in the development tools of the Web browser (Google Chrome).
To find an authored script in the Web browser's development tools, you need to run the script at least once during the current session.
Before executing your scripts in the runtime, the analytics designer transforms them. This is why the JavaScript in the Web browser's development tools doesn't look exactly the same as the scripts you wrote in the script editor during design time.
To view the scripts you wrote in your analytic application, just run the application and press F12, which opens the Web browser's development tools.
To search for a script by its name, press F12 to open the development tools and press Ctrl + P to open the search field. Enter the name of the script to search for.
The names of the scripts follow a specific scheme: <WIDGET_NAME>.<FUNCTION_NAME>.js. The scripts are grouped in a folder named <APPLICATION_NAME> where the components of the scripts' names have the following meaning:
Key | Description |
---|---|
APPLICATION_NAME | the name that you set for your application when you saved it |
WIDGET_NAME | the name of the widget/element in your application |
FUNCTION_NAME | the name of the function/event handler that holds the script you wrote |
If you defined a script for the onInitialization event of your application, the WIDGET_NAME will be automatically set to "Application".
Special characters in your application name will be replaced by "_", except "-" and "." which will be kept as they are.
Let's assume you have an application called "My Demo Application" that contains a button called "Button_1" with an onClick event handler. The name of the script would be Button_1.onClick.js and it would be located in a folder called My_Demo_Application.