I am trying to set a trigger in Google Tag Manager to fire whenever the "Checkout" button is clicked on a wordpress site that uses the Shopify Buy Button. I am using a regex to target the class "shopify-buy__btn--cart-checkout", which is present on the button I want to track, however the data layer records no classes associated with clicks on the Checkout button.
The purpose of this would be to ad an Adwords conversion tracking tag, and later a custom HTML tag for a Facebook Pixel. GTM would be my prefered method of tracking conversions on these platforms, however I would be open to alternatives for installing conversion tracking on these platforms.
Thank you kindly.
My guess is that it is not triggering properly because of your regex. Use (shopify-buy__btn--cart-checkout) as regex. Go to Tag Manager and on the top right there is a Preview button. Click on the preview button and open your website in the same browser and see the dataLayer data at the bottom of your screen.