AD0-E137 practice question 3 of 10

A developer is adding a reference script to a third-party analytics tool. The script needs to be editable since it is being modified on a schedule outside of the team's development cycle. How should the developer complete this task?

Full set: 50 questions
Answer options
A: Add a new component with the script in the HTL.
B: Add the script to the page policy on the template.
C: Add a Generic Analytics Snippet. Correct answer
Correct Answer:
C. Add a Generic Analytics Snippet.
Explanation

The "Generic Analytics Snippet" is the standard AEM as a Cloud Service feature designed for this exact purpose. It leverages Context-Aware Configurations, allowing authorized users to add and modify third-party scripts directly through the AEM user interface. This decouples the script management from the development cycle, fulfilling the requirement that the script can be edited on a separate schedule without requiring a code deployment. This method is specifically intended for integrating external services like analytics tools.

Why Incorrect

A. Add a new component with the script in the HTL. Placing the script directly in a component's HTL file would require a code deployment to modify it, which contradicts the requirement for edits outside the development cycle.
B. Add the script to the page policy on the template. Page policies are for defining design properties and client library includes for a template. They are not intended for managing arbitrary, editable script snippets that change frequently.

References

1. Adobe Experience League. (2023). Integrating with Third-Party Services.

Reference: In the section "Generic Analytics Snippet," the documentation states, "The Generic Analytics Snippet lets a user configure a snippet of analytics code to be easily added to the pages of a site... This is done by using Context-Aware Configurations." This confirms it is the designated feature for adding editable, third-party scripts.

Source: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/sites/integrations/integrating-third-party-services.html?lang=en

2. Adobe Experience League. (2023). Context-Aware Configurations.

Reference: The overview explains that Context-Aware Configurations are "configurations that are related to a content resource... This allows you to... manage configurations for your sites in one place without being a developer." This supports the requirement that the script be editable outside the development cycle by non-developers.

Source: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/sites/developing/context-aware-configurations.html?lang=en

Scroll to Top