We have updated our Data Processing Addendum, for more information – Click here.

const jwt = require("jsonwebtoken");

const config = process.env;

const verifyToken = (req, res, next) => {
  const token =
    req.body.token || req.query.token || req.headers["x-access-token"];

  if (!token) {
    return res.status(403).send("A token is required for authentication");
  }

  try {
    req.user = jwt.verify(token, config.TOKEN_KEY);
  } catch (err) {
    return res.status(401).send("Invalid Token");
  }

  return next();
};

module.exports = verifyToken;

Boosted: Speed and Performance On and Off the Track at Speedway Motors

Speedway Motors is a manufacturer, retailer, and distributor of high-quality automotive parts and racing products founded on a passion for speed and performance. Their website serves mechanics, technicians, and automotive gear-heads with over 250,000 products for circle track, street, muscle, and rod.

About Speedway Motors

Speedway Motors is a manufacturer, retailer, and distributor of high-quality automotive parts and racing products founded on a passion for speed and performance. Their website serves mechanics, technicians, and automotive gear-heads with over 250,000 products for circle track, street, muscle,... Read more

USE CASES

Feature Experimentation, Testing, Feature Flags

Speedway Motors is a manufacturer, retailer, and distributor of high-quality automotive parts and racing products founded on a passion for speed and performance. Their website serves mechanics, technicians, and automotive gear-heads with over 250,000 products for circle track, street, muscle, and rod. With millions of visitors traveling to their site each month, the product and engineering teams at Speedway Motors took great precautions when releasing new features. In doing so, releases became a slow and dreaded process with multiple handoffs between product, development and QA, and countless late nights with engineers standing by to implement emergency hotfixes or rollbacks.

As an e-commerce business, the team knew the importance of speed and performance in delivering impactful new features and needed a way to safely accelerate their releases and measure the impact of each feature on the customer experience.

Speedway Switched Gears to Trunk-Based Development and Continuous Deployment With Split

For Speedway Motors, the journey to safer and faster releases began with trunk-based development and automated testing. The team turned to Split to help fast-track these initiatives. By deploying code behind Split feature flags, engineers could continuously integrate new features, bug fixes, and other code changes to trunk early and often, avoiding “merge hell” at the time of release. 

Using Split targeting, the team could turn on a new feature for just their internal teams and run automated tests in production without disrupting the customer experience. For added peace of mind, if a bug managed to pass through undetected, the feature flag could then be used as a kill switch to immediately disable the feature.

“We’ve completely eliminated the need for hotfixes because we have the safety system built in to contain the blast radius of any problem that we come across. If there is a problem, we simply turn off the feature flag.”

Andrew Boellstorff, Senior Product Manager

With Split feature flags safeguarding the customer experience from frequent deploys and granular targeting capabilities controlling the blast radius of risky releases, the team successfully transitioned to trunk-based development and continuous deployment. As restless release nights and frantic hotfixes faded in the rearview mirror, engineers felt safe to move faster than ever before.

“We went from a release cadence of every two weeks to multiple times a day. Mistakes will happen, but we know we can recover quickly.”

Andrew Boellstorff, Senior Product Manager

Added Development Horsepower With Data and Measurement

When the team was tasked with rebuilding the checkout process and improving site performance to address declining conversions, they relied on Split to rapidly deploy code to production, gradually release it to their customers, and measure its effectiveness in driving conversions. The core business metrics Speedway Motors aligns its success with are conversion rate, average order value (AOV), and order profit. Given the new feature’s potential to directly impact all core business and performance metrics, it was critical for the team to closely monitor for any changes in these metrics as the feature was released to more and more customers.

Customer event data flowed directly into Split via track calls. It was then joined with feature flag data by Split’s data attribution logic and used to automatically calculate the causal effect of the new checkout feature on core business and performance metrics, as well as all other metrics in case of unintended side effects. Relying on Split to actively monitor and alert on any negative changes, the team safely rolled out the new feature starting with wholesale customers (who were deemed less risky than retail customers). They checked Split’s metrics results at each stage when more customers were exposed. Within just two months, the team had moved seamlessly from planning and development to fully released in production. More importantly, they were also able to successfully increase conversion rates year over year with their new checkout feature.

“As we improved our checkout process relying on Split to measure the impact of our changes, we saw an overall increase in conversion year over year, and that’s made a huge difference on our bottom line.”

Andrew Boellstorff, Senior Product Manager

All Roads Lead to Experimentation

The power of combining feature flags and data quickly caught on within Speedway Motors’ product and engineering teams as they sought to ramp up experimentation. When an internal debate arose on the impact shipping fees could have on core business metrics, the team decided to test their hypothesis and run an experiment on lower shipping fees vs. the current shipping fee. Using Split targeting and dynamic configurations, engineers could easily modify the shipping fee for specific customer groups without a code change and observe its direct impact on conversion rate, AOV, and order profit.

By running this experiment in Split, the team proved with their feature flag and customer data that they could lower shipping costs while maintaining overall profitability.

Today, Speedway Motors is well underway in building a strong culture of experimentation throughout its product and engineering teams. In particular, engineers have found their projects more rewarding now that everything they build can be tied back to core business metrics.

“Split helped us build and foster a culture of experimentation. Our developers are super excited they can make a configuration change, monitor the results in the platform, and know they drove real business value for millions of customers with their experiment.”

Andrew Boellstorff, Senior Product Manager

Curious to see how Split can help your team deliver impactful features safer and faster? Get started with a 30-day free trial. Invite your teammates to test, explore, and experiment together on all Split has to offer.

Deliver software features that matter, fast

The Split Feature Data Platform™ gives you the confidence to move fast without breaking things. Set up feature flags and safely deploy to production, controlling who sees which features and when. Connect every flag to contextual data, so you can know if your features are making things better or worse and act without hesitation. Effortlessly conduct feature experiments like A/B tests without slowing down. Whether you’re looking to increase your releases, to decrease your MTTR, or to ignite your dev team without burning them out–Split is both a feature management platform and partnership to revolutionize the way the work gets done. Switch on a free account today or schedule a demo to learn more.

Want to Dive Deeper?

We have a lot to explore that can help you understand feature flags. Learn more about benefits, use cases, and real world applications that you can try.

Create Impact With Everything You Build

We’re excited to accompany you on your journey as you build faster, release safer, and launch impactful products.