Add Google Analytics tracking

This commit is contained in:
Ufuk Kayserilioglu committed 2015-03-16 15:04:16 +02:00
1 parent 511718e973
commit 70fdec22fd
4 files changed
+16

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ gem "middleman-livereload", "~> 3.1.0"
gem "middleman-pry", "~> 0.0.4" gem "middleman-pry", "~> 0.0.4"
gem "middleman-deploy", "~> 1.0" gem "middleman-deploy", "~> 1.0"
gem "middleman-google-analytics"
# For faster file watcher updates on Windows: # For faster file watcher updates on Windows:
gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw] gem "wdm", "~> 0.1.0", :platforms => [:mswin, :mingw]
+4
View File
@@ -83,6 +83,9 @@ GEM
middleman-core (>= 3.2) middleman-core (>= 3.2)
net-sftp net-sftp
ptools ptools
middleman-google-analytics (1.1.0)
middleman-core (~> 3.2)
uglifier (>= 2.1, < 3.0)
middleman-livereload (3.1.1) middleman-livereload (3.1.1)
em-websocket (>= 0.2.0) em-websocket (>= 0.2.0)
middleman-core (>= 3.0.2) middleman-core (>= 3.0.2)
@@ -166,6 +169,7 @@ DEPENDENCIES
capybara capybara
middleman (~> 3.3.10) middleman (~> 3.3.10)
middleman-deploy (~> 1.0) middleman-deploy (~> 1.0)
middleman-google-analytics
middleman-livereload (~> 3.1.0) middleman-livereload (~> 3.1.0)
middleman-pry (~> 0.0.4) middleman-pry (~> 0.0.4)
mini_magick mini_magick
+9
View File
@@ -74,6 +74,15 @@ configure :build do
# set :http_prefix, "/Content/images/" # set :http_prefix, "/Content/images/"
end end
activate :google_analytics do |ga|
# Property ID (default = nil)
ga.tracking_id = 'UA-60794054-1'
# Tracking in development environment (default = true)
ga.development = false
end
activate :deploy do |deploy| activate :deploy do |deploy|
deploy.method = :git deploy.method = :git
# Optional Settings # Optional Settings
+2
View File
@@ -22,6 +22,8 @@
</head> </head>
<body class="<%= page_classes %>"> <body class="<%= page_classes %>">
<%= google_analytics_universal_tag %>
<div ng-app="theme" ng-controller='ThemeController' <div ng-app="theme" ng-controller='ThemeController'
ng-init="theme = '<%= data.themes.first[:colors] %>'"> ng-init="theme = '<%= data.themes.first[:colors] %>'">
<style type="text/css" id="sidebar_theme_css"> <style type="text/css" id="sidebar_theme_css">