简体   繁体   中英

Vanity (gem) - can I create experiments programmatically via a database table?

I am using Vanity gem and have the basics of experiments & metrics set up fine. I was wondering if anyone has tried to extend it to set up experiments themselves via records in a database.

It seems to me that Vanity is built to initialize its experiments during the app's boot, so this might be working against the design of the tool.

As background, I see myself using this for two distinct kinds of experiments: (1) UX changes that requires a Rails/Javascript developer, and (2) changes of Images and copy which require simply a switch in my custom-built CMS.

Vanity works well for #1, but for #2 I want the admin users of my site to be able to create experiments without involving a Rails/Javascript dev and without deploying code. I could easily implement the switch pull the right content myself, but I'm not sure how Vanity will feel about having experiments defined in a database?

The author of the gem replied to me on Github:

https://github.com/assaf/vanity/issues/269

phillbaker commented 26 days ago Jason, (2) is something Vanity doesn't currently support, but I'd definitely like to support it.

If you'd like to play around with a solution and submit a PR that'd be amazing!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM