How to mandate use of a "required component" on each page
Please share "How-To's", and ideas on the best ways to implement the following functionality
- A component that is able to walk-through the pages of any AEM site that it's pointed to, (maybe walking a list of sites), and verify that one or more "required" components exist on every page on each site.
- Another component that is able to check for the existence of a given analytics tag on every AEM page, and then update the page or template, and add the tag if it's not already on the page.
I'd want the second component to be mandated for use on every page, and I believe there is a way to have it added to every template, and then lock it down with an ACL, so that it can't be removed. I also believe there is a way to have "required component" included, as "boilerplate", so that they are on every template by default, but due to my limited experience, I'm not sure if this is the best way to achieve this, (i.e. best practice). Thanks for your suggestions, code examples and/or links to tutorials in advance.