4

We have a community that uses the Napoli template. We want to add Google Tag Manager code to the community pages. How can you add javascript to community pages? We tried to add the javascript to the footer under the branding section, but the code didn't show up on the pages. Do we have to build a custom lightning component and add to the pages to inject the javascript? What options are available?

1
  • Have you tried adding JavaScript in Header section, should not matter ideally. Was there any JavaScript error in console while it was there in footer? – Raul Oct 17 '16 at 22:00
3

You can configure in advanced settings .Check the screenshots below

enter image description here

Click on the Edit Head Markup button and add the markup

enter image description here

I have not tried approach 1 and in case this does not work ,try the below one

Create a lightning component with iframe src as mentioned in the docs and drag the component on all pages .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.