Google Tag Manager Triggers for "Checkout" clicks on Wordpress (Shopify Buy Button)

ZanderIM
New Member
1 0 0

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. 

0 Likes
Eli10
New Member
5 0 0

I've the same question, do you have a solution for us?

Tnks

0 Likes
sanils
Tourist
22 0 3

Hi Zanders,

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. 

0 Likes
Eli10
New Member
5 0 0

Hello,
I wrote as Trigger Type: Click -just link

and as an event  --> click classes equals 'shopify-buy__btn - cart-checkout' .

but in preview tag not fire. 

How do I track a shopify buy button on wordpress with google tag manager?

tnks in advance for the help!

 

Elisa

0 Likes
sanils
Tourist
22 0 3

Send me the link to the website. 

0 Likes
Eli10
New Member
5 0 0

You can find the buttons here , all the 'buy now' are from shopify

tnks

0 Likes
sanils
Tourist
22 0 3

Sorry, I don't see any Shop Now. Shopify store.png

0 Likes
Eli10
New Member
5 0 0

DNS settings were updating, try again if you want ..

0 Likes
sanils
Tourist
22 0 3

Update the Click trigger as (shopify-buy__btn-wrapper)|(shopify-buy__btn) and test it is it working. Use the preview button on the Google Tag Manager. 

0 Likes
Eli10
New Member
5 0 0

Thank you for the answer,

it doesn't work in the preview either 

Option 1)  

Trigger Type: Click-just Links
Condition: Click Classes equals 'shopify-buy__btn'

 

Option 2)  

Trigger Type: Click-just Links
Condition: Click Classes equals 'shopify-buy__btn-wrapper'

tnks

0 Likes