Facebook PIxel Not Passing Total Order

TomN
New Member
2 0 0

Hi. 

I've tried multiple solutions and still, I am coming up empty. 

What I am trying to accomplish is to pass the total order value over to Facebook. Things I have tried:

1. Just placing the Facebook ID in the admin panel. Result: no conversion $ are passing through. 

2. Based on this post I replaced the '0.00' in "value;" with "{{ total_price | money_without_currency }} and placed the Facebook Pixel script in the "Additional Script" area of Settings > Checkout RESULT: Facebook pixel helper is saying that variable is not on the page. 

When I try to use GTM to place the conversion pixel using the "total_price" variable, GTM says the same thing as Facebook. 

I am a bit stumped as to what is going on. The site is goneroguesnacks.com. What is running now is what is native to Shopify after I entered the ID in the admin section and the PageView pixel I have set in GTM. 

Here's the section of the code I've been toying with:

  fbq('track', 'Purchase', 'value':'{{ total_price | money_without_currency }}','currency':'USD');

Replies 3 (3)
Ben_Kissi3
Tourist
7 0 1

Hi TomN,

I think the value is not being passed because of the variable being inside quotes. So try removing the quotes and see. Like below

  fbq('track', 'Purchase', 'value':{{ total_price | money_without_currency }},'currency':'USD');

You can reach me at benjamin[at]kudobuzz.com for assistance. Hope this helps.

Ben Kissi https://kudobuzz.com benjamin@kudobuzz.com Head of Growth, Kudobuzz RetailTower
TomN
New Member
2 0 0

Hi Ben. 

Thanks for the reply. I've dug into this a bit more and discovered a couple of things.

1. The variable needs to be in GTM for it to work. (so I took it out of GTM and just added it to the "Checkout" section in preferences)
2. The structure of that line of script was badly formed (basically your idea). Here's how that line should be written:

fbq('track', 'Purchase', {'value':{{total_price | money_without_currency}}},'currency':'USD');

Ben_Kissi3
Tourist
7 0 1

Hi Tom, 

Great to know you have solved it.

Ben Kissi https://kudobuzz.com benjamin@kudobuzz.com Head of Growth, Kudobuzz RetailTower