A
A
Alexey2018-11-26 16:19:53
MODX
Alexey, 2018-11-26 16:19:53

Why is there a problem with hosting GTM code on the MODx site?

Folks, getting back to the MODx topic.
I must say right away that I have never worked with her, I began to understand less than a month ago with a ready-made and working site. So the problem...
When placing the Google Tag Manager code in the page template, the page stops loading, or rather, the following is displayed instead:

{'MetaX' | snippet : ['tpl'=>'metax-html5']} {'topbar' | chunk} {'header' | chunk} {$_modx->getChunk('ContentType.' ~ $_modx->resource.template)} {'footer' | chunk} {2 | resource : 'settingsPrebody'}

Here is the template code (head without body):
https://codepen.io/alexej-trikoz/pen/RqJXgW
Here is Metax html5 chunk code : https://codepen.io/alexej-trikoz/pen/ZmRgXj And MetaX snippet code (if needed): https://codepen.io/alexej-trikoz/pen/dQKxeo I tried to get around by installing the GoogleTagManagerMODX plugin. Installed and configured. I add a plugin snippet to the template - the same error crashes! Can you help with advice?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oe24y, 2018-12-01
@oe24y

Just add GTM code to the chunk and don't use any MetaX.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question