1/7/2024 0 Comments Stripe checkout![]() Your conversion tracking would record it as a conversion, while the actual widget reports a failure. If the payment information is declined, such as in the case of fraudulent information or a typo in the card number, there’s no failsafe. As we learned above, clicking the button generates a token from Stripe. The flaw with this script is that it tracks when someone clicks the button to initiate payment. It shouldn’t be a noticeable delay regardless, but there’s no reason to clutter your header if you can help it. Otherwise, the script needs to finish loading, even if it doesn’t execute, before the page fully loads. I recommend the footer, or at least lazy loading it. This script can be placed anywhere on the page, since it only triggers when the user clicks on the checkout button. You can read more about the individual parameters and how they’re used in the Google Analytics documentation here. Below that is the full script for tracking the data. The second block of code, then, is the list of data that is accessible from the click event. What this code is doing is setting up a Google Analytics event to track when someone clicks on the checkout widget. The code specifies that the click has to be on the Stripe Checkout button. There’s a script at the top that adds a listener event called a click. Regardless, it’s a base you’ll want to have your own version.īelow that you’ll see some more code from the top answerer. It’s two versions of the checkout, when you likely only need one. The example version has a fake API key, a $1.99 recurring monthly subscription setup, and a larger family plan. You will, of course, want to be using your own version. Rather than copy and paste it here for you, I’ll guide you through understanding it.įirst of all, at the very top, we have this guy’s example of the Stripe Checkout code. This thread on Stack Overflow has all of the relevant code. As such, I’m listing the Google Analytics solution first. Google Analytics is the default analytics system most of us use, right up until we run into limitations and want to switch to a potentially more robust, paid solution. Stripe Native Integrations Google Analytics Event Tracking I recommend turning this on if you’re in a high risk industry or your business has a lot of attempts at fraud or charge-backs. Card validation is performed with the credit card networks, but you can enable zip code verification as well if you want an additional layer of security. You need to have SSL on any page that is embedding the Stripe widget, to prevent man in the middle attacks. First of all, it needs to have HTTPS access. It’s also worth noting a few quirks with Stripe Checkout. Make sure to enable useful information like billing address, currency, and email so you can cross-reference your data with other sources of data in your ecommerce tracking. When you’re tracking conversions, remember that you need to have Stripe actually harvest the relevant data for you to track. It’s bulkier code, but it’s necessary to track data. This is how you’ll use scripts and most forms of integration. Custom allows you to create a custom button and pass the Stripe token through a JavaScript callback. It’s enough for many users, though if you want to track advanced data, you’ll need to use the custom option. The simple option is a basic pay with card option and keeps the script simple. Stripe Checkout has two types of integrations. If you’re not a developer, I’ll try to give you a couple valid options for setting up conversion tracking. You can read all of the Checkout documentation, including what information you can track and what you can’t, from this developer page. If you’re a developer looking to develop your own custom solution, I’ll leave you to it. The token is submitted to your server, and your server uses the token to charge the card the appropriately authorized amount. Stripe then validates the card information and, if valid, sends a token back to Checkout. ![]() Checkout sends the payment information to Stripe directly, without touching your servers. The customer can then click to pay, fill out their information, and submit it. How does it work? When a customer arrives on a page with the widget installed, the widget loads over HTTPS. With their system, your servers never see the user’s card information, meaning there’s nothing for a potential hacker to steal. One of the biggest benefits of using Stripe Checkout is their use of tokens. ![]() Customers can then enter their financial information – email and card information – and can pay immediately. You set it up on a product page, a cart page, or even a landing page. Checkout specifically is a payment widget. Stripe Checkout is one of many services provided by Stripe for ecommerce.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |