Download the PHP package harugon/gtm without Composer
On this page you can find all versions of the php package harugon/gtm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package gtm
Gtm (MediaWiki Extension)
MediaWiki に Google Tag Manager (GTM) のコンテナスニペットを追加する拡張機能です。
概要
この MediaWiki 拡張は、すべてのページに Google タグ マネージャーのコンテナスニペットを自動挿入します。
<script>
タグは<head>
内に追加されます<noscript>
タグは<body>
の末尾に追加されます(※無効化可能)- 1st-party Tag Gateway 経由の配信にも対応
ダウンロード
Releases · harugon/Gtm
から Gtm-vX.X.X.tar.gz
をダウンロードし、extensions/
フォルダに展開してください。
インストール
LocalSettings.php
に以下を追記してください。
`
設定項目
Config名 | 説明 | 例 |
---|---|---|
\$wgGtmId | GTM コンテナ ID | $wgGtmId = "GTM-XXXXXX"; |
\$wgGtmBeforeTag | gtm.js の 上に追加する任意タグ | $wgGtmBeforeTag = "<script>/* custom */</script>"; |
\$wgGtmAfterTag | gtm.js の 下に追加する任意タグ | $wgGtmAfterTag = "<script>/* custom */</script>"; |
\$wgGtmData | OutputPage::getJSVars() から dataLayer に追加するキー |
$wgGtmData = ['wgPageName','wgUserId']; |
\$wgGtmNoScript | <noscript> タグを追加するかどうか |
$wgGtmNoScript = false; |
\$wgGtmAttribs | <script> タグの属性(連想配列で指定) |
$wgGtmAttribs = ["data-cookieconsent"=>"ignore"]; |
\$wgGtmTagGatewayPath | Google タグゲートウェイのパス(例 /metrics ) |
$wgGtmTagGatewayPath = "/metrics"; |
\$wgGtmTagGateway | タグゲートウェイを有効化するかどうか(true で有効) | $wgGtmTagGateway = true; |
関連資料
ライセンス
MIT
Author
All versions of gtm with dependencies
PHP Build Version
Package Version
No informations.
The package harugon/gtm contains the following files
Loading the files please wait ....