Installing and Verifying the Nytro SEO JS Snippet on Adobe Experience Manager (AEM)

Installing and Verifying the Nytro SEO JS Snippet on Adobe Experience Manager (AEM)

Follow the instructions below based on whether you're working with Editable Templates or Classic Templates.

1. Create Your Page Template

For Editable Templates

  1. Log in to your AEM instance and navigate to Tools > General > Templates.

  2. Click Create and select Create Template.

  3. Choose Editable Template and provide a name and description.

For Classic Templates

  1. Similarly, create a Classic Template if required.

  2. Define the layout and components directly in the template files.


2. Extend sling:resourceType

For both Editable and Classic templates, extend the sling:resourceType property in your custom page component. This allows you to manage how scripts and other resources are included in your template.


3. Insert the JavaScript Snippet

For Classic Templates

1. Navigate to the head.html file in your custom page component folder.

2. Insert the JavaScript snippet directly into the file

This will ensure the script is included on every page that uses this template.

For Editable Templates

1. Create a Custom Component - Develop a custom component with a Rich Text Editor (RTE) field that allows administrators to input JavaScript snippets.

2. Add the Custom Component to the Structure Mode - Place the custom component in the Structure mode of the Editable Template so it is locked and cannot be modified on individual pages. Example code:

This setup ensures the JavaScript snippet is consistently applied across all pages derived from the template.


4. Publishing Changes

Once your templates are set up and the script is inserted:

  • For Editable Templates: Publish the template after confirming that the RTE field reflects the required JavaScript snippet.

  • For Classic Templates: Save and publish the head.html file to ensure the changes are applied to all relevant pages.


By following these steps, you can successfully embed the JavaScript snippet into your AEM page templates and ensure consistent implementation.

5. How to Verify the Snippet Installation

Nytro SEO Dashboard Verification

1. Go to the Nytro SEO dashboard.

2. From the left sidebar, select “Websites” ➡️ “Manage.”

3. Click the number next to your website to view the settings.

 

4. Under Website Optimisation, click the “OPEN” button next to “Snippet is not installed.” 

5. Click the “Verify installation” button (this may take a few seconds). 

6. A notification will be displayed about the status of the verification.

 

Using Browser Developer Tools

1. Open your website in a browser.

2. Right-click on the page and select "Inspect" or press F12.

3. Go to the "Elements" tab.

4. Click the arrow down next to the <head>.


5. Check the JS snippet by using the search shortcut (Ctrl + F).

Using Online Verification Tools

Utilize online tools like GTmetrix or Google Tag Assistant to verify the presence of the JS snippet, or use Chrome extensions.



    Submit a Ticket

      • Related Articles

      • Installing and Verifying the Nytro SEO JS Snippet on BigCommerce

        1: Locating the JS Snippet Go to the Nytro SEO dashboard. From the left sidebar, select “Websites” ➡️ “Manage.” Click the symbol ‘</>’ to view the JS snippet for your website. Copy the snippet code. Note: If you haven’t added your website yet, check ...
      • Installing and Verifying the Nytro SEO JS Snippet on WordPress

        The Nytro SEO JS Optimization Snippet allows for the automatic SEO optimization of your webpage code. To enable this feature, you need to copy and paste the JS snippet into the <HEAD> section of your website. Here’s a detailed guide to help you ...
      • Installing and Verifying the Nytro SEO JS Snippet on Wix

        1. How to Add the Snippet Locating the JS Snippet Go to the Nytro SEO dashboard. From the left sidebar, select “Websites” ➡️ “Manage.” Click the symbol ‘</>’ to view the JS snippet for your website. Copy the snippet code. Note: If you haven’t added ...
      • Installing and Verifying the Nytro SEO JS Snippet on Squarespace

        1. How to Add the Snippet Locating the JS Snippet Go to the Nytro SEO dashboard. From the left sidebar, select “Websites” ➡️ “Manage.” Click the symbol ‘</>’ to view the JS snippet for your website. Copy the snippet code. Note: If you haven’t added ...
      • Installing and Verifying the Nytro SEO JS Snippet on Duda

        1: Locating the JS Snippet Go to the Nytro SEO dashboard. From the left sidebar, select “Websites” ➡️ “Manage.” Click the symbol ‘</>’ to view the JS snippet for your website. Copy the snippet code. Note: If you haven’t added your website yet, check ...