Connect the Meta Pixel with HikaShop

  • Posts: 5
  • Thank you received: 2
  • Hikashop Business
4 hours 51 minutes ago #370655

-- url of the page with the problem -- : www.sicilia-beneteau.it
-- HikaShop version -- : 6.3.0
-- Joomla version -- : 6.0.3
-- PHP version -- : 8.4.16
-- Browser(s) name and version -- : Google Chrome 145.0.7632.117

Hi,
I followed the instructions on how to install the Meta Pixel. On all pages, the script is inserted:

<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');

fbq('init', '1942042939703170');
fbq('track', 'PageView');
</script>

Now it is required to insert it on the product page (show_default):
fbq('track', 'AddToCart');

And on the order confirmation page (end):
fbq('track', 'Purchase’);

Could you please provide me with the correct code to insert into these two pages with the two specific events, “AddToCart” and “Purchase”?

Thank you for your support.

Please Log in or Create an account to join the conversation.

  • Posts: 85201
  • Thank you received: 13907
  • MODERATOR
1 hour 43 minutes ago #370656

Hi,

This is not as simple as just copy / paste. It requires proper development and we don't have any ready-made code for this.
I would recommend you to use this plugin: extensions.joomla.org/extension/hikashop...meta-pixel-tracking/
It was made specifically for this so that you can set it up easily without any coding.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum