doc/metrics.textile in vanity-2.0.0.beta9 vs doc/metrics.textile in vanity-2.0.0
- old
+ new
@@ -41,11 +41,11 @@
class AccountsController < ApplicationController
def create
@person = Person.new(params[:person])
if @person.save
- track! :signup # track successful sign up
+ Vanity.track!(:signup) # track successful sign up
UserSession.create person
redirect_to root_url
else
render :action=>:new
end
@@ -58,11 +58,11 @@
You can call @track!@ with a value to track. This example tracks how many items were bought during the day:
<pre>
def checkout
- track! :items, @cart.items.count
+ Vanity.track!(:items, @cart.items.count)
. . .
end
</pre>
Calling @track!@ with no value is the same as calling with one, and for convenience you can pass zero and negative numbers, both will be ignored.
@@ -142,11 +142,11 @@
<pre>
Rails::Initializer.run do |config|
gems.config "vanity"
gems.config "garb"
-
- . . .
+
+ . . .
config.after_initialize do
require "garb"
ga = YAML.load_file(Rails.root + "config/ga.yml")
Garb::Session.login(ga['email'], ga['password'], account_type: "GOOGLE")
end