Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2009
    Posts
    69
    Plugin Contributions
    0

    Default i wanna install facebook pixel into my website

    i wanna install facebook pixel into m website

    i am asked to
    Copy the code below and paste it between the <head> and </head> in your website code. The pixel will track visits to every page of your website.

    My Question
    1. which file should i install it? since that i need to put in every page of my website
    2. can i put in JS script?
    3. i tried putting in JS script, however, it doesnt work , possible because i also copy <script> </script> into the js file?

    Code:
    <!-- Facebook Pixel Code -->
    <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', 'NUMBER');
    fbq('track', "PageView");</script>
    <noscript><img height="1" width="1" style="display:none"
    src="https://www.facebook.com/tr?id=NUMBER&ev=PageView&noscript=1"
    /></noscript>
    <!-- End Facebook Pixel Code -->

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: i wanna install facebook pixel into my website

    Make a copy for your template structure of /includes/templates/template_default/common/html_header.php
    Insert your code just before the </head> tag
    Code:
    // DEBUG: echo '<!-- I SEE cat: ' . $current_category_id . ' || vs cpath: ' . $cPath . ' || page: ' . $current_page . ' || template: ' . $current_template . ' || main = ' . ($this_is_home_page ? 'YES' : 'NO') . ' -->';
    
    
    ?>
    
    Insert your code here
    </head>
    <?php // NOTE: Blank line following is intended: ?>
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: i wanna install facebook pixel into my website

    Thanks so much! i should try that and let u know the outcome! thank you!

  4. #4
    Join Date
    Jan 2009
    Posts
    69
    Plugin Contributions
    0

    Default Re: i wanna install facebook pixel into my website

    if i have my own templates , can i know is it i need to go to change this specific file in my own template instead?

    /includes/templates/MYTEMPLATE/common/html_header.php

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: i wanna install facebook pixel into my website

    change this specific file in my own template instead
    Yes, and wht I stated that you should make a copy for your template

    If you already have one in your template then edit that one

    One should NEVER edit the files in template_default
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. facebook javascript for remarketing pixel
    By juneloweelyn in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 24 Mar 2014, 02:27 AM
  2. Auto Facebook Install
    By bluelightnin6 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 25 Jan 2012, 01:51 AM
  3. How to add a facebook button to website?
    By tjturner in forum General Questions
    Replies: 3
    Last Post: 18 Jul 2011, 09:35 AM
  4. Integrating Facebook into Main Page
    By SavAnn in forum General Questions
    Replies: 2
    Last Post: 8 May 2010, 02:45 AM
  5. Install Exixt Zencart Website into Webserver
    By Misteryoso in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 12 Nov 2007, 05:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR