Retrieve the click event of the pay button in checkouts

Retrieve the click event of the pay button in checkouts

pabloceval
Shopify Partner
2 0 3

I need to retrieve the click event of the pay now button with the id checkout-pay-button from the checkouts page of a Shopify online store and from a custom Shopify pixel and using the new Shopify option, which are client events, so as not to directly modify the order status page with an additional script.

¡Developing for a better world!
Reply 1 (1)

Sinclair1
Visitor
2 0 0

Pabloceval, 

I see you’re trying to track clicks on the "Pay Now" button in Shopify’s checkout without touching the order status page smart move! You can totally do this with a custom Shopify pixel using the Web Pixels API. The trick is subscribing to the clicked event and filtering for the checkout-pay-button ID. I’ve laid out a detailed solution above with code to get you started it’s straightforward once you set it up in the Customer Events section. You’ll have it logging or sending data in no time! That said, if the button ID varies or you hit a snag with the event firing, it might need a tweak. I’d be happy to jump in and help you nail it down if you run into any trouble just let me know!
Sinclair