Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #897979

    Hi there,

    I am managing three websites for the company I work for :
    http://www.acurity.be
    http://www.acurity.nl
    http://www.acurity.fr
    all made in Enfold.
    How do I incorporate the Insight Tag (LInkedin) and Facebook Pixel on these sites ?
    I should paste the code in the html of the site. I only see php-files….
    thank you for your help,
    Fabienne

    #897988

    Hey Fabienne,
    You could add you Insight Tag and Facebook Pixel to these functions that you would add to the end of your functions.php file in Appearance > Editor:
    Facebook Pixel

    function add_fb_pixel_code(){
    ?>
    Put Your Facebook Pixel Code Here
    <?php
    }
    add_action('wp_footer', 'add_fb_pixel_code');

    Insight Tag

    function add_in_insight_code(){
    ?>
    Put Your Insight Tag Code Here
    <?php
    }
    add_action('wp_footer', 'add_in_insight_code');

    Here is an example how it would look after adding your code:

    function add_fb_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', '00000000000000000'); // Insert your pixel ID here.
    fbq('track', 'PageView');
    </script>
    <noscript><img height="1″ width="1″ style="display:none"
    src="https://www.facebook.com/tr?id=000000000000000&ev=PageView&noscript=1″
    /></noscript>
    <?php
    }
    add_action('wp_footer', 'add_fb_pixel_code');

    When editing functions.php you should use the child theme, so your changes will not be lost with future theme updates Read about it & Get it here

    Best regards,
    Mike

    #905034

    Thank you Mike. Question. Couldn’t we just add the Pixel Code within the ‘Google Services’ section of the theme editor? While the tab reads ‘Google Services’, it does accommodate other forms of tracking code such as this.

    #905041

    Hi,

    Yes, that section reads other scripts as well.

    Best regards,
    Jordan Shannon

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Insight Tag / FB Pixel in html’ is closed to new replies.