Move Google Analytics tracking id to .env file

This commit is contained in:
Ufuk Kayserilioglu committed 2015-03-27 18:33:59 +02:00
1 parent d6360cf735
commit bb41d04859
4 files changed
+11 -1

No files matched your search

+3
View File
@@ -16,3 +16,6 @@
# Ignore .DS_store file
.DS_Store
# Ignore the .env file
/.env
+2
View File
@@ -20,3 +20,5 @@ gem "tzinfo-data", platforms: [:mswin, :mingw]
gem "capybara"
gem "poltergeist"
gem "mini_magick"
gem "dotenv"
+2
View File
@@ -34,6 +34,7 @@ GEM
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
dotenv (0.9.0)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
@@ -167,6 +168,7 @@ PLATFORMS
DEPENDENCIES
capybara
dotenv
middleman (~> 3.3.10)
middleman-deploy (~> 1.0)
middleman-google-analytics
+4 -1
View File
@@ -1,5 +1,8 @@
require 'lib/screenshot_generator'
require 'ostruct'
require 'dotenv'
Dotenv.load
###
# Compass
###
@@ -77,7 +80,7 @@ end
activate :google_analytics do |ga|
# Property ID (default = nil)
ga.tracking_id = 'UA-60794054-1'
ga.tracking_id = ENV['ANALYTICS_ID']
# Tracking in development environment (default = true)
ga.development = false