SEO, AdWords, affiliates, advertising, and promotions
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');
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.
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');
Hi Tom,
Great to know you have solved it.
User | RANK |
---|---|
11 | |
4 | |
3 | |
3 | |
3 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023