A
A
Ajax2020-02-11 14:57:03
MODX
Ajax, 2020-02-11 14:57:03

How to put Yandex metric in Modx Revolution?

Hello.
A friend asked me to put a metric in Modx
I read about chunks, and started doing:
1. I created a chunk with the name metrica
2. I inserted the metric code into this chunk
3. I started looking for a header or footer chunk, I didn’t find chunks with such names, so I had to insert a chunk call "metrika" to a file, let's say footer along the path "core/elements/chunks/footer.tpl", but after inserting the chunk, the site just goes down. White screen and all! I also tried to just take and paste the metric code, also a white screen, tell me what to do, how to do everything right ??

5e4296809d53f753632791.png
5e42968c03e74862351418.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Tarasov, 2020-02-11
@karimsin

You probably have Fenom enabled, so there are two solutions.
Either wrap the metric code in your chunk in the {ignore} ...{/ignore} tag, or find in the metric itself where there is an opening curly brace next to the usual one and separate them with a space - { (.
This conflicts like a hair dryer and produces a white screen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question