How to install tag manager for the Fluend Community plugin
Hello. My Tag Manager is not sending events in the Fluent community part of the site. How can we send events via tag manager?
FIX
Add this to the functions.php in the child theme
/* FluentCommunity: Tag Manager in portal footer */ add_action('fluent_community/portal_footer', function() { ?> \ \ (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-NT8SN4N3'); \ \ \<?php }, 1000);
follow
fix it here. Add this to the functions.php in the child theme
/**
- FluentCommunity: Tag Manager in portal footer
*/
add_action('fluent_community/portal_footer', function() {
?>
\
\
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NT8SN4N3');
\
\
\<?php
}, 1000);