Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: Trying to log dom events but they are not fired

Trying to log dom events but they are not fired

toplyne
Shopify Partner
1 0 2

I am create a web pixel extension to track user behaviour. When subscribing to standard events they are fired correctly. But subscribing to dom events does work.

 

 

 

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

 

 

 

I tried on firefox and chrome but the click event is not fired. The same happen for other dom events like form_submitted, input_focused as well.

What might be happening here? Couldn't find any documentation around troubleshooting this.

Replies 3 (3)

Tanip
Shopify Partner
7 0 2

In my case, it only works on checkout pages, which is not my intended use. Any help is appreciated

ebrenes
Shopify Partner
5 0 2

Anybody have a fix for this - I got the same issue!!!

digilytiks
Shopify Partner
2 0 0

The 'clicked' DOM Event definitely looks to only work on the checkout page.

 

Did anyone else find a solution/workaround @ebrenes @Tanip ?