Hi there,

I enabled this module with basic settings (only GTM code).

But I cannot see any js or css appearing in html_head. I was expecting css and script to appear in head following : $attachments['#attached']['html_head']

Any idea how I can debug ? To be able to send you more information.

Cheers,

Comments

thecampious created an issue. See original summary.

webfaqtory’s picture

If the module is enabled and the page/role is enabled, you will see the following in the page source

<head>
    <meta charset="utf-8" />
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
})(window,document.documentElement,'async-hide','dataLayer',4000,
{'GTM-XXXXXX':true});</script>
<style>.async-hide { opacity: 0 !important} </style>
webfaqtory’s picture

Status: Active » Closed (works as designed)
thecampious’s picture

Title: Unable to see the js or css added inside the head page » Unable to see the js or css added inside the head page without role selected
Category: Support request » Bug report
Status: Closed (works as designed) » Needs work

Hi,

Thanks for the quick reply. I allow myself to provide you more information:

1) Following "Add the snippet only for the selected role(s). If none of the roles are selected, all users will have the snippet."

If I do not select any role, the snippet does not display for any user.

2) Alternative:

If at least 1 Container Ids (GTM-XXXXXX) is needed, and also 1 role, both or all fields should be mandatory with a placeholder if needed.

Cheers,

webfaqtory’s picture

Status: Needs work » Needs review

Fixed bug were snippet was never added if no roles selected

webfaqtory’s picture

Status: Needs review » Reviewed & tested by the community
webfaqtory’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.