S
S
sattva20122017-04-24 20:46:09
Yii
sattva2012, 2017-04-24 20:46:09

How to add google tagmanager code to yii2?

How to add yii2 code to google tagmanager?

TK from google tagmanaer
1e0f111156d649549c0d2ef318575d3e.jpg
Insert this snippet in the "head" section of the page code as close to the beginning as possible:
I understand in "\frontend\views\layouts\main.php" and "\frontend\views\layouts\main_index.php"
after the section:
<?php $this->beginPage() ?>
? Also insert the following snippet
directly after the opening "body"
tag: and here after:
<?php $this->beginBody();?>
?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-04-24
@slo_nik

Good evening.
Add scripts via app/AppAsset.php file and registerJs(), registerJsFile()
Resources

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question