Chris Corner: Unusual Ideas with Great Results

SVG Short Circuiting

SVG is normally a pretty efficient file format. If an image is vector in nature, leaving it as vector is normally a good plan as it will like scale well and look pretty darn crips. But of course, It Depends. Super complex vector graphics can get huge, and a raster (i.e. JPG, PNG, etc) version can actually be smaller. This can happen with little tiny images too where the straight up low amount of pixels is just pretty efficient.

This should be the kind of thing computers are good at, right? You’re in luck if you’re using Eleventy. Zach wrote about a thing the Image component can do for Eleventy called SVG Short Circuiting. The idea is, if your source image is SVG, it can make raster versions to help with efficiency. But if the SVG version ends up smaller than any of the other produced versions, it will discard the raster versions.

A nice looking font that helps dyslexia

Worth knowing:

According to the International Dyslexia Association, as much as 15 to 20 percent of the U.S. population may have symptoms of dyslexia. Those include slow or inaccurate reading, weak spelling, and poor writing.

Jill Stakke

Also worth knowing: these people, and really probably anybody can be helped along with better typefaces. That is, typefaces designed in such a way that the are less confusing and less problematic for people with dyslexia.

I’ve seen Dyslexie before, which is pretty neat. But to be frank, it does look a smidge childish which might make it a tough choice when a brand voice needs to be more serious looking. A crappy trade-off, but such is life.

I’ve just seen Oliva King’s Inclusive Sans which, to my eyes, it extremely nice looking and covers the general criteria laied out by Sophie Beier in Designing for Legibility.

  1. Clear distinction between I, l and 1
  2. Non-mirroring of letters d, b, q and p
  3. Distinction between O and 0
  4. Wider, more open counter forms on c, o, a and e
  5. A higher x-height for easier readability at small sizes
  6. Wider default letter-spacing
  7. Clear difference between capital height and ascender height

Just look at how #2 is handled:

Super classy if you ask me. I wanna use it for something. I’m stoked at how good it looks at body copy sizes.

An HTML element as a mask

The vast majority of masks are either shapes in black/white such that they hide or reveal what is behind them in that shape exactly. Or a gradient, such that they fade out what is behind them little by little.

Artur Bień has another idea of what a mask can be: any HTML element. You can set up a simple-but-clever SVG filter to filter out all black.

I gave it a quick shot myself just to have a play and it worked great.


Now that you’re primed into thinking of layering things on top of each other and doing exotic filtering to get weird and cool results, you’re ready for this next one.

Javier Bórquez: Motion extraction with mostly CSS.

Say you wanted to look at a video where only the things that are moving are visible, and the rest is essentially blacked out. Why? I don’t know don’t think about that part too hard. Maybe it’s a way to spot changes in security video easier. Or more likely it’s just a really cool final effect.

You’d think getting that done would involve sophisticated video processing technology. But nope: CSS. The trick is so perfect:

One video is placed on top of the other, playing slightly ahead. Then, by styling the top video with mix-blend-mode: difference in CSS, we make is so only the pixels that have changed between the two frames are shown.

So cool. That’s my favorite trick I’ve seen in a while.

Single Element Gradient Borders

Actually I have another trick that is right in the zone with the last two that is also just extremely cool. You gotta admit the gradient border look is pretty hot right now.

There are number of ways to pull that off, but they typically involve multiple stacked elements and decently involved trickery or limitations. The above is just one element, and it’s showcasing how you also aren’t limited with what you want to do in the body of the element (there using a backdrop-blur).

Ben Frain documents a trick he found in the freeCodeCamp forums. You slap a pseudo element on the main element to create the border, and then essentially knock out a hole in the middle.

Here is the clever bit I have never seen before; we then use a mask, and a mask composite. This allows us to create a ‘shape’, that our gradient border will inhabit. To create this shape, we need to composite two images together and find the difference. That might sound like a lot of work but we can make those two images with CSS using a linear-gradient. It doesn’t matter that the linear-gradient is actually just a flat white colour, the fact that it is defined as a linear-gradient means that the browser renders the outcome of that notation as an image and the image can be composited. So the first mask is a linear gradient set to the padding-box, which then crucially does not include the border, and the second gradient is the full size, and the difference between them is the border shape. Genius!!!!

Genius indeed.

‘We’ll Know We Have AGI When >50% of the GDP is Generated by AI’

Physicist and former NASA-engineer Anthony Scondary shares his vision of an AGI-powered future that enables a better quality of life for all people.

agi-talks-as.jpg

About Anthony Scodary

anthony-scodary.jpg

Anthony Scodary is the co-founder of Gridspace, a speech and language AI company pioneering advanced voice bots for call centers. With a background at NASA's Jet Propulsion Laboratory, he contributed to significant missions such as the Curiosity Mars rover and Juno's journey to Jupiter. Anthony holds a bachelors in Physics and a masters in Aeronautics & Astronautics from Stanford University. An innovator at heart, he has several patents for AI-driven speech technologies.

AGI Talks: Interview with Anthony Scodary

In the latest AGI Talks, we asked Anthony Scondary 10 questions about Artificial Intelligence (AI), Artificial General Intelligence (AGI), Artificial Super Intelligence (ASI), and the impact these technologies could have on society.

1. What is your preferred definition of AGI?

Anthony Scodary: Human intelligence isn't understood well enough to uncontroversially define tasks or tests that span the range of the human intellect. If you include emotional intelligence, mobility, common sense, and all sensory modalities, it's even harder to define AGI via a battery of tests. Instead, I prefer an argument from Franois Chollet, whom I greatly admire on this topic, that we'll know we have AGI when more than 50% of the gross domestic product is generated by virtual agents.

2. and ASI (Artificial Superintelligence)?

When AI appears to be improving exponentially, the difference between and > is trivial. By the time we know we have AGI, we'll have ASI. It's like asking when a bullet train will arrive at or pass through Tokyo.

3. In what ways do you believe AI will most significantly impact society in the next decade?

Economists look at automation through the lens of productivity growth per sector. We can get a hint of what's to come by looking at one of the most-heavily automated sectors: agriculture. According to the Kansas City Fed, in 1900, 37.9% of the U.S. labor force worked on 5.7 million farms to support 76 million consumers, a ratio of 13 consumers per farmer. By 2017, with agriculture contributing just 0.9% to GDP and 1.1% of the workforce on 2 million farms, the ratio dramatically increased to 159 consumers per farmer.

This automation has made Americans richer, better-fed, and more-urbanized. We can reframe the question as, what would happen in the next decade if the same degree of automation was experienced in US knowledge work? We can expect another realignment of labor sectors, notably creating new knowledge work that's less automatable. My company, Gridpsace, works in the contact center space, which currently employs approximately 3 million people in the US. Many customer service jobs will likely evolve to be more personal and better-trained, as the more menial aspects of the jobs (recorded statements, reminders, forms) are automated. This should ultimately result in better service to consumers and new opportunities for workers that previously were uneconomical.

4. What do you think is the biggest benefit associated with AI?

Better quality of life for all people.

5. and the biggest risk of AI?

Overreliance relative to the maturity of technology. Humans have never encountered a technology so capable of over-representing its own strengths and concealing its own weaknesses. A large amount of our work at Gridspace is to build machines that aren't simply smart but reliable and controllable.

6. In your opinion, will AI have a net positive impact on society?

Yes.

7. Where are the limits of human control over AI systems?

The more we relinquish control to automation of any kind, the more sophisticated our monitoring and measurement becomes. This is true in manufacturing and agriculture today, and will increasingly be true with knowledge work.

8. Do you think AI can ever truly understand human values or possess consciousness?

I don't think any human will ever truly understand our own values. It's a problem we've been wrestling with for thousands of years.

9. Do you think your job will ever be replaced by AI?

I'm the most replaceable person on the planet. My labrador retriever is gunning for the job.

10. We will reach AGI by the year?

Most major technological transformations (gas-powered cars, electrical lighting) have followed a 50-year S-shaped adoption curve. Based on my economic definition of AGI, I'll estimate 2048.

How To Harness Mouse Interaction Data For Practical Machine Learning Solutions

Mouse data is a subcategory of interaction data, a broad family of data about users generated as the immediate result of human interaction with computers. Its siblings from the same data family include logs of key presses or page visits. Businesses commonly rely on interaction data, including the mouse, to gather insights about their target audience. Unlike data that you could obtain more explicitly, let’s say via a survey, the advantage of interaction data is that it describes the actual behavior of actual people.

Collecting interaction data is completely unobtrusive since it can be obtained even as users go about their daily lives as usual, meaning it is a quantitative data source that scales very well. Once you start collecting it continuously as part of regular operation, you do not even need to do anything, and you’ll still have fresh, up-to-date data about users at your fingertips — potentially from your entire user base, without them even needing to know about it. Having data on specific users means that you can cater to their needs more accurately.

Of course, mouse data has its limitations. It simply cannot be obtained from people using touchscreens or those who rely on assistive tech. But if anything, that should not discourage us from using mouse data. It just illustrates that we should look for alternative methods that cater to the different ways that people interact with software. Among these, the mouse just happens to be very common.

When using the mouse, the mouse pointer is the de facto conduit for the user’s intent in a visual user interface. The mouse pointer is basically an extension of your arm that lets you interact with things in a virtual space that you cannot directly touch. Because of this, mouse interactions tend to be data-intensive. Even the simple mouse action of moving the pointer to an area and clicking it can yield a significant amount of data.

Mouse data is granular, even when compared with other sources of interaction data, such as the history of visited pages. However, with machine learning, it is possible to investigate jumbles of complicated data and uncover a variety of complex behavioral patterns. It can reveal more about the user holding the mouse without needing to provide any more information explicitly than normal.

For starters, let us venture into what kind of information can be obtained by processing mouse interaction data.

What Are Mouse Dynamics?

Mouse dynamics refer to the features that can be extracted from raw mouse data to describe the user’s operation of a mouse. Mouse data by itself corresponds with the simple mechanics of mouse controls. It consists of mouse events: the X and Y coordinates of the cursor on the screen, mouse button presses, and scrolling, each dated with a timestamp. Despite the innate simplicity of the mouse events themselves, the mouse dynamics using them as building blocks can capture user’s behavior from a diverse and emergently complex variety of perspectives.

If you are concerned about user privacy, as well you should be, mouse dynamics are also your friend. For the calculation of mouse dynamics to work, raw mouse data does not need to inherently contain any details about the actual meaning of the interaction. Without the context of what the user saw as they moved their pointer around and clicked, the data is quite safe and harmless.

Some examples of mouse dynamics include measuring the velocity and the acceleration at which the mouse cursor is moving or describing how direct or jittery the mouse trajectories are. Another example is whether the user presses and lets go of the primary mouse button quickly or whether there is a longer pause before they release their press. Four categories of over twenty base measures can be identified: temporal, spatial, spatial-temporal, and performance. Features do not need to be just metrics either, with other approaches using a time series of mouse events.

Temporal mouse dynamics:

  • Movement duration: The time between two clicks;
  • Response time: The time it takes to click something in response to a stimulus (e.g., from the moment when a page is displayed);
  • Initiation time: The time it takes from an initial stimulus for the cursor to start moving;
  • Pause time: The time measuring the cursor’s period of idleness.

Spatial mouse dynamics:

  • Distance: Length of the path traversed on the screen;
  • Straightness: The ratio between the traversed path and the optimal direct path;
  • Path deviation: Perpendicular distance of the traversed path from the optimal path;
  • Path crossing: Counted instances of the traversed and optimal path intersecting;
  • Jitter: The ratio of the traversed path length to its smoothed version;
  • Angle: The direction of movement;
  • Flips: Counted instances of change in direction;
  • Curvature: Change in angle over distance;
  • Inflection points: Counted instances of change in curvature.

Spatial-temporal mouse dynamics:

  • Velocity: Change of distance over time;
  • Acceleration: Change of velocity over time;
  • Jerk: Change of acceleration over time;
  • Snap: Change in jerk over time;
  • Angular velocity: Change in angle over time.

Performance mouse dynamics:

  • Clicks: The number of mouse button events pressing down or up;
  • Hold time: Time between mouse down and up events;
  • Click error: Length of the distance between the clicked point and the correct user task solution;
  • Time to click: Time between the hover event on the clicked point and the click event;
  • Scroll: Distance scrolled on the screen.

Note: For detailed coverage of varied mouse dynamics and their extraction, see the paper “Is mouse dynamics information credible for user behavior research? An empirical investigation.”

The spatial angular measures cited above are a good example of how the calculation of specific mouse dynamics can work. The direction angle of the movements between points A and B is the angle between the vector AB and the horizontal X axis. Then, the curvature angle in a sequence of points ABC is the angle between vectors AB and BC. Curvature distance can be defined as the ratio of the distance between points A and C and the perpendicular distance between point B and line AC. (Definitions sourced from the paper “An efficient user verification system via mouse movements.”)

Even individual features (e.g., mouse velocity by itself) can be delved into deeper. For example, on pages with a lot of scrolling, horizontal mouse velocity along the X-axis may be more indicative of something capturing the user’s attention than velocity calculated from direct point-to-point (Euclidean) distance in the screen's 2D space. The maximum velocity may be a good indicator of anomalies, such as user frustration, while the mean or median may tell you more about the user as a person.

From Data To Tangible Value

The introduction of mouse dynamics above, of course, is an oversimplification for illustrative purposes. Just by looking at the physical and geometrical measurements of users’ mouse trajectories, you cannot yet tell much about the user. That is the job of the machine learning algorithm. Even features that may seem intuitively useful to you as a human (see examples cited at the end of the previous section) can prove to be of low or zero value for a machine-learning algorithm.

Meanwhile, a deceptively generic or simplistic feature may turn out unexpectedly quite useful. This is why it is important to couple broad feature generation with a good feature selection method, narrowing the dimensionality of the model down to the mouse dynamics that help you achieve good accuracy without overfitting. Some feature selection techniques are embedded directly into machine learning methods (e.g., LASSO, decision trees) while others can be used as a preliminary filter (e.g., ranking features by significance assessed via a statistical test).

As we can see, there is a sequential process to transforming mouse data into mouse dynamics, into a well-tuned machine learning model to field its predictions, and into an applicable solution that generates value for you and your organization. This can be visualized as the pipeline below.

Machine Learning Applications Of Mouse Dynamics

To set the stage, we must realize that companies aren’t really known for letting go of their competitive advantage by divulging the ins and outs of what they do with the data available to them. This is especially true when it comes to tech giants with access to potentially some of the most interesting datasets on the planet (including mouse interaction data), such as Google, Amazon, Apple, Meta, or Microsoft. Still, recording mouse data is known to be a common practice.

With a bit of grit, you can find some striking examples of the use of mouse dynamics, not to mention a surprising versatility in techniques. For instance, have you ever visited an e-commerce site just to see it recommend something specific to you, such as a gendered line of cosmetics — all the while, you never submitted any information about your sex or gender anywhere explicitly?

Mouse data transcends its obvious applications, as is replaying the user’s session and highlighting which visual elements people interact with. A surprising amount of internal and external factors that shape our behavior are reflected in data as subtle indicators and can thus be predicted.

Let’s take a look at some further applications. Starting some simple categorization of users.

Example 1: Biological Sex Prediction

For businesses, knowing users well allows them to provide accurate recommendations and personalization in all sorts of ways, opening the gates for higher customer satisfaction, retention, and average order value. By itself, the prediction of user characteristics, such as gender, isn’t anything new. The reason for basing it on mouse dynamics, however, is that mouse data is generated virtually by the truckload. With that, you will have enough data to start making accurate predictions very early.

If you waited for higher-level interactions, such as which products the user visited or what they typed into the search bar, by the time you’d have enough data, the user may have already placed an order or, even worse, left unsatisfied.

The selection of the machine learning algorithm matters for a problem. In one published scientific paper, six various models have been compared for the prediction of biological gender using mouse dynamics. The dataset for the development and evaluation of the models provides mouse dynamics from participants moving the cursor in a broad range of trajectory lengths and directions. Among the evaluated models — Logistic regression, Support vector machine, Random forest, XGBoost, CatBoost, and LightGBM — CatBoost achieved the best F1 score.

Putting people into boxes is far from everything that can be done with mouse dynamics, though. Let’s take a look at a potentially more exciting use case — trying to predict the future.

Example 2: Purchase Prediction

Another e-commerce application predicts whether the user has the intent to make a purchase or even whether they are likely to become a repeat customer. Utilizing such predictions, businesses can adapt personalized sales and marketing tactics to be more effective and efficient, for example, by catering more to likely purchasers to increase their value — or the opposite, which is investigating unlikely purchasers to find ways to turn them into likely ones.

Interestingly, a paper dedicated to the prediction of repeat customership reports that when a gradient boosting model is validated on data obtained from a completely different online store than where it was trained and tuned, it still achieves respectable performance in the prediction of repeat purchases with a combination of mouse dynamics and other interaction and non-interaction features.

It is plausible that though machine-learning applications tend to be highly domain-specific, some models could be used as a starting seed, carried over between domains, especially while still waiting for user data to materialize.

Additional Examples

Applications of mouse dynamics are a lot more far-reaching than just the domain of e-commerce. To give you some ideas, here are a couple of other variables that have been predicted with mouse dynamics:

The Mouse-Shaped Caveat

When you think about mouse dynamics in-depth, some questions will invariably start to emerge. The user isn’t the only variable that could determine what mouse data looks like. What about the mouse itself?

Many brands and models are available for purchase to people worldwide. Their technical specifications deviate in attributes such as resolution (measured in DPI or, more accurately, CPI), weight, polling rate, and tracking speed. Some mouse devices have multiple profile settings that can be swapped between at will. For instance, the common CPI of an office mouse is around 800-1,600, while a gaming mouse can go to extremes, from 100 to 42,000. To complicate things further, the operating system has its own mouse settings, such as sensitivity and acceleration. Even the surface beneath the mouse can differ in its friction and optical properties.

Can we be sure that mouse data is reliable, given that basically everyone potentially works under different mouse conditions?

For the sake of argument, let’s say that as a part of a web app you’re developing, you implement biometric authentication with mouse dynamics as a security feature. You sell it by telling customers that this form of auth is capable of catching attackers who try to meddle in a tab that somebody in the customer’s organization left open on an unlocked computer. Recognizing the intruder, the app can sign the user out of the account and trigger a warning sent to the company. Kicking out the real authorized user and sounding the alarm just because somebody bought a new mouse would not be a good look. Recalibration to the new mouse would also produce friction. Some people like to change their mouse sensitivity or use different computers quite often, so frequent calibration could potentially present a critical flaw.

We found that up until now, there was barely anything written about whether or how mouse configuration affects mouse dynamics. By mouse configuration, we refer to all properties of the environment that could impact mouse behavior, including both hardware and software.

From the authors of papers and articles about mouse dynamics, there is barely a mention of mouse devices and settings involved in development and testing. This could be seen as concerning. Though hypothetically, there might not be an actual reason for concern, that is exactly the problem. There was just not even enough information to make a judgment on whether mouse configuration matters or not. This question is what drove the study conducted by UXtweak Research (as covered in the peer-reviewed paper in Computer Standards & Interfaces).

The quick answer? Mouse configuration does detrimentally affect mouse dynamics. How?

  1. It may cause the majority of mouse dynamics values to change in a statistically significant way between different mouse configurations.
  2. It may lower the prediction performance of a machine learning model if it was trained on a different set of mouse configurations than it was tested on.

It is not automatically guaranteed that prediction based on mouse dynamics will work equally well for people on different devices. Even the same person making the exact same mouse movements does not necessarily produce the same mouse dynamics if you give them a different mouse or change their settings.

We cannot say for certain how big an impact mouse configuration can have in a specific instance. For the problem that you are trying to solve (specific domain, machine learning model, audience), the impact could be big, or it could be negligible. But to be sure, it should definitely receive attention. After all, even a deceptively small percentage of improvement in prediction performance can translate to thousands of satisfied users.

Tackling Mouse Device Variability

Knowledge is half the battle, and so it is also with the realization that mouse configuration is not something that can be just ignored when working with mouse dynamics. You can perform tests to evaluate the size of the effect that mouse configuration has on your model’s performance. If, in some configurations, the number of false positives and false negatives rises above levels that you are willing to tolerate, you can start looking for potential solutions by tweaking your prediction model.

Because of the potential variability in real-world conditions, differences between mouse configurations can be seen as a concern. Of course, if you can rely on controlled conditions (such as in apps only accessible via standardized kiosks or company-issued computers and mouse devices where all system mouse settings are locked), you can avoid the concern altogether. Given that the training dataset uses the same mouse configuration as the configuration used in production, that is. Otherwise, that may be something new for you to optimize.

Some predicted variables can be observed repeatedly from the same user (e.g., emotional state or intent to make a purchase). In the case of these variables, to mitigate the problem of different users utilizing different mouse configurations, it would be possible to build personalized models trained and tuned on the data from the individual user and the mouse configurations they normally use. You also could try to normalize mouse dynamics by adjusting them to the specific user’s “normal” mouse behavior. The challenge is how to accurately establish normality. Note that this still doesn’t address situations when the user changes their mouse or settings.

Where To Take It From Here

So, we arrive at the point where we discuss the next steps for anyone who can’t wait to apply mouse dynamics to machine learning purposes of their own. For web-based solutions, you can start by looking at MouseEvents in JavaScript, which is how you’ll obtain the elementary mouse data necessary.

Mouse events will serve as the base for calculating mouse dynamics and the features in your model. Pick any that you think could be relevant to the problem you are trying to solve (see our list above, but don’t be afraid to design your own features). Don’t forget that you can also combine mouse dynamics with domain and application-specific features.

Problem awareness is key to designing the right solutions. Is your prediction problem within-subject or between-subject? A classification or a regression? Should you use the same model for your whole audience, or could it be more effective to tailor separate models to the specifics of different user segments?

For example, the mouse behavior of freshly registered users may differ from that of regular users, so you may want to divide them up. From there, you can consider the suitable machine/deep learning algorithm. For binary classification, a Support vector machine, Logistic regression, or a Random Forest could do the job. To delve into more complex patterns, you may wish to reach for a Neural network.

Of course, the best way to uncover which machine/deep learning algorithm works best for your problem is to experiment. Most importantly, don’t give up if you don’t succeed at first. You may need to go back to the drawing board a few times to reconsider your feature engineering, expand your dataset, validate your data, or tune the hyperparameters.

Conclusion

With the ongoing trend of more and more online traffic coming from mobile devices, some futurist voices in tech might have you believe that “the computer mouse is dead”. Nevertheless, those voices have been greatly exaggerated. One look at statistics reveals that while mobile devices are excessively popular, the desktop computer and the computer mouse are not going anywhere anytime soon.

Classifying users as either mobile or desktop is a false dichotomy. Some people prefer the desktop computer for tasks that call for exact controls while interacting with complex information. Working, trading, shopping, or managing finances — all, coincidentally, are tasks with a good amount of importance in people’s lives.

To wrap things up, mouse data can be a powerful information source for improving digital products and services and getting yourself a headway against the competition. Advantageously, data for mouse dynamics does not need to involve anything sensitive or in breach of the user’s privacy. Even without identifying the person, machine learning with mouse dynamics can shine a light on the user, letting you serve them more proper personalization and recommendations, even when other data is sparse. Other uses include biometrics and analytics.

Do not underestimate the impact of differences in mouse devices and settings, and you may arrive at useful and innovative mouse-dynamics-driven solutions to help you stand out.

How to Create a One-Click Checkout in WordPress (5 Ways)

Are you looking to learn how to create a one-click checkout in WordPress?

Optimizing checkout for a smoother experience for customers is one of the highest priorities when running an eCommerce site. Specifically, adding a one-click checkout in WordPress helps users complete transactions faster, which makes them more likely to return.

In this article, you’ll learn how to create a one-click checkout in WordPress to boost conversions and increase sales.

Create a One-Click Checkout

Why Do You Need to Create a One-Click Checkout in WordPress?

Long checkout pages can drive away visitors who would be interested in making a purchase. Having to click through a list of checkout fields and fill out a lot of unnecessary or repetitive information makes the buying process drag on and on.

The longer the checkout process is, the higher the chance that customers will drop off at some point.

The average cart abandonment rate is 70.19%, and 22% of shoppers cited that a too-long or too-complicated checkout process was the reason for their abandonment.

That’s where the one-click checkout process comes in. It’s as simple as adding a buy-now button, so returning customers get to enjoy a streamlined checkout process.

A one-click checkout is an easy for customers to buy items online with just a click of a button without having to enter their shipping, billing, and payment details every time they make a purchase.

It’s similar to the auto-complete feature, except users don’t even have to fill out the fields since your website will automatically process the transaction without even going to the checkout page.

With just a single click, visitors can complete their purchase fast, which leads to higher conversion rates and reduced cart abandonment rates. Whether you have an online store, a service business, a membership site, or any other type of website, it’s a simple and easy way to increase sales.

That said, we’ll cover the five methods for adding a one-click checkout in WordPress:

Method 1: Create a One-Click Checkout in WordPress Using WPForms (Easy + Free Option)

Using WPForms, you can easily create a one-click checkout process for buyers. WPForms is a form builder that allows you to easily build all types of forms without any code.

WPForms

The drag-and-drop builder allows you to easily collect payments with Stripe payment functionality so that you can create payment forms, user registration forms, expense approval forms, and more. Also, with 1,700+ templates to choose from, you can practically find any form type, meaning you never have to start from scratch.

Note: The good news is that you can use WPForms Lite for this tutorial since we’ll only be using the Stripe integration, which is free. However, if you want more advanced features, then you’ll want to install the Pro version.

To begin, download and activate the WPForms plugin. For more details, check out our guide on how to install a WordPress plugin.

Upon activation, head over to the WPForms » Settings page from your WordPress admin dashboard. Then go to the Payments tab.

Under Stripe, you’ll need to hit the ‘Connect with Stripe’ button.

WPForms payments settings

This redirects you to the Stripe connection wizard, where you’ll be able to connect to your existing account or create a new account.

Follow the steps in the Stripe connection wizard.

WPForms Stripe connection

After completing the steps, you’ll be taken back to the WordPress dashboard.

You should see a green checkmark indicating that your Stripe account is now connected to WPForms.

WPForms connection status confirmed

Now, you can start accepting payments on your website and are now ready to create your checkout form.

Go to WPForms » Add New. From here, you can name your form, which will be helpful for reference later.

Name your form in WPForms

Then, pick a payment form template that suits your needs.

For the sake of this tutorial, we’ll be working off of the Stripe Payment Form template. Under the template, click on ‘Use Template.’

Use template in WPForms

You’ll be taken in the drag-and-drop form editor, where you can easily customize the form to your needs.

Any time you want to add a field, just drag and drop it from the ‘Add Fields’ panel on the left to the right side. To edit the fields, click on the element, and you can make adjustments under ‘Field Options.’

one-click-checkout form drag and drop editor

For example, if you were to create a wholesale form, you can edit the multiple-choice field with radio buttons.

Then click on the element, and under ‘Field Options,’ you can add the different products.

one-click checkout form field options

You’ll need to activate Stripe Link, a one-click checkout solution that securely stores all the customer details and allows buyers to reuse them on your site. They use Level 1 PCI-compliant servers, which means that your customers’ data is encrypted and secure.

To activate the Stripe Link checkout option, head over to the Settings » Payments page in Stripe. Then, go to the Payment Methods tab.

Stripe payment methods

From here, you’ll select the ‘WPForms LLC’ menu for Select Platform.

This connects all available payment methods from your Stripe account to WPForms.

Select platform in Stripe settings

Scroll down the page, and you will see the different payment methods and settings for WPForms.

Make sure that the Link option for express checkout is Active.

Stripe Link express checkout active

After that, go back to WordPress to finish creating your checkout form. Go to the Payments » Stripe tab.

Then turn on the ‘Enable one-time payments’ option so that Stripe is activated on your form.

Enable one time payments WPForms

Once you’re done with that, hit the ‘Save’ button.

Then click on ‘Embed.’

embed WPForms

You should see a popup message appear. Here, you can choose to embed this form into an existing page or create a new page.

Assuming you already have a checkout page, we’ll hit the ‘Select Existing Page’ button.

select existing page to embed WPForms

The form should automatically be embedded into the page you choose.

From there, just hit the ‘Publish’ or ‘Update’ button up top.

Publish one-click checkout page wpforms

Make sure to preview the checkout form and see if the payments are going through to your Stripe account.

Once activated, it’ll pre-fill their credit card details that are saved on Stripe.

stripe-link-checkout-wpforms

Keep in mind that customers with Stripe accounts will be prompted to enter a one-time passcode authentication to use Link.

Method 2: Create a One-Click Checkout in WordPress Using WP Simple Pay (Multiple Payment Methods)

WP Simple Pay website

WP Simple Pay is another great option for accepting one-time and recurring payments on WordPress. This is the better choice if you want to offer a variety of payment methods for your one-click checkout process.

WP Simple Pay offers 13+ payment methods, including debit and credit payments, ACH debit, Google Pay, Apple Pay, Venmo, and more. Also, you can even provide customers with the option to ‘Buy Now Pay Later‘ with Klarna.

To get started, install and activate the WP Simple Pay plugin. Upon activation, you’ll be taken to the setup wizard, which will guide you on how to start accepting payments on your site.

WP Simple Pay setup wizard

Make sure to follow the steps all the way through.

You should be asked to connect your Stripe account as well. If you don’t have a Stripe account, you can create one.

connect-stripe-to-wpsimplepay

After you’ve completed the setup wizard, you’ll be shown a success page that confirms that the setup is finished.

Next, go to the WP Simple Pay » Settings page. Under the Stripe Tab, make sure that the Stripe account is connected and that you’re in ‘Live Mode.’

Stripe payment live mode

Before you go into creating your payment form, you also need to ensure that Stripe Link is enabled.

To do that, go to the Settings » General tab. Then, under the Advanced tab, check the ‘New Payment Experience’ box.

Use new payment experience

From here, you’re ready to start customizing your checkout form.

Head over to WP Simple Pay » Add New, and you’ll be taken to a library of available templates.

You can choose any template that fits your needs, but we’ll be using the Payment Form template for this tutorial. Under the template name, select ‘Use Template.’

Use payment form template

Next, you’ll be taken to a form builder. In the General tab, you can fill out the necessary information.

Give the form a Title and Description. You can also check the CAPTCHA and email verification options to prevent spam submissions.

general tab wp simple pay

From there, navigate to the Payment tab so you can start adjusting the pricing and currency options.

You can also set the pricing to a one-time or subscription option.

payment tab wp simple pay

Below that, you can have a wide range of payment methods to choose from.

Click the checkboxes of the options you wish to accept.

payment methods wp simple pay

In the Form Fields tab, you can add any fields you want by selecting them from the dropdown menu and clicking on ‘Add Field.’ You can also edit your existing fields.

To enable Stripe Link, expand the Email Address dropdown menu. Then, you’ll have to click on the checkbox under ‘Offer Saved Payment Methods.’

offer saved payment methods wp simple pay

Then, head over to your Stripe account. Go to the Settings » Payments page.

Under the Payment Methods tab, make sure to choose ‘WP Simple Pay’ from the ‘Select platform’ dropdown menu.

Select Platform in Stripe as WP Simple Pay

Then, go back to WordPress and finish customizing your payment form.

Once completed, go ahead and hit ‘Publish.’

publish one click checkout form in WP Simple Pay

Now, you can go to any page you want and add the newly created form.

Hit the ‘+’ icon and then add the WP Simple Pay block.

add WP Simple Pay block

Then, choose the payment form you’ve just created, and it should appear on the page.

Click on the ‘Publish’ or ‘Update’ button at the top.’

publish checkout form

Now, you’ve successfully created a one-click checkout experience with WP Simple Pay.

Make sure to preview the form to ensure it works.

payment form preview wp simple pay

Method 3: Create a One-Click Checkout in WordPress Using Easy Digital Downloads (Digital Products)

If you sell digital products, there’s no better plugin for creating a one-click checkout in WordPress than Easy Digital Downloads.

With over 50,000+ users, this plugin allows you to easily manage and sell digital products like eBooks, PDFs, audio, online courses, templates, and more.

The Easy Digital Downloads website

To get started, you’ll need to install and activate Easy Digital Downloads. Upon activation, the plugin automatically creates a checkout and cart page for you.

That said, we can add a one-click checkout process by adding a buy now button with EDD. The buy now button automatically bypasses the add to cart and checkout process, sending the customer directly to payment.

For the sake of this tutorial, we’ll assume you already have a digital product created on EDD. But if you haven’t, you’ll want to read our beginner’s guide on how to sell digital downloads on WordPress.

First, go to the Downloads » Settings page in the WordPress admin panel.

Under the Payments » Stripe tab, you’ll want to click on ‘Connect with Stripe.’

edd connect stripe

You’ll be taken to the Stripe Connect Wizard.

Simply connect your existing Stripe account or create a new one.

Connect EDD with Stripe

Once connected, you’ll be directed back to WordPress.

You should see that Stripe is one of the payment options checked off in the General tab.

active gateways stripe

In addition, you’ll need to go to your Stripe account. Then head over to the Settings » Payments page.

Under the Payment Methods tab, make sure to choose the ‘Easy Digital Downloads’ option from the ‘Select platform’ dropdown menu.

select platform easy digital downloads

By doing so, every time someone purchases your digital products, Stripe Link will be activated, and their credit card information will be auto-completed into the fields.

Next, go to the Downloads » Downloads page. Then, find a digital product to which you want to add the buy now button and click ‘Edit.’

edit digital downloads

Once you’re in the block editor, click on the black side panel widget at the top.

Scroll down in the panel until you reach Button Options. From there, select ‘Buy Now’ from the dropdown menu.

buy now button in EDD

Then you’ll hit the ‘Publish’ or ‘Update’ button.

From here, you can preview your page, and you should see a ‘Checkout’ button at the bottom of your product page, which takes you straight to the checkout page. Then, you can enter your email, and Stripe will autofill your billing and payment details.

checkout button in EDD

Method 4: Create a One-Click Checkout in WordPress Using FunnelKit (eCommerce Stores)

If you have an eCommerce store, FunnelKit Funnel Builder is the best choice for setting up your express checkout process.

FunnelKit Funnel Builder

This popular sales funnel builder allows you to easily create a high-converting sales funnel to boost your average order value, reduce cart abandonment rates, and capture more leads.

You can do everything from creating lead capture pages and order bumps to creating checkout forms and slide-in carts. Best of all, you won’t need to write any code.

For this method, you’ll already need to have your product pages set up for WooCommerce. If you have not set up your store yet, check out our complete step-by-step WooCommerce tutorial.

To get started, install and activate the FunnelKit Automation plugin. Upon activation, head over to FunnelKit » Cart. You’ll want to turn on the ‘Enable Cart’ option. Under the ‘Express Checkout’ tab, click on ‘Connect with Stripe.’

connect with stripe funnelkit automations

After that, you’ll be taken to the Stripe Connect Wizard.

Simply follow the steps to connect your Stripe account to FunnelKit or create a new account.

funnelkit stripe connection

Once your Stripe account is connected to FunnelKit, you’ll be taken back to WordPress.

You’ll want to activate the ‘Credit Card (Stripe)’ option and then hit ‘Save and Continue.’

activate payment method funnelkit

Next, you’ll be asked to set up a webhook so that you’re able to automatically process payments with a single click.

Click on ‘Setup Webhook Now.’

setup webhook funnelkit

From here, you need to enable the express checkout option for Google Pay and Apple Pay.

Then, hit the ‘Confirm’ button.

enable express checkout funnelkit

You should see a confirmation message that says that the Stripe setup is successful.

Feel free to select the ‘Live’ mode if you’re ready to start accepting payments. Otherwise, you can choose the ‘Test’ option for now. Then click on ‘Save and Review Settings.’

stripe successfully setup funnelkit

Next, you’ll want to head back to FunnelKit » Cart. Then, under the Express Checkout tab, simply turn on the ‘Enable Express Checkout on Cart’ option.

Then, hit the ‘Save’ button to save changes.

enable express checkout on cart

Once that is enabled, you’re good to go.

Just go to a live product page to see it in action.

live product page one click checkout

When a customer chooses the ‘Pay Now’ option, a window will pop up.

All of the payment details saved to their Google and Apple Pay accounts will automatically appear.

payment details one click checkout preview

Method 5: Create a One-Click Checkout in WordPress Using WooCommerce (Free)

If you want a free method to add the one-click checkout in your WooCommerce store, then you can download the Direct Checkout for WooCommerce plugin.

Direct Checkout for WooCommerce

It’s a free plugin that adds a one-click buy button to your store.

Upon activation, go to the WooCommerce » Settings page. Then, navigate to Payments » Express Checkout.

From here, click the checkbox that says ‘Enable Express Checkout.’

The plugin offers a wide range of customizations. You can customize where you want the one-click checkout button to appear, as well as the color of the button and the text shown.

enable express checkout in woocommerce

Now you’re all set.

Simply go to a product page or your storefront to see the one-click checkout button.

express checkout live preview

We hope this article helped you learn how to create a one-click checkout in WordPress. You may also want to see our list of the best WooCommerce plugins for your store and our ultimate guide on how to create an email newsletter the right way.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Create a One-Click Checkout in WordPress (5 Ways) first appeared on WPBeginner.