9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Nuxt.jsでGTM、GAを設定する

Last updated at Posted at 2020-02-26

Nuxt.jsでのGoogleタグマネージャーとGoogleアナリティクスの実装をまとめます。

前提条件

  • Nuxt.jsがインストールされていること

インストール

各モジュールをインストールする

$ npm i --save @nuxtjs/google-tag-manager
$ npm i --save @nuxtjs/google-analytics

使い方

nuxt.config.js
module.exports = {
  modules: [
    ['@nuxtjs/google-tag-manager', { id: 'GTM-XXXXXXX' }], // 追記
    ['@nuxtjs/google-analytics', { id: 'UA-XXXXXXXX-X' }] // 追記
  }
}

参考文献

この記事は以下の情報を参考にして執筆しました。

9
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?