|Name||Enter a name for the piece of shared code.||Required|
|Description||Enter a description for the piece of shared code. You can use the description to, for example, explain what the shared code does on the site and when it's executed.||Optional|
If you want to execute the shared code only after a certain event occurs on a page, select a trigger.
You can only select a single trigger, but you can freely change the selected trigger, and you can remove the trigger if you no longer need it.
If you do not select a trigger, the shared code is automatically executed for every page on every page load.
Selecting a trigger
To select a trigger:
Changing the trigger
To change the selected trigger:
Removing the trigger
To remove the selected trigger:
You can use the following object variables in the code:
The field automatically validates (lints) the code against ECMAScript 2018 (ES2018).
Figure: Defining the shared code settings