Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Benoit Garret
committed
Dec 20, 2011
1 parent
526d818
commit a3923a8
Showing
8 changed files
with
90 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.bundle | ||
Gemfile.lock | ||
pkg/* | ||
.yardoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-m markdown --no-private --plugin rails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
In config/environments/production.rb : | ||
In `config/environments/production.rb` : | ||
|
||
# replace this with your tracker code | ||
GAR.tracker = "UA-xxxxxx-x" | ||
|
||
In your layout, between the `<head>` tag : | ||
In your layout, in the `<head>` tag : | ||
|
||
<%= analytics_init %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
module GoogleAnalytics | ||
module Rails | ||
# @private | ||
PLACEHOLDER_TRACKER = "UA-xxxxxx-x" | ||
|
||
# The current tracker id (*UA-xxxxxx-x*). | ||
mattr_accessor :tracker | ||
# @private | ||
@@tracker = PLACEHOLDER_TRACKER | ||
|
||
# @return [Boolean] | ||
def self.valid_tracker? | ||
tracker.blank? || tracker == PLACEHOLDER_TRACKER ? false : true | ||
end | ||
end | ||
end | ||
|
||
# Alias for GoogleAnalytics::Rails | ||
GAR = GoogleAnalytics::Rails | ||
|
||
require 'google-analytics-rails/railtie' if defined?(Rails) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
module Google | ||
module Analytics | ||
module Rails | ||
VERSION = "0.0.1" | ||
end | ||
module GoogleAnalytics | ||
module Rails | ||
# Gem version | ||
VERSION = "0.0.1" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters