Jump to content

Where to put Facebook Pixel code ?


oklok

Recommended Posts

 

So I am supposed to put the Facebook Pixel code in the Prestashop header file, just above the </head> tag

(themes\classic\templates\_partials)

Realized there is no header tag at all in the file.
Anyone knows how to apply in this case?

Link to comment
Share on other sites

On prestashop 1.7 you have 2 files header and head .

 

when. you open head file you are inside the TAG head, anyway you can see <head> tag on file layout-both-columns.tpl inside layout folder

where is <head> tag on prestashop  please see my video :

Where is prestashop head tag on prestashop 1.7 ?

solve the problem  ? 

Edited by luisleitaoaudio (see edit history)
  • Like 1
Link to comment
Share on other sites

 

You are the best!🥰
Took me forever to find the header.
Have not tested it yet,but should work now by simple put code below <head> tag:

  <head>
  <!-- Facebook Pixel Code -->
<script>  blablabla</noscript>
<!-- End Facebook Pixel Code -->

  {block name='head'}
      {include file='_partials/head.tpl'}
    {/block}    
  </head>

Link to comment
Share on other sites

  • 6 months later...
  • 5 weeks later...
  • 3 years later...
On 19/6/2020 at 1:54 AM, luisleitaoaudio dice:

On prestashop 1.7 you have 2 files header and head .

 

when. you open head file you are inside the TAG head, anyway you can see <head> tag on file layout-both-columns.tpl inside layout folder

where is <head> tag on prestashop  please see my video :

Where is prestashop head tag on prestashop 1.7 ?

solve the problem  ? 

Ciao @luisleitaoaudio,

on prestashop version 1.7.8 I can't find the _partials folder.... where can I find the head.tpl files in this version?

Thank you

Link to comment
Share on other sites

3 minuti fa, Andrei H dice:

Hi @Nico,

Are you using a custom theme?

For the classic one, the location should be the same as highlighted in the video. You can also check the official repository: https://github.com/PrestaShop/PrestaShop/tree/1.7.8.x/themes/classic/templates/_partials

Thanks.... solved... and inserted pixel code is working 😉
Now, I also insert the analytics code
Thank you guys!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...