X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Setting up Facebook conversion Tracking in Checkout?? (https://forum.x-cart.com/showthread.php?t=68205)

zebu 11-23-2013 03:11 PM

Setting up Facebook conversion Tracking in Checkout??
 
I dont seem to have much luck getting Facepook conversion tracking working.

I have used the Chrome Facebook Power editor to create the pixel code.

I have placed it in customer/main/order_message.tpl

Done some test orders, viewed source to insure code is on page (which it is)

Bit the pixel still shows as unverified in Facebook.

Facebook instructions says it has to go in between the <head> tags. Which placing in the above file does not do. Perhaps that is my problem.

So how do you get the pixel code into the header tags on the order confirmation page?

Thanks

totaltec 11-24-2013 06:23 AM

Re: Setting up Facebook conversion Tracking in Checkout??
 
Try using this if statement in your home.tpl:
Code:

{if $main eq "order_message"}
  Facebook Pixel Here
{/if}


zebu 11-24-2013 01:14 PM

Re: Setting up Facebook conversion Tracking in Checkout??
 
Hi Mike,

Awesome thank you! That seems to have put the code in the right place.

Appreciate you taking the time to help!

Cheers Zane

alexenberg 11-24-2013 07:35 PM

Re: Setting up Facebook conversion Tracking in Checkout??
 
This is helpful, I see the Facebook code in the source but the {} is erased. The code should say var fb_param = {}; and instead shows this var fb_param = ;

Can you please let me know how to enable the {}

Thank you, Ari

cflsystems 11-24-2013 10:11 PM

Re: Setting up Facebook conversion Tracking in Checkout??
 
You have to escape any code that smarty should not touch

{literal}
your js code here
{/literal}

{literal} tag tells smarty to leave the code in it as is and not try to interpret it

alexenberg 11-25-2013 08:28 AM

Re: Setting up Facebook conversion Tracking in Checkout??
 
Awesome, thank you!

Sean Stacey 09-17-2014 01:39 PM

Re: Setting up Facebook conversion Tracking in Checkout??
 
I have used this thread in the past, and it works, but what about setting up converaion tracking in x-cart 5?


All times are GMT -8. The time now is 03:08 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.