Project

General

Profile

Actions

Bug #1097

closed

GTM code

Added by Anonymous about 6 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
20 Sep 2019
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

Заметили, что GTM внедрен с ошибками:

1. Первая часть скрипта

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KF4XKJ');</script>

Вставлена в неправильное в блок body. Он должен находиться в разделе head, как можно ближе к началу.

2. Вторая часть скрипта

<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KF4XKJ&quot;;
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

вставлена в div, а должна быть вставлена сразу сразу после открывающего тега <body> или как можно ближе к нему, но главное быть вложенным в другие теги.

Actions

Also available in: Atom PDF