Archived topic
Element hook stripping Google Analytics
4 replies · Started by Former User on September 20, 2019
Hi there,
When adding an element hook to embed Google Analytics, the code is stripped. Please see the screenshots.
Hi there,
thats odd - do you have any plugins / custom functions that you can try disabling to see if there is a conflict?
Hi David,
The only plugins installed are those included with the Theme. Would sanitizing unfiltered HTML affect the inclusion of the code? For example;
define( 'DISALLOW_UNFILTERED_HTML', true );
Hi David,
The sanitization of unfiltered HTML does affect the code block.
The directive define('DISALLOW_UNFILTERED_HTML', true ); has to be commented or removed prior to publishing the hook.
It may be valuable to update the GeneratePress so that if others have similar questions, there is a reference.
thats correct - in most managed WP environments unfiltered HTML is allowed for Admin/Super Admin roles. Hence why it probably has never shown up in the support forum.