Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add optimizely snippet immediately before and after sign up.

  • Loading branch information...
commit fd6a266aa9ee5ceb47184708eaa6969aea755609 1 parent 8af7eee
André Lima andlima authored
1  app/controllers/signup_wizard_controller.rb
View
@@ -8,6 +8,7 @@ def wizard
current_user.save!
redirect_to root_path
else
+ @current_step = params[:current_step]
render :layout => "welcome"
end
end
1  app/views/layouts/welcome.html.haml
View
@@ -1,6 +1,7 @@
!!! Strict
%html{ "xml:lang" => I18n.locale, :lang => I18n.locale, :xmlns => "http://www.w3.org/1999/xhtml" }
%head
+ = yield :optimizely
%title
&= page_title
= include_stylesheets :landing, :media => 'all'
9 app/views/signup_wizard/wizard.html.haml
View
@@ -3,3 +3,12 @@
= include_javascripts :suggestions, :signup_follow
= render_cell "signup_wizard", :wizard
+
+- if ab_test(:sign_in_with_facebook) == :regular_sign_up
+ - target_step = "connect"
+- else
+ - target_step = "follow"
+
+- if @current_step == target_step
+ - content_for :optimizely do
+ ~ AppConfig.optimizely_code_snippet
2  app/views/welcome/landing.html.haml
View
@@ -43,4 +43,6 @@
%p#invitation_only=t("welcome.landing.invitation_only")
= image_tag("mamaopq.png", :id => "mamao_signup")
- else
+ - content_for :optimizely do
+ ~ AppConfig.optimizely_code_snippet
= render :partial => 'users/signup'
Please sign in to comment.
Something went wrong with that request. Please try again.