Title: Beta Flags &#8230; now with A/B Testing!
Author: Charles Jaimet
Published: <strong>2018년 10월 17일</strong>
Last modified: 2018년 11월 2일

---

플러그인 검색

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

![](https://ps.w.org/beta-flags/assets/icon-256x256.jpg?rev=1958254)

# Beta Flags … now with A/B Testing!

 작성자: [Charles Jaimet](https://profiles.wordpress.org/cmjaimet/)

[다운로드](https://downloads.wordpress.org/plugin/beta-flags.zip)

 * [세부사항](https://ko.wordpress.org/plugins/beta-flags/#description)
 * [평가](https://ko.wordpress.org/plugins/beta-flags/#reviews)
 * [개발](https://ko.wordpress.org/plugins/beta-flags/#developers)

 [지원](https://wordpress.org/support/plugin/beta-flags/)

## 설명

Beta Flags allow developers to manage the release of new features. Instead of having
code execute as soon as it is deployed to the production environment. You can now
wrap it in a beta flag conditional and activate it from the back end.

A/B Testing works very similarly, except that instead of turning a code block on
or off, they allow you to turn it on 50% of the time. This uses a slight variant
on the URL used to display a post or term page, which can then be tracked in an 
analytics service (e.g. Adobe Omniture, Google 360).

### The Basics of Beta Flags

To create a new beta flag, open the configuration JSON file. A copy of this file
is provided with this plugin and is stored at `data/beta-flags.json`. You may prefer
to create a copy in the root of your theme, the same folder that contains functions.
php (`[theme]/beta-flags.json`).

The JSON file follows the format below:
 `{ "flags": { "sidebar_web": { "title":"
Beta Flags IN THEME", "description": "Add a sidebar to the post page", "author":"
Charles Jaimet" }, "library_admin": { "title": "Beta Flags QA: Plugin Admin Test","
description": "For Beta Flag testing in admin interface", "author": "Charles Jaimet"}}}

Each flag is defined by a key (e.g. sidebar_web, library_admin), representing an
object with a title, description, and author. The key must be unique, and is used
throughout to identify the given flag.

Once you have activated the plugin (there are no special instructions for this),
navigate to Tools > Beta Flags in the admin interface (`/wp-admin/tools.php?page
=beta-flags`). Here you will find the flags from your JSON file if you have created
it correctly.

A note about JSON, the easiest mistake to make is to put a comma after the last 
element in an array or object. This will break the JSON but is easy enough to fix
when you know what to look for. Kinda like forgetting a semi-colon in PHP. Stupid
semi-colons…

When you first load the plugin, and any time after you update the JSON file, you
should return to this admin screen. New flags are disabled by default, and can only
be enabled here. Check the box in the Enabled column beside each flag you want to
turn on. Click Save Changes when done.

In your theme or other plugins, you can use these beta flag keys to control feature
execution by wrapping a conditional around the relevant code. Try to group your 
wrapped code into a single function, method, or class to avoid littering your theme
with beta flag conditionals.

The public function `beta_flag_enabled( $key )` will return a true|false value if
the beta flag is enabled.

Some examples:
 `if ( beta_flag_enabled( 'sidebar_web' ) ) { get_sidebar(); } if(
beta_flag_enabled( 'new_design' ) ) { wp_register_style( 'my_styles', '/assets/my_styles.
css', array(), '1.0.0', false ); wp_enqueue_style( 'my_styles' ); } if ( beta_flag_enabled('
popup_offer' ) ) { new PopupOffer( '10% Off', 0.1 ); }

I suggest using beta flag keys that make sense and convey their purpose. Adding 
a version number never hurt, either. There is no character limit, so go nuts.
 `
if ( beta_flag_enabled( 'revised_sticky_video_for_youtube_widgets_v.1.0.5' ) ) {
get_sidebar(); }

### A/B Testing

Now you have your beta flags and you’ve embedded them in your code. The feature 
works as expected and you have it running on production. Is it better than what 
it replaced?

Enter A/B testing.

Check the A/B Test box beside the flag you want to test in the admin interface (
see screen shot below), and check the “Enable beta testing” box at the bottom of
the flag list, then click “Save Changes”.

Go to your website and refresh a few times. You will start to see some term and 
post links appearing with `?ab=1` appended to their URLs. (e.g. `http://local.wordpress.
test/hello-world/?ab=1`).

When a visitor follows one of these links they will see your page with the beta 
flag disabled. When they follow the normal URL without the query string (e.g. `http://
local.wordpress.test/hello-world/`) they will see the page with the beta flag enabled.

The query string is randomly appended 50% of time, so two visitors may follow the
same link in the sidebar or menu, and one will get the flag turned on and one will
get it turned off.

Because the URL matches the state of the beta flag, you will be able to see in your
analytics service which experience visitors engaged with more. Implementing an effective
A/B testing campaign is outside the scope of a README file but there are plenty 
of good reference books and sites.

As long as the “Enable beta testing” box is checked, post and term URLs on your 
site will get this query string treatment. Only beta flags that have the A/B Test
box checked will be affected. Those with it unchecked will be controlled strictly
by their Enabled box. Note also that checking A/B Test on a flag that is disabled
will have no effect. Off is off.

## 스크린샷

[⌊Beta Flag configuration screesn.⌉⌊Beta Flag configuration screesn.⌉[

Beta Flag configuration screesn.

[⌊Managing A/B test setup.⌉⌊Managing A/B test setup.⌉[

Managing A/B test setup.

## 후기

이 플러그인에 대한 평가가 없습니다.

## 기여자 & 개발자

“Beta Flags … now with A/B Testing!”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이
이 플러그인에 기여하였습니다.

기여자

 *   [ Charles Jaimet ](https://profiles.wordpress.org/cmjaimet/)

[자국어로 “Beta Flags … now with A/B Testing!”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/beta-flags)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/beta-flags/)는, [SVN 저장소](https://plugins.svn.wordpress.org/beta-flags/)
를 확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/beta-flags/)
을 [RSS](https://plugins.trac.wordpress.org/log/beta-flags/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 기초

 *  버전 **1.3.0**
 *  최근 업데이트: **8년 전**
 *  활성화된 설치 **10보다 적음**
 *  워드프레스 버전 ** 3.0 또는 그 이상 **
 *  다음까지 시험됨: **4.9.31**
 *  언어
 * [English (US)](https://wordpress.org/plugins/beta-flags/)
 * 태그:
 * [a/b testing](https://ko.wordpress.org/plugins/tags/ab-testing/)[developers](https://ko.wordpress.org/plugins/tags/developers/)
   [feature flags](https://ko.wordpress.org/plugins/tags/feature-flags/)
 *  [고급 보기](https://ko.wordpress.org/plugins/beta-flags/advanced/)

## 평점

아직 제출된 리뷰가 없습니다.

[Your review](https://wordpress.org/support/plugin/beta-flags/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/beta-flags/reviews/)

## 기여자

 *   [ Charles Jaimet ](https://profiles.wordpress.org/cmjaimet/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/beta-flags/)