Preflight setup

Running Preflight requires setting it up in your authoring environment. You can set up Preflight for Universal Editor, Document-based authoring, the AEM Sites Page Editor, or Adobe Managed Services, so you can run Preflight audits on your pages before they are published.

Enable user access

To use Preflight, ensure that your user is assigned to at least one of the following AEM Sites Optimizer product profiles in Adobe Admin Console:

  • AEM Sites Optimizer - Auto-Suggest User
  • AEM Sites Optimizer - Auto-Optimize User

Enable Preflight

Universal Editor

To set up Preflight in Universal Editor, follow these steps:

  1. Open the Extension Manager at:
    https://experience.adobe.com/#/@org/aem/extension-manager/universal-editor
  2. Locate the AEM Sites Optimizer Preflight Extension.
  3. The organization’s System Administrator will need to enable this extension.
  4. After the extension is enabled, open a page in Universal Editor, for example:
    https://author-p12345-e123456.adobeaemcloud.com/ui#/@org/aem/universal-editor/canvas/author-p12345-e123456.adobeaemcloud.com/content/en/example/home.html
  5. The Preflight Extension appears in the side rail.
  6. Select the Preflight Extension from the side rail to open Preflight for the current page.
Document-based authoring

To set up Preflight for Document-based authoring, follow these steps:

  1. Add the following configuration to /tools/sidekick/config.json in your Edge Delivery Services project’s GitHub repository:

    code language-json
    {
      "plugins": [
        {
          "id": "preflight",
          "titleI18n": {
            "en": "Preflight"
          },
          "environments": ["preview"],
          "event": "preflight"
        }
      ]
    }
    
  2. Create a new file /tools/sidekick/aem-sites-optimizer-preflight.js and add the following content:

    code language-javascript
    (function () {
      let isAEMSitesOptimizerPreflightAppLoaded = false;
      function loadAEMSitesOptimizerPreflightApp() {
        const script = document.createElement('script');
        script.src = 'https://experience.adobe.com/solutions/OneAdobe-aem-sites-optimizer-preflight-mfe/static-assets/resources/sidekick/client.js?source=plugin';
        script.onload = function () {
          isAEMSitesOptimizerPreflightAppLoaded = true;
        };
        script.onerror = function () {
          console.error('Error loading AEMSitesOptimizerPreflightApp.');
        };
        document.head.appendChild(script);
      }
    
      function handlePluginButtonClick() {
        if (!isAEMSitesOptimizerPreflightAppLoaded) {
          loadAEMSitesOptimizerPreflightApp();
        }
      }
    
      // Sidekick V1 extension support
      const sidekick = document.querySelector('helix-sidekick');
      if (sidekick) {
        sidekick.addEventListener('custom:preflight', handlePluginButtonClick);
      } else {
        document.addEventListener('sidekick-ready', () => {
          document.querySelector('helix-sidekick')
            .addEventListener('custom:preflight', handlePluginButtonClick);
        }, { once: true });
      }
    
      // Sidekick V2 extension support
      const sidekickV2 = document.querySelector('aem-sidekick');
      if (sidekickV2) {
        sidekickV2.addEventListener('custom:preflight', handlePluginButtonClick);
      } else {
        document.addEventListener('sidekick-ready', () => {
          document.querySelector('aem-sidekick')
            .addEventListener('custom:preflight', handlePluginButtonClick);
        }, { once: true });
      }
    }());
    
  3. Update the loadLazy() function in /scripts/scripts.js to import the Preflight script for preview URLs:

    code language-javascript
    if (window.location.href.includes('.aem.page')) {
       import('../tools/sidekick/aem-sites-optimizer-preflight.js');
    }
    
  4. Open the preview URL (*.aem.page) of the page that you want to audit.

  5. In Sidekick, click the Preflight button to open Preflight for the current page.

AEM Sites Page Editor

If your author environment is running AEM 2026.7.0 (release 27083) or later, Preflight is built into the AEM Sites Page Editor and no bookmarklet is required. Follow these steps:

  1. Open the page you want to audit in the AEM Sites Page Editor.

  2. In the editor toolbar, select the Preflight icon (the play button, highlighted below) to open the Preflight panel for the current page.

    The Preflight icon in the AEM Sites Page Editor toolbar {align="center"}

note
NOTE
Don’t see the Preflight icon in the toolbar? Check the following:
  • Supported release — The integrated button requires AEM 2026.7.0 (release 27083) or later. On earlier releases, use the bookmarklet method below.
  • Rollout — The integrated button is being enabled for organizations in stages, so it may not have reached your organization yet, even on a supported release. Until it does, use the bookmarklet method below, or reach out to Adobe or your administrator.
  • Page access — The button appears only when you have edit access to the page.
  • User access — Confirm your user is assigned the AEM Sites Optimizer - Auto-Suggest User or AEM Sites Optimizer - Auto-Optimize User profile. See Enable user access.

To use Preflight in the AEM Sites Page Editor on earlier AEM releases, you can create a bookmarklet in your web browser. Follow these steps:

  1. Show your Bookmarks Bar in your web browser:

    • Press Ctrl+Shift+B (Windows) or Cmd+Shift+B (Mac).
  2. Create a new bookmark in your browser:

    • Right-click the Bookmarks Bar and select New Page or Add Bookmark.
    • In the Address (URL) field, paste the following code:
    code language-javascript
    javascript:(function(){const script=document.createElement('script');script.src='https://experience.adobe.com/solutions/OneAdobe-aem-sites-optimizer-preflight-mfe/static-assets/resources/sidekick/client.js?source=bookmarklet&target-source=aem-cloud-service';document.head.appendChild(script);})();
    
  3. Name the bookmark Preflight (or any name you prefer).

  4. Open the preview URL (*.aem.page) of the page that you want to audit in the AEM Sites Page Editor.

  5. Click the Preflight bookmark in your Bookmarks Bar to open Preflight for the current page.

Adobe Managed Services
note important
IMPORTANT
Only Adobe Managed Services (AMS) environments that use Adobe’s Identity Provider (IMS) for authentication on AEM Author are supported. Preflight does not work if your organization uses any other identity provider for AMS authentication.

When Preflight is built into the AEM Sites Page Editor toolbar, no bookmarklet is required. Contact Adobe to get it installed for your organization. After it is installed, follow these steps:

  1. Open the page you want to audit in the AEM Sites Page Editor.

  2. In the editor toolbar, select the Preflight icon (the play button, highlighted below) to open the Preflight panel for the current page.

    The Preflight icon in the AEM Sites Page Editor toolbar {align="center"}

note
NOTE
Don’t see the Preflight icon in the toolbar? The integrated button may not be installed for your organization yet. Contact Adobe to have it installed, or use the bookmarklet method below.

To use Preflight in the AEM Sites Page Editor on an AMS environment without the toolbar icon, create a bookmarklet in your web browser, following these steps:

  1. Show your Bookmarks Bar in your web browser:

    • Press Ctrl+Shift+B (Windows) or Cmd+Shift+B (Mac).
  2. Create a new bookmark in your browser:

    • Right-click the Bookmarks Bar and select New Page or Add Bookmark.
    • In the Address (URL) field, paste the following code:
    code language-javascript
    javascript:(function(){const script=document.createElement('script');script.src='https://experience.adobe.com/solutions/OneAdobe-aem-sites-optimizer-preflight-mfe/static-assets/resources/sidekick/client.js?source=bookmarklet&target-source=ams';document.head.appendChild(script);})();
    
  3. Name the bookmark Preflight (or any name you prefer).

  4. Open the page you want to audit in the AEM Sites Page Editor.

  5. Click the Preflight bookmark in your Bookmarks Bar to open Preflight for the current page.

Best practices

When running Preflight audits, keep the following guidelines in mind:

  • Always run audits on staging or preview pages before publishing to production.
  • Prioritize resolving high-impact issues such as broken links, missing H1 tags, or insecure links.
  • Ensure that authentication is enabled for protected staging environments before running audits.
  • Review and apply meta tag recommendations to improve SEO performance.
recommendation-more-help
experience-manager-sites-optimizer-help-main-toc