rack-ga-track 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +33 -0
- data/LICENSE.txt +22 -0
- data/README.md +59 -0
- data/Rakefile +35 -0
- data/VERSION +1 -0
- data/lib/rack-ga-track.rb +61 -0
- data/rack-ga-track.gemspec +68 -0
- data/spec/helper.rb +35 -0
- data/spec/rack_ga_track_spec.rb +80 -0
- metadata +197 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b92bcb3b371ada83ad23980f38d88415c8110f81
|
4
|
+
data.tar.gz: a265c689ac2191bbfc423976eb55978b96bcb3ae
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2336943aab1d42f717bf7407ce461eb9e9696b11708ab387da76656ab112edff9fec3d9b421dcd43488ed79fc1c7a015dd57ee7ac8eef740867773e0f3faf490
|
7
|
+
data.tar.gz: c2cbb3e4dfe72c65fbabe72524ba927653ddd54e5d9d0b05827e5652bc9c58d730e52178c63d07c9068512c7b80e3413c05c0e56a170e6778a73f669e18b7b66
|
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
gem "rack", "~> 1.5", ">= 1.5.2"
|
3
|
+
|
4
|
+
group :development do
|
5
|
+
gem "bundler", "~> 1.6", ">= 1.6.2"
|
6
|
+
gem "jeweler", "~> 1.6", ">= 1.6.4"
|
7
|
+
gem 'simplecov', '~> 0.8', ">= 0.8.2"
|
8
|
+
gem "rack-test", "~> 0.6", ">= 0.6.2"
|
9
|
+
gem "minitest", "~> 5.4", ">= 5.4.0"
|
10
|
+
gem "timecop", "~> 0.7", ">= 0.7.1"
|
11
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
docile (1.1.5)
|
5
|
+
git (1.2.7)
|
6
|
+
jeweler (1.6.4)
|
7
|
+
bundler (~> 1.0)
|
8
|
+
git (>= 1.2.5)
|
9
|
+
rake
|
10
|
+
minitest (5.4.0)
|
11
|
+
multi_json (1.10.1)
|
12
|
+
rack (1.5.2)
|
13
|
+
rack-test (0.6.2)
|
14
|
+
rack (>= 1.0)
|
15
|
+
rake (10.3.2)
|
16
|
+
simplecov (0.8.2)
|
17
|
+
docile (~> 1.1.0)
|
18
|
+
multi_json
|
19
|
+
simplecov-html (~> 0.8.0)
|
20
|
+
simplecov-html (0.8.0)
|
21
|
+
timecop (0.7.1)
|
22
|
+
|
23
|
+
PLATFORMS
|
24
|
+
ruby
|
25
|
+
|
26
|
+
DEPENDENCIES
|
27
|
+
bundler (~> 1.6, >= 1.6.2)
|
28
|
+
jeweler (~> 1.6, >= 1.6.4)
|
29
|
+
minitest (~> 5.4, >= 5.4.0)
|
30
|
+
rack (~> 1.5, >= 1.5.2)
|
31
|
+
rack-test (~> 0.6, >= 0.6.2)
|
32
|
+
simplecov (~> 0.8, >= 0.8.2)
|
33
|
+
timecop (~> 0.7, >= 0.7.1)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License
|
2
|
+
Original work Copyright (c) 2011 Alex Levin
|
3
|
+
Modified work Copyright (c) 2014 Unitio, Inc
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
Rack::GaTrack
|
2
|
+
================
|
3
|
+
|
4
|
+
Rack::GaTrack is a rack middleware that extracts Google Analytics Campaign
|
5
|
+
params from the request. Specifically, it looks for a param utm\_source in the request.
|
6
|
+
If found, it creates a cookie with utm\_source, utm\_content, utm\_term,
|
7
|
+
utm\_campaign, and time.
|
8
|
+
|
9
|
+
Use Case
|
10
|
+
---------------
|
11
|
+
Let's say you want to track signups in your app from a specific campaign.
|
12
|
+
|
13
|
+
1. A user clicks a link on an external site that has your Google Analytics
|
14
|
+
Campaign params in the request.
|
15
|
+
2. Rack::GaTrack finds utm\_source param in the
|
16
|
+
request and parses the other Google Analytics Campaign params from the request and saves them in a cookie.
|
17
|
+
3. If a user signs up now or in the future you can read the Google Analytics
|
18
|
+
Campaign params from the env variables that Rack::GaTrack creates and save
|
19
|
+
them to the created user record.
|
20
|
+
|
21
|
+
Installation
|
22
|
+
------------
|
23
|
+
gem install rack-ga-track
|
24
|
+
|
25
|
+
Rails 4 Example Usage
|
26
|
+
---------------------
|
27
|
+
|
28
|
+
Add the Rack::GaTrack to your application stack:
|
29
|
+
|
30
|
+
#Rails 4 in config/application.rb
|
31
|
+
class Application < Rails::Application
|
32
|
+
config.middleware.use Rack::GaTrack
|
33
|
+
end
|
34
|
+
|
35
|
+
You can now access your Google Analytics Campaign params in
|
36
|
+
<code>request.env['ga\_track.source']</code>
|
37
|
+
<code>request.env['ga\_track.term']</code>
|
38
|
+
<code>request.env['ga\_track.content']</code>
|
39
|
+
<code>request.env['ga\_track.campaign']</code>
|
40
|
+
<code>request.env['ga\_track.medium']</code>
|
41
|
+
|
42
|
+
Customization
|
43
|
+
-------------
|
44
|
+
|
45
|
+
By default cookie is set for 30 days, you can extend time to live with <code>:ttl</code> option (default is 30 days).
|
46
|
+
|
47
|
+
#Rails 4 in config/application.rb
|
48
|
+
class Application < Rails::Application
|
49
|
+
config.middleware.use Rack::Affiliates, :ttl => 3.months
|
50
|
+
end
|
51
|
+
|
52
|
+
The <code>:domain</code> option allows to customize cookie domain.
|
53
|
+
|
54
|
+
#Rails 4 in config/application.rb
|
55
|
+
class Application < Rails::Application
|
56
|
+
config.middleware.use Rack::Affiliates, :domain => '.example.org'
|
57
|
+
end
|
58
|
+
|
59
|
+
Rack::GaTrack will set cookie on <code>.example.org</code> so it's accessible on <code>www.example.org</code>, <code>app.example.org</code> etc.
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'rubygems'
|
3
|
+
require 'bundler'
|
4
|
+
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "rack-ga-track"
|
18
|
+
gem.homepage = "http://github.com/T1D/rack-ga-track"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Tracks referrals via Google Analytics Campaign links.}
|
21
|
+
gem.description = %Q{If the user visits via a Google Analytics Campaign link,
|
22
|
+
this middleware will track utm_source, utm_content, utm_term, utm_medium, utm_campaign, and time.}
|
23
|
+
gem.email = "dnolan@t1dexchange.org"
|
24
|
+
gem.authors = ["Daniel Nolan"]
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:spec) do |test|
|
30
|
+
test.libs << 'lib' << 'spec'
|
31
|
+
test.pattern = 'spec/**/*_spec.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
task :default => :spec
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Rack
|
2
|
+
class GaTrack
|
3
|
+
|
4
|
+
def initialize(app, opts = {})
|
5
|
+
@app = app
|
6
|
+
@cookie_ttl = opts[:ttl] || 60*60*24*30
|
7
|
+
@cookie_domain = opts[:domain] || nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def call(env)
|
11
|
+
req = Rack::Request.new(env)
|
12
|
+
status, headers, body = @app.call(env)
|
13
|
+
|
14
|
+
args = {}
|
15
|
+
|
16
|
+
if req.cookies['utm_source']
|
17
|
+
args = params_hash(req.cookies)
|
18
|
+
elsif req.params['utm_source']
|
19
|
+
args = params_hash(req.params)
|
20
|
+
create_cookies(headers, args)
|
21
|
+
end
|
22
|
+
|
23
|
+
unless args.empty?
|
24
|
+
create_env_vars(env, args)
|
25
|
+
end
|
26
|
+
|
27
|
+
[status, headers, body]
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def params_hash(params)
|
33
|
+
params['utm_time'] ||= Time.now
|
34
|
+
|
35
|
+
{
|
36
|
+
source: params['utm_source'],
|
37
|
+
medium: params['utm_medium'],
|
38
|
+
term: params['utm_term'],
|
39
|
+
content: params['utm_content'],
|
40
|
+
campaign: params['utm_campaign'],
|
41
|
+
time: params['utm_time'].to_i
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
def create_cookies(headers, args)
|
46
|
+
expires = Time.now + @cookie_ttl
|
47
|
+
args.each do |key, value|
|
48
|
+
cookie_hash = {:value => value, :expires => expires}
|
49
|
+
cookie_hash[:domain] = @cookie_domain if @cookie_domain
|
50
|
+
cookie_key = 'utm_' + key.to_s
|
51
|
+
Rack::Utils.set_cookie_header!(headers, cookie_key, cookie_hash)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def create_env_vars(env, args)
|
56
|
+
args.each do |key, value|
|
57
|
+
env["ga_track.#{key.to_s}"] = value
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: rack-ga-track 0.1.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "rack-ga-track"
|
9
|
+
s.version = "0.1.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Daniel Nolan"]
|
14
|
+
s.date = "2014-07-15"
|
15
|
+
s.description = "If the user visits via a Google Analytics Campaign link,\n this middleware will track utm_source, utm_content, utm_term, utm_medium, utm_campaign, and time."
|
16
|
+
s.email = "dnolan@t1dexchange.org"
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.md",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"lib/rack-ga-track.rb",
|
29
|
+
"rack-ga-track.gemspec",
|
30
|
+
"spec/helper.rb",
|
31
|
+
"spec/rack_ga_track_spec.rb"
|
32
|
+
]
|
33
|
+
s.homepage = "http://github.com/T1D/rack-ga-track"
|
34
|
+
s.licenses = ["MIT"]
|
35
|
+
s.rubygems_version = "2.3.0"
|
36
|
+
s.summary = "Tracks referrals via Google Analytics Campaign links."
|
37
|
+
|
38
|
+
if s.respond_to? :specification_version then
|
39
|
+
s.specification_version = 4
|
40
|
+
|
41
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
42
|
+
s.add_runtime_dependency(%q<rack>, [">= 1.5.2", "~> 1.5"])
|
43
|
+
s.add_development_dependency(%q<bundler>, [">= 1.6.2", "~> 1.6"])
|
44
|
+
s.add_development_dependency(%q<jeweler>, [">= 1.6.4", "~> 1.6"])
|
45
|
+
s.add_development_dependency(%q<simplecov>, [">= 0.8.2", "~> 0.8"])
|
46
|
+
s.add_development_dependency(%q<rack-test>, [">= 0.6.2", "~> 0.6"])
|
47
|
+
s.add_development_dependency(%q<minitest>, [">= 5.4.0", "~> 5.4"])
|
48
|
+
s.add_development_dependency(%q<timecop>, [">= 0.7.1", "~> 0.7"])
|
49
|
+
else
|
50
|
+
s.add_dependency(%q<rack>, [">= 1.5.2", "~> 1.5"])
|
51
|
+
s.add_dependency(%q<bundler>, [">= 1.6.2", "~> 1.6"])
|
52
|
+
s.add_dependency(%q<jeweler>, [">= 1.6.4", "~> 1.6"])
|
53
|
+
s.add_dependency(%q<simplecov>, [">= 0.8.2", "~> 0.8"])
|
54
|
+
s.add_dependency(%q<rack-test>, [">= 0.6.2", "~> 0.6"])
|
55
|
+
s.add_dependency(%q<minitest>, [">= 5.4.0", "~> 5.4"])
|
56
|
+
s.add_dependency(%q<timecop>, [">= 0.7.1", "~> 0.7"])
|
57
|
+
end
|
58
|
+
else
|
59
|
+
s.add_dependency(%q<rack>, [">= 1.5.2", "~> 1.5"])
|
60
|
+
s.add_dependency(%q<bundler>, [">= 1.6.2", "~> 1.6"])
|
61
|
+
s.add_dependency(%q<jeweler>, [">= 1.6.4", "~> 1.6"])
|
62
|
+
s.add_dependency(%q<simplecov>, [">= 0.8.2", "~> 0.8"])
|
63
|
+
s.add_dependency(%q<rack-test>, [">= 0.6.2", "~> 0.6"])
|
64
|
+
s.add_dependency(%q<minitest>, [">= 5.4.0", "~> 5.4"])
|
65
|
+
s.add_dependency(%q<timecop>, [">= 0.7.1", "~> 0.7"])
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
data/spec/helper.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
|
4
|
+
begin
|
5
|
+
Bundler.setup(:default, :development)
|
6
|
+
rescue Bundler::BundlerError => e
|
7
|
+
$stderr.puts e.message
|
8
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
9
|
+
exit e.status_code
|
10
|
+
end
|
11
|
+
|
12
|
+
require "simplecov"
|
13
|
+
SimpleCov.start
|
14
|
+
|
15
|
+
require "minitest/spec"
|
16
|
+
require "minitest/autorun"
|
17
|
+
require "rack/test"
|
18
|
+
require 'timecop'
|
19
|
+
|
20
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
21
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
22
|
+
require 'rack-ga-track'
|
23
|
+
|
24
|
+
class MiniTest::Test
|
25
|
+
include Rack::Test::Methods
|
26
|
+
|
27
|
+
def app
|
28
|
+
hello_world_app = lambda do |env|
|
29
|
+
[200, {}, "Hello World"]
|
30
|
+
end
|
31
|
+
|
32
|
+
@app = Rack::GaTrack.new(hello_world_app)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe "RackGaTrack" do
|
4
|
+
before :each do
|
5
|
+
clear_cookies
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should handle empty GA Campaign params" do
|
9
|
+
get '/'
|
10
|
+
|
11
|
+
last_request.env['ga_track.source'].must_equal nil
|
12
|
+
last_request.env['ga_track.term'].must_equal nil
|
13
|
+
last_request.env['ga_track.campaign'].must_equal nil
|
14
|
+
last_request.env['ga_track.content'].must_equal nil
|
15
|
+
last_request.env['ga_track.medium'].must_equal nil
|
16
|
+
last_request.env['ga_track.time'].must_equal nil
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should set ga_track env vars from params" do
|
20
|
+
Timecop.freeze do
|
21
|
+
@time = Time.now
|
22
|
+
get '/', {utm_source: 'testing', utm_campaign: 'email', utm_content: 'test_content'}
|
23
|
+
end
|
24
|
+
|
25
|
+
last_request.env['ga_track.source'].must_equal "testing"
|
26
|
+
last_request.env['ga_track.campaign'].must_equal "email"
|
27
|
+
last_request.env['ga_track.content'].must_equal "test_content"
|
28
|
+
last_request.env['ga_track.time'].must_equal @time.to_i
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should save GA Campaign params in a cookie" do
|
32
|
+
Timecop.freeze do
|
33
|
+
@time = Time.now
|
34
|
+
get '/', {utm_source: 'testing', utm_campaign: 'email', utm_content: 'test_content'}
|
35
|
+
end
|
36
|
+
|
37
|
+
rack_mock_session.cookie_jar["utm_source"].must_equal "testing"
|
38
|
+
rack_mock_session.cookie_jar["utm_campaign"].must_equal "email"
|
39
|
+
rack_mock_session.cookie_jar["utm_content"].must_equal "test_content"
|
40
|
+
rack_mock_session.cookie_jar["utm_time"].must_equal "#{@time.to_i}"
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "when cookie exists" do
|
44
|
+
before :each do
|
45
|
+
@time = Time.now
|
46
|
+
clear_cookies
|
47
|
+
set_cookie("utm_source=testing")
|
48
|
+
set_cookie("utm_campaign=email")
|
49
|
+
set_cookie("utm_content=test_content")
|
50
|
+
set_cookie("utm_time=#{@time.to_i}")
|
51
|
+
end
|
52
|
+
|
53
|
+
it "should restore GA Campaign params from cookie" do
|
54
|
+
Timecop.freeze do
|
55
|
+
get '/'
|
56
|
+
end
|
57
|
+
|
58
|
+
last_request.env['ga_track.source'].must_equal "testing"
|
59
|
+
last_request.env['ga_track.campaign'].must_equal "email"
|
60
|
+
last_request.env['ga_track.content'].must_equal "test_content"
|
61
|
+
last_request.env['ga_track.time'].must_equal @time.to_i
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'should not update existing cookie' do
|
65
|
+
Timecop.freeze(60*60*24) do
|
66
|
+
get '/'
|
67
|
+
end
|
68
|
+
|
69
|
+
last_request.env['ga_track.source'].must_equal "testing"
|
70
|
+
last_request.env['ga_track.campaign'].must_equal "email"
|
71
|
+
last_request.env['ga_track.content'].must_equal "test_content"
|
72
|
+
last_request.env['ga_track.time'].must_equal @time.to_i
|
73
|
+
|
74
|
+
rack_mock_session.cookie_jar["utm_source"].must_equal "testing"
|
75
|
+
rack_mock_session.cookie_jar["utm_campaign"].must_equal "email"
|
76
|
+
rack_mock_session.cookie_jar["utm_content"].must_equal "test_content"
|
77
|
+
rack_mock_session.cookie_jar["utm_time"].must_equal "#{@time.to_i}"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
metadata
ADDED
@@ -0,0 +1,197 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rack-ga-track
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Nolan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rack
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.5.2
|
20
|
+
- - "~>"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '1.5'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.5.2
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.5'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: bundler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 1.6.2
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '1.6'
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.6.2
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '1.6'
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: jeweler
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 1.6.4
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.6'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.6.4
|
70
|
+
- - "~>"
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '1.6'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: simplecov
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 0.8.2
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.8'
|
83
|
+
type: :development
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.8.2
|
90
|
+
- - "~>"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0.8'
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: rack-test
|
95
|
+
requirement: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 0.6.2
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.6'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.6.2
|
110
|
+
- - "~>"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0.6'
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: minitest
|
115
|
+
requirement: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 5.4.0
|
120
|
+
- - "~>"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '5.4'
|
123
|
+
type: :development
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: 5.4.0
|
130
|
+
- - "~>"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '5.4'
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: timecop
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 0.7.1
|
140
|
+
- - "~>"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0.7'
|
143
|
+
type: :development
|
144
|
+
prerelease: false
|
145
|
+
version_requirements: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ">="
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 0.7.1
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.7'
|
153
|
+
description: |-
|
154
|
+
If the user visits via a Google Analytics Campaign link,
|
155
|
+
this middleware will track utm_source, utm_content, utm_term, utm_medium, utm_campaign, and time.
|
156
|
+
email: dnolan@t1dexchange.org
|
157
|
+
executables: []
|
158
|
+
extensions: []
|
159
|
+
extra_rdoc_files:
|
160
|
+
- LICENSE.txt
|
161
|
+
- README.md
|
162
|
+
files:
|
163
|
+
- Gemfile
|
164
|
+
- Gemfile.lock
|
165
|
+
- LICENSE.txt
|
166
|
+
- README.md
|
167
|
+
- Rakefile
|
168
|
+
- VERSION
|
169
|
+
- lib/rack-ga-track.rb
|
170
|
+
- rack-ga-track.gemspec
|
171
|
+
- spec/helper.rb
|
172
|
+
- spec/rack_ga_track_spec.rb
|
173
|
+
homepage: http://github.com/T1D/rack-ga-track
|
174
|
+
licenses:
|
175
|
+
- MIT
|
176
|
+
metadata: {}
|
177
|
+
post_install_message:
|
178
|
+
rdoc_options: []
|
179
|
+
require_paths:
|
180
|
+
- lib
|
181
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: '0'
|
186
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
|
+
requirements:
|
188
|
+
- - ">="
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '0'
|
191
|
+
requirements: []
|
192
|
+
rubyforge_project:
|
193
|
+
rubygems_version: 2.3.0
|
194
|
+
signing_key:
|
195
|
+
specification_version: 4
|
196
|
+
summary: Tracks referrals via Google Analytics Campaign links.
|
197
|
+
test_files: []
|