Checkout Extensibility button doesn't fire WebPixels API "clicked" event

Checkout Extensibility button doesn't fire WebPixels API "clicked" event

MaxVorobevScale
Shopify Partner
1 0 0

Hello!

 

We have a Checkout extensibility custom app with a dropdown select element and a button. They both have some functionality on them (line item variant change, but that's irrelevant). And I want to track them via GTM. And since it's impossible to access window.dataLayer directly from the checkout extensibility app, I got to use Pixels.

 

So I added so-called "custom pixel" with a simple code

 

analytics.subscribe("clicked", (event) => {
  console.log('event clicked', event);
});

analytics.subscribe("input_changed", (event) => {
  console.log('event input_changed', event);
});

 

 What I discovered, when I click/change the select element, both clicked and input_changed events are fired as they should. But clicking the button on the other hand doesn't fire anything. I experimented with Pressable and Button components, neither of them fire anything.

 

Do I do something wrong here? Is there a different way to track clicks on them?

 

Thank you!

Replies 0 (0)