google-analyticsseoliferaygoogle-tag-managerliferay-theme

Liferay and Google Tag Manager implementation


where should I add Google Tag Manager code?

From the documentation of GTM I should copy one script into head tag and another one at the start of body tag.

As far as i could research for liferay it should be added to the theme. Where exactly should I add the GTM code, (head and body code)

Any advice would be helpful, thanks! :)


Solution

  • you can use by the optimal way like JBaeza said or without Theme Settings if you use the theme only for one site. In the last case you can paste the head script before < / head > and the body script next to the < body > tag on the portal_normal.ftl

    Regards!