You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A user / visitor (doesn't require login) can add items to their cart
They need to be logged-in/signup for checkout (checkout requires current_user object)
My Setup:
# A/B test: Split gem setting starts herecookie_adapter=Split::Persistence::CookieAdapterredis_adapter=Split::Persistence::RedisAdapter.with_config(lookup_by: ->(context){context.send(:current_user).try(:id)},expire_seconds: 2592000)Split.configuredo |config|
config.redis='redis://localhost:6379'config.persistence=Split::Persistence::DualAdapter.with_config(logged_in: ->(context){ !context.send(:current_user).try(:id).nil?},logged_in_adapter: redis_adapter,logged_out_adapter: cookie_adapter)config.persistence_cookie_length=7.days.to_iconfig.experiments={plan_pricing_container: {alternatives: [{name: "original",percent: 50,metadata: {"original": {"text": "The original plan pricing container"}}},{name: "buy_this_plan",percent: 25,metadata: {"buy_this_plan": {"text": "Button with text Buy this plan"}}},{name: "purchase_options",percent: 25,metadata: {"purchase_options": {"text": "Button with text Purchase options"}}}],goals: ["add_to_cart","purchase"]}}config.allow_multiple_experiments=trueend# A/B test: Split gem setting ends here
The way I am calling conversions for the goals:
On Cart Page: ab_finished({plan_pricing_container: "add_to_cart"}, reset: false)
On Checkout: ab_finished(plan_pricing_container: "purchase", reset: false)
Use-case:
Guest sees "buy_this_plan" button > Experiment starts
Guest adds item to cart > Experiment successfully completed for add_to_cart goal
Guest logs-in now and completed the checkout
Expected behaviour
I should see "completed" for both add_to_cart and purchase goals.
Actual behaviour
I see this (nothing happens):
It seems there few issues:
I am unable to assign a running experiment to a logged_in_user (if they don't change the browser).
Using both cookie_adapter and redis_adapter not working. I end up seeing conversion not getting tracked for purchase goal (screenshot above).
If I remove cookie_adapter and redis_adapter blocks and repeat the same steps then after checkout I see -ve events (see below). (Note: add_to_cart worked fine but purchase resulted in this)
The traffic on my website is on the higher side, so I found and decided to go for CookieAdapter and use Redis Adapter only for logged_in_user/s.
Hi,
I need help with below use-case:
current_user
object)My Setup:
The way I am calling conversions for the goals:
ab_finished({plan_pricing_container: "add_to_cart"}, reset: false)
ab_finished(plan_pricing_container: "purchase", reset: false)
Use-case:
Expected behaviour
I should see "completed" for both add_to_cart and purchase goals.
Actual behaviour
I see this (nothing happens):
It seems there few issues:
logged_in_user
(if they don't change the browser).cookie_adapter
andredis_adapter
not working. I end up seeing conversion not getting tracked forpurchase
goal (screenshot above).cookie_adapter
andredis_adapter
blocks and repeat the same steps then after checkout I see -ve events (see below). (Note: add_to_cart worked fine but purchase resulted in this)The traffic on my website is on the higher side, so I found and decided to go for
CookieAdapter
and use Redis Adapter only forlogged_in_user/s
.Please suggest!
The text was updated successfully, but these errors were encountered: