x

Adding Order Value to Facebook Pixel

Hi All, 

Just after some guidance on adding order value to the facebook pixel on the receipt page. 

I followed the advice here to get the pixel working & this works very well, i wanted to check i was going to do this right as i dont want to break my facebook pixel code

https://community.weebly.com/t5/forums/v3_1/forumtopicpage/board-id/Commerce/thread-id/2087/page/2

The code that Mike was working with goes:

fbq('track', 'PageView');

fbq('track', 'Purchase', {

value: {total},

currency:'USD'

});

</script>

The code i have from FB is:

fbq('track', 'PageView');

fbq('track', 'Purchase', {value: '0.00', currency:'GBP'});

</script>

By the looks of it i just need to swap out '0.00' for {total} and that should be it? In the weebly UI it also states:

You can use the following variables to fill in order details:

  • {txid} - Transaction id
  • {storeName} - Store name
  • {tax} - Tax value
  • {shipping} - Shipping value
  • {subtotal} - Order subtotal value

         {total} - Total order value

Seems like that is the correct thing to do but just wanted to be sure! Thanks!

4,824 Views
Message 1 of 10
Report
1 Best Answer

Best Answer

Hi kc-cottage,

Yes that's correct replace it with {total} and that should do the trick. 

View Best Answer >

4,798 Views
Message 2 of 10
Report
9 REPLIES 9

Best Answer

Hi kc-cottage,

Yes that's correct replace it with {total} and that should do the trick. 

4,799 Views
Message 2 of 10
Report

great, thank you!

4,794 Views
Message 3 of 10
Report

this not actau4lly working for me. is there another way to troubleshoot this?

3,377 Views
Message 6 of 10
Report
Square

In what way is it not working for you, @mmarquez? Do you get errors or does something else happen?

3,373 Views
Message 6 of 10
Report

Hello, 

I am trying to add code to my checkout page to track the order number + the value of that number. 

Do you know what code weeby use to pull the order code from the checkout page?

Rosie 

4,091 Views
Message 11 of 10
Report

I've been having issues with my order value not reporting to Google analytics or facebook ads. I am wondering if the {total} code is no longer working??? is there a new code someone please help

3,699 Views
Message 11 of 10
Report
Square

I think there is a bug with this, @dejadrewit Can you please submit a ticket to support so that a rep can confirm with advanced support? https://www.weebly.com/app/help/us/en Thanks! 

3,697 Views
Message 11 of 10
Report

I am at my wit's end with this - the fact that this is so difficult shows this platform is severly lacking.

Trying to get Facebook Tracking Pixel Working for Purchase Tracking and nothing is working. This shouldn't be this hard to do. 

3,240 Views
Message 11 of 10
Report
Square

I'm sorry to hear you are having trouble with the pixel. Can you confirm your site name and post a screenshot of any errors you see? 

3,195 Views
Message 11 of 10
Report