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
![image](https://private-user-images.githubusercontent.com/83669/253870512-cabb7b11-7a36-4cb6-9739-9b76626eecb4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1NTQ2NjAsIm5iZiI6MTcyNDU1NDM2MCwicGF0aCI6Ii84MzY2OS8yNTM4NzA1MTItY2FiYjdiMTEtN2EzNi00Y2I2LTk3MzktOWI3NjYyNmVlY2I0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI1VDAyNTI0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMyNzdkOWUxMzJkNDM2ZTk1YWRlZTFmOTc0YTYzMWMyMWZmMzdkMmZlMTA1MTgyMTYzNjA5NmNmYTI1NTZiN2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ptck282zAK4g7_MYk7DmfXm-7DmDRv1VLVbLkjOytIs)
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: