etc/frontend/di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Framework\View\Layout">
<plugin name="layout-before-get-output" type="Dakzilla\CacheTags\Model\Layout\Plugin" />
</type>
</config>