Additional testing tools
The Script Management Policy Tester is primarily used to test the policy you've created to manage problematic scripts on your site or app. However, there are some optional operations you can perform with it.
The Script Management Policy Tester is currently only supported for use with Google Chrome.
View the policy version
You can use the Script Management Policy Tester to review the version of a policy in use:
-
Launch the browser and navigate to one of the pages that uses a script from your policy.
-
Open the developer tools console:
- macOS. Press Command+Opt+I.
- Windows. Press Ctrl+Shift+I.
-
Select the SM tab from the console. (You may need to click >> to reveal this tab.)
-
Click Retrieve policies. There are three potential versions you'll see. The selected radio button indicates the policy that's currently loaded. The check mark indicates the policy that's applied.
- Staging. Your policy has been set to Staging Analysis only in the dashboard or to use the
STAGING
network via the API. For example, this would be the case if you created a policy (with the API or dashboard) and wanted to test its configuration. - Production. Your policy has been set to Productiony in the dashboard or to use the
PRODUCTION
network via the API. For example, this would be the case if you updated your policy (with the API or dashboard) to go live with its configuration. - Local. If you've loaded a version of your policy locally in the Script Management Policy Tester so you can make quick changes and test them.
- Staging. Your policy has been set to Staging Analysis only in the dashboard or to use the
Applied vs. loaded
Applied. When you create or edit a policy and set it to use a specific network—staging or production—that policy is applied for use on that network's version of your Ion property. The policy's actions will be used to manage script usage with each client request for your site or app.
Loaded. You can use the Script Management Policy Tester to access a version of your policy. Its settings, and any changes you may make to it, are loaded locally in your browser. A loaded policy's actions are only used to manage script usage as you request pages locally from your site or app. See Manage a policy locally for more details.
Manage a policy locally
You can make changes to the actions used in a policy and activate them locally. This way, you can experiment with different settings for scripts and confirm how they affect pages on your site, locally in your browser. Here are the benefits:
-
The changes you make are local, only. If you have an active policy on the staging or production networks, the actions set in it won't be affected.
-
You don't have to use the Script Management dashboard. Traditionally, you'd need to use the dashboard to make changes, activate the changes on the staging network and wait for them to propagate, then test them to see if they're applicable. This way, you can make the changes and quickly test them locally.
1. Set up for test
Follow these steps to use this method:
-
Launch the browser and navigate to one of the pages that uses a script from your policy.
-
Open the developer tools console:
- macOS. Press Command+Opt+I.
- Windows. Press Ctrl+Shift+I.
-
Select the SM tab from the console. (You may need to click >> to reveal this tab.)
-
Click Retrieve policies and select the applicable version of the policy—staging or production.
-
Load a policy in the Script Management Policy Tester.
-
In the scripts list, decide where you want to apply an action. You can apply one to all scripts in a group or expand a folder to apply actions to individual scripts.
-
Use the menu in the Action testing locally column to change the action. The setting that you changed is highlighted in yellow.
-
Make any additional changes to actions that you want to test.
You can use the command menu above the scripts list to discard changes that you haven't applied locally, match the local actions to those on the last-selected network policy (staging or production), or set all scripts to No action. After selecting a command, click Apply.
-
Optionally, use the Single-Point-of-Failure (SPOF) Protection:
- Click its switch. This toggles it on or off.
- Click Advanced settings. This lets you adjust the upper and lower limits of the timeout range.
-
Click Apply version locally. Your experimental policy is now live in your browser.
-
Test the page to see the effects of your changes.
2. Apply the changes
Did you see improvements after you tested with your local policy? You'll need to apply the changes in your actual policy.
Use the API
Start by noting the network version and changed actions you've applied in your local policy. Next, you'll want to get that network version of your policy:
Finally, you want to update the policy using the changed actions you noted, based on the network:
Staging
Production
Use the dashboard
-
Make a note of the network version and changed actions you've applied in your local policy.
-
Access your policy in the Script Management dashboard in Akamai Control Center.
-
Select the appropriate network version and edit your policy to apply the changes.
-
Activate the policy.
Updated almost 2 years ago