Define a page group with JavaScript Variable
Capture the value of an existing JavaScript variable on your site to define your page group.
Before you begin
The JavaScript variable can be coded anywhere on the page and at any time before the page finishes loading (in other words, before the beacon is sent), and must be globally readable.
You can also insert a specific JavaScript snippet in to your pages to define a page group, using any logical grouping of unique identifiers or symbols (namespace) that you choose.
If you have other tools in place that use JavaScript, this is an easy way to define your page groups.These steps show you how to use the
JavaScript Variable method to define a page group using the value of a variable in your source
code.