diff --git a/gulpfile.js b/gulpfile.js index df0854b..bd8c26d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -72,6 +72,11 @@ gulp.task('markup', 'Build markup into ./build directory.', ['webpack'], functio hbStream.partials({ svg_styles: fs.readFileSync(__dirname + '/build/css/svg.css').toString() }); + if (process.env.GA_PROP) { + hbStream.data({ + 'gaPropertyId': process.env.GA_PROP + }); + } return gulp.src(config.globs.templates) .pipe(frontMatter()) .pipe(hbStream) diff --git a/lib/partials/google_analytics.hbs b/lib/partials/google_analytics.hbs new file mode 100644 index 0000000..fffd7eb --- /dev/null +++ b/lib/partials/google_analytics.hbs @@ -0,0 +1,11 @@ +{{#if gaPropertyId}} + +{{/if}} diff --git a/lib/partials/layout.hbs b/lib/partials/layout.hbs index b1a3d2a..356b857 100644 --- a/lib/partials/layout.hbs +++ b/lib/partials/layout.hbs @@ -10,6 +10,8 @@ + {{> "google_analytics"}} +