Skip to content

Commit

Permalink
feat: gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
LuXDAmore committed Apr 21, 2020
1 parent a78a067 commit 554f921
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions example/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
// Node
import { resolve } from 'path';

// Env
import dotenv from 'dotenv';
import * as PACKAGE from '../package.json';

// Var
const moduleFile = resolve(
// Vars
const ENV = dotenv
.config(
{
path: resolve(
__dirname,
'.env',
),
}
)
.parsed
// Module
, moduleFile = resolve(
__dirname,
'../lib/module'
)
Expand Down Expand Up @@ -83,6 +98,7 @@ export default {
* Modules
*/
modules: [
'@nuxtjs/gtm',
'@nuxtjs/pwa',
'@nuxtjs/markdownit',
moduleFile,
Expand All @@ -91,10 +107,16 @@ export default {
hostname: PACKAGE.homepage,
gzip: true,
},
gtm: {
id: ENV.ANALYTICS_ID,
dev: false,
scriptDefer: true,
},
/*
* buildModules
*/
buildModules: [
'@nuxtjs/dotenv',
'nuxt-compress',
'@nuxtjs/sitemap',
],
Expand Down

0 comments on commit 554f921

Please sign in to comment.