Back to all posts Back

Dogfooding: How We Launched Journeys Using Taplytics Feature Flagging

Dogfooding or eating your own dog food refers to an organization using its own product or service. Here at Taplytics, we used our Feature Flags tool to ensure a gradual rollout of our new journeys feature.

A feature flag is a tool that allows parts of a software application to be enabled, paused, or disabled during runtime. This can be used for a variety of applications including the slow rollout of a new feature, conditional rollout (based on segmentation filters) or to prevent a broken product from customer interaction (disaster prevention).

Prior to launching our new product called ‘Journeys’, we knew we needed to ensure the product was available to be tested, but it should be released to customers until it was ready for its beta version. This is where dogfooding comes in. Using our feature flag tool, we were able to conditionally release this to certain individuals based on any segmentation filter.

Eating our Own Dogfood

So, before we could start we needed to initialize Taplytics JS SDK. This was done using the CDN like this: 

<script type="text/javascript" src="https://cdn.taplytics.com/syncLoader.min.js"></script>


<script>

TaplyticsInit({

token: "JS_SDK_Key"

});
</script>

 

Now, after this we load Taplytics to the window object. However, before we can use any type of custom segmentation, we need to tell taplytics how we would like to segment our users.

Taplytics.identify({

email: "email@email.com",

});

Running the above snippet of code we are able to transfer our user’s email to Taplytics. 

We can now create a feature flag on Taplytics.com and give it a name and a key, we would then go ahead and copy the key. 

After this, we wrap our code behind a condition like this: 

if (window.Taplytics.featureFlagEnabled("featureFlagKey")) {

        // Put feature code here, or launch feature from here

    }

So, after this we would be able to control a user’s access using the Feature Flags dashboard. Refer to the example below for how we used Feature Flags to launch our own Journeys feature. 

Once launched, ‘Journeys’ would be added to our sidebar shown below.

You may notice the absence of a “Journeys” tab in the image above since journeys are under a feature flag and the account above was not enrolled for the feature at the time. Now, looking at the image below, you can see the segmentation filters for our Journeys product.

In order to turn on this feature, we simply add in the email, “Sameer.khan@taplytics.com”.

Now after pressing the save button and reloading the page, you can see the updated Journeys tab on the side bar shown below with the word “beta” next to it.

In a nutshell, this is how feature flagging works. The account would now be able to access the Journeys feature since it was added to the feature flag which shows the Journeys tab.

When to Use Feature Flags

Now that we’ve seen how feature flags are implemented and used, let’s take a look at some of the best use cases for this tool.

Internal Testers

A common use case is for engineers to only allow access to a new feature to engineers working on the product and select people to test it. This is useful when a product is in its early stages and is incomplete, has bugs, or isn’t in a state to present to customers. This allows a company to let internal users easily test a new feature and gather feedback while ensuring end-users will not have access to an incomplete feature.

Beta Programs

Feature flags can also easily be used to manage beta programs. For instance, if a company

wants to release a new product to a certain list of users who have opted in to receive experimental features or users who are a part of the beta program, they can easily use feature flags to enroll or disenroll a user from a feature. This list can also be dynamically updated in real-time as soon as a user opts into a beta program.

A/B Testing

When using an A/B platform, you’re conditionally toggling a feature on or off in order to get a better understanding of user behavior in different scenarios. This is done using a feature flag. It allows marketers to use statistical analysis to understand what works better for their conversion goals. You can use feature flags to create different versions of any element on your website such as changing copy, button colors, or an image. Then you can see which version performed better, resulting in a “winning” variation.

Feature Flag Benefits from a SWE’s Perspective

Now that we know how feature flags work and why beneficial, let’s look at this tool from a software engineer’s perspective.

The major advantage for an engineer to have code ‘hidden’ behind a feature flag is peace of mind. Even after thoroughly testing code and having it go through various automated and manual testing processes, there’s always a chance that a new unexpected bug shows up after the code’s been shipped to production. Having a feature flag relieves a lot of stress since if there are any bugs engineers have the ability to quickly and remotely disable the part of code until a solution is found.

It also helps with continuous delivery which allows teams to release software in short cycles. Feature flags make this possible since engineers have the ability to push an incomplete or unpolished feature. This limits the overall amount of work that needs to be done by engineering as shorter releases ensure less testing and fewer problems, resulting in the engineering team having more time for further development.

For more information about Taplytics and how we help companies optimize their apps and websites, feel free to reach out – we’d love to chat!