[Skip to main content](#vessel-content)

#   Facebook Conversion Pixel

##

- **[ilovekratom](/forum/user/10051-ilovekratom "View ilovekratom's Profile")**
- [![ilovekratom's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-07-23.jpg)](/forum/user/10051-ilovekratom "View ilovekratom's Profile") Topic Author
- [ Offline](/forum/user/10051-ilovekratom)

Less More

- Posts: 66
- Thank you received: 2
-
-
-
-

11 years 7 months ago [\#193112](#193112) by [ilovekratom](/forum/user/10051-ilovekratom "View ilovekratom's Profile")  *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#193112 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")* was created by *[ilovekratom](/forum/user/10051-ilovekratom "View ilovekratom's Profile")*

-- HikaShop version -- : HikaShop [1310121420]
-- Joomla version -- : 2.5.8
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : All

Hi, I need to add a Facebook javascript snipet between the &lt;head&gt; &lt;/head&gt; tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook [ www.facebook.com/help/328988437301229](https://www.facebook.com/help/328988437301229) and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ilovekratom](/forum/user/10051-ilovekratom "View ilovekratom's Profile")**
- [![ilovekratom's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-07-23.jpg)](/forum/user/10051-ilovekratom "View ilovekratom's Profile") Topic Author
- [ Offline](/forum/user/10051-ilovekratom)

Less More

- Posts: 66
- Thank you received: 2
-
-
-
-

11 years 7 months ago [\#193115](#193115) by [ilovekratom](/forum/user/10051-ilovekratom "View ilovekratom's Profile")  Replied by *[ilovekratom](/forum/user/10051-ilovekratom "View ilovekratom's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#193115 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

So, I read further on this and facebook recommends putting the code between the &lt;head&gt; &lt;/head&gt; tags, but you can put it in the page. I went to hikashop admin and display --&gt; views --&gt; checkout / after_end.php and I can drop the code above the &lt;?php tag at the top. Is this the correct views file or should it be on checkout / end.php ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 7 months ago [\#193442](#193442) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#193442 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

Hi,

You can indeed add that code at the beginning of the after_end view file but that will only work if you're using a payment method which redirect to the payment gateway payment page and then redirect back to your website and without a return URL configured.
For the other payment methods where there is not a redirection to the payment gateway for the payment, you can add your code in the end view file.
For the first type of payment methods, you can also add the code in the end file, but as that view is displayed before the redirection to the payment gateway, the order won't have been paid yet when the conversion pixel displays.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[dennis3m](/forum/user/36804-dennis3m "View dennis3m's Profile")**
- [![dennis3m's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/flower.jpg)](/forum/user/36804-dennis3m "View dennis3m's Profile")
- [ Offline](/forum/user/36804-dennis3m)

Less More

- Posts: 28
- Thank you received: 1
-
-

11 years 5 months ago [\#200352](#200352) by [dennis3m](/forum/user/36804-dennis3m "View dennis3m's Profile")  Replied by *[dennis3m](/forum/user/36804-dennis3m "View dennis3m's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#200352 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

Hello:

I am having the same problem. I have added the pixel code to the beginning of the after_end view file, but on Facebook it is showing that my pixel is not verified.

My site is using the Paypal's Adaptive Payment as the payment method. Should I be putting the codes into a different part of a different file instead?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 5 months ago [\#200379](#200379) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#200379 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

Hi,

If you put it in the after_end file, the pixel will only display after the customer click on the "go back to the shop" link at the end of the PayPal payment (the redirection can be automated with a setting of your PayPal account).
If the user doesn't click on it, the pixel won't display and thus you won't get anything in Facebook.
You can alternatively put it in the "end" view file and in that case it will display before the redirection to PayPal for the payment (so you might get orders which won't be paid in your conversion statistics).

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[dennis3m](/forum/user/36804-dennis3m "View dennis3m's Profile")**
- [![dennis3m's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/flower.jpg)](/forum/user/36804-dennis3m "View dennis3m's Profile")
- [ Offline](/forum/user/36804-dennis3m)

Less More

- Posts: 28
- Thank you received: 1
-
-

11 years 5 months ago [\#200455](#200455) by [dennis3m](/forum/user/36804-dennis3m "View dennis3m's Profile")  Replied by *[dennis3m](/forum/user/36804-dennis3m "View dennis3m's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#200455 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

Hello:

Thank you. I will give that a try!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[webhelpus](/forum/user/11328-webhelpus "View webhelpus's Profile")**
- [![webhelpus's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar11328.png)](/forum/user/11328-webhelpus "View webhelpus's Profile")
- [ Offline](/forum/user/11328-webhelpus)

Less More

- Posts: 78
- Thank you received: 3
-
-
-
- [](http://www.webhelpus.com)
-

10 years 8 months ago [\#229489](#229489) by [webhelpus](/forum/user/11328-webhelpus "View webhelpus's Profile")  Replied by *[webhelpus](/forum/user/11328-webhelpus "View webhelpus's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#229489 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

There is a line in the Facebook Conversion code that needs to be changed to make the value dynamic. How can I get this to work with HikaShop?
Code:

{'value':'0.01','currency':'USD'}])

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

10 years 8 months ago [\#229538](#229538) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#229538 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

You could do like that: Code:

&lt;?php if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR); if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true; $app =JFactory::getApplication(); $order_id = $app-&gt;getUserState('com_hikashop.order_id'); $orderClass = hikashop_get('class.order'); $order = $orderClass-&gt;get($order_id); $currencyClass = hikashop_get('class.currency'); $currency_id = intval($order-&gt;order_currency_id); $currency = $currencyClass-&gt;getCurrencies($currency_id, $null); echo "{'value':'".$order-&gt;order_full_price."','currency':'".$currency[$currency_id]-&gt;currency_code."'}])"; ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[SnoozeULooze.co.za](/forum/user/28906-snoozeulooze-co-za "View SnoozeULooze.co.za's Profile")**
- [![SnoozeULooze.co.za's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28906-snoozeulooze-co-za "View SnoozeULooze.co.za's Profile")
- [ Offline](/forum/user/28906-snoozeulooze-co-za)

Less More

- Posts: 104
- Thank you received: 2
-
-

10 years 2 months ago [\#247461](#247461) by [SnoozeULooze.co.za](/forum/user/28906-snoozeulooze-co-za "View SnoozeULooze.co.za's Profile")  Replied by *[SnoozeULooze.co.za](/forum/user/28906-snoozeulooze-co-za "View SnoozeULooze.co.za's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#247461 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

HI Nicolas

I just want to make sure I understand correctly.

According to the facebook pixel tutorials that I have gone through the tracking code is placed after the fbq('track', "PageView"); but before the &lt;/script&gt; tag
Code:

fbq('track', "PageView"); fbq('track', 'Purchase', {value: '0.00', currency:'ZAR'}); &lt;/script&gt;

Where would I insert your code

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

10 years 2 months ago [\#247492](#247492) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Facebook Conversion Pixel](/forum/27-checkout/875406-facebook-conversion-pixel#247492 "-- HikaShop version -- : HikaShop &#91;1310121420&#93; -- Joomla version -- : 2.5.8 -- PHP version -- : 5.3.29 -- Browser(s) name and version -- : All  Hi, I need to add a Facebook javascript snipet between the   tags on the checkout page ../checkout/step/step-4 . It's for tracking visitor conversions originating from a facebook ad. I've read the the howto's on facebook   www.facebook.com/help/328988437301229  and there are plugins for wordpress, etc, but nothing for joomla or hikashop. Is there anything that you recommend for this? Or can you offer some ideas for a solution? Thanks guys and I appreciate any input that you have.")*

Hi,

You need to add the whole javascript code in the file "after_end" via the menu Display&gt;Views. So you would insert the code proposed instead of the piece: {value: '0.00', currency:'ZAR'}
So that this would be dynamically filled by the code proposed.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NTQwNi1mYWNlYm9vay1jb252ZXJzaW9uLXBpeGVsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.276 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
