Skip to content

Commit 0590f48

Browse files
author
Pooya Parsa
committed
fix google-analytics
1 parent c8d2842 commit 0590f48

File tree

4 files changed

+33
-43
lines changed

4 files changed

+33
-43
lines changed

docs/nuxt.config.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ const marked = require('marked');
44

55
// Markdown renderer with BS4 tables support
66
const renderer = new marked.Renderer();
7-
const originalTable = renderer.table
7+
const originalTable = renderer.table;
88
renderer.table = function renderTable(header, body) {
9-
let r = originalTable.apply(this, arguments)
9+
let r = originalTable.apply(this, arguments);
1010
return r.replace('<table>', '<table class="table b-table table-sm table-striped">')
11-
.replace('<thead>', '<thead class="thead-default">')
12-
}
11+
.replace('<thead>', '<thead class="thead-default">');
12+
};
1313

1414
module.exports = {
1515
srcDir: __dirname,
@@ -18,9 +18,9 @@ module.exports = {
1818
extractCSS: true,
1919
cssSourceMap: true,
2020
extend(config) {
21-
config.resolve.alias['vue'] = 'vue/dist/vue.common'
21+
config.resolve.alias.vue = 'vue/dist/vue.common';
2222

23-
config.devtool = 'source-map'
23+
config.devtool = 'source-map';
2424

2525
config.module.rules.push({
2626
test: /\.md$/,
@@ -33,7 +33,6 @@ module.exports = {
3333
}
3434
},
3535

36-
3736
loading: {
3837
color: '#59cc93'
3938
},
@@ -56,7 +55,7 @@ module.exports = {
5655
.concat(scan('src', 'components', ['link']))
5756
.concat(scan('src', 'directives', ['modal', 'toggle']))
5857
.concat(scan('docs/markdown', 'reference'))
59-
.concat(scan('docs/markdown', 'misc'))
58+
.concat(scan('docs/markdown', 'misc'));
6059
}
6160
},
6261

@@ -69,9 +68,17 @@ module.exports = {
6968
],
7069

7170
modules: [
72-
'@nuxtjs/pwa'
71+
'@nuxtjs/pwa',
72+
'@nuxtjs/google-analytics'
7373
],
7474

75+
'google-analytics': {
76+
id: 'UA-89526435-1',
77+
autoTracking: {
78+
exception: true
79+
}
80+
},
81+
7582
css: [
7683
'bootstrap/dist/css/bootstrap.css',
7784
'highlightjs/styles/atom-one-light.css',

docs/plugins/ga.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"vue-functional-data-merge": "^1.0.6"
6969
},
7070
"devDependencies": {
71+
"@nuxtjs/google-analytics": "^2.0.1",
7172
"@nuxtjs/pwa": "^1.0.0",
7273
"babel-cli": "^6.26.0",
7374
"babel-plugin-external-helpers": "^6.22.0",

yarn.lock

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
# yarn lockfile v1
33

44

5+
"@nuxtjs/google-analytics@^2.0.1":
6+
version "2.0.1"
7+
resolved "https://registry.yarnpkg.com/@nuxtjs/google-analytics/-/google-analytics-2.0.1.tgz#224dffb4f1a7f9d196ea92d3284e4f68ddffb099"
8+
dependencies:
9+
vue-analytics "^5.1.1"
10+
511
"@nuxtjs/icon@^1.1.2":
612
version "1.1.2"
713
resolved "https://registry.yarnpkg.com/@nuxtjs/icon/-/icon-1.1.2.tgz#a70d05515f2ce7808db8ccf2e6dc0432523abe3f"
@@ -4326,6 +4332,10 @@ load-json-file@^2.0.0:
43264332
pify "^2.0.0"
43274333
strip-bom "^3.0.0"
43284334

4335+
load-script@^1.0.0:
4336+
version "1.0.0"
4337+
resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4"
4338+
43294339
loader-runner@^2.3.0:
43304340
version "2.3.0"
43314341
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
@@ -7367,6 +7377,12 @@ void-elements@^2.0.1:
73677377
version "2.0.1"
73687378
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
73697379

7380+
vue-analytics@^5.1.1:
7381+
version "5.3.0"
7382+
resolved "https://registry.yarnpkg.com/vue-analytics/-/vue-analytics-5.3.0.tgz#f7bf3bb5c5b3cb34f15347a7c72ef1b4f67e60c3"
7383+
dependencies:
7384+
load-script "^1.0.0"
7385+
73707386
vue-functional-data-merge@^1.0.6:
73717387
version "1.0.6"
73727388
resolved "https://registry.yarnpkg.com/vue-functional-data-merge/-/vue-functional-data-merge-1.0.6.tgz#cde4f0cf3f251f7f0196341156d2c936cca63d40"

0 commit comments

Comments
 (0)