Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #785445

    HI I want to add the facebook pixel code to my website. I’ve looked through the threads and there is lots of different advice about how to do this. What is the latest advice please, as there is a new facebook pixel code since Feb 15 2017. My code in included in private content

    Many thanks

    Jenny

    #785447

    Hey JennyGr,

    You can add the code (in this format) in functions.php (at the bottom):

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

    The whole code for with you fb pixel code is in private content. Hope this helps :)

    Best regards,
    Nikko

    #786051

    HI Nikko I was just about to add this then I noticed in Facebook that the pixel code had been installed 8 hours ago and was working, Had you been kind enough to go ahead an install it for me?

    Thanks

    Jenny

    #786204

    Hi Jenny,

    I would gladly do so but I’m afraid it’s not me since I don’t have any admin access to your site. Usually when someone gives their admin access, I add some codes and tell them what I did to fix it. :)

    Best regards,
    Nikko

    #786217

    Okay thanks Nikki. I checked facebook to see what was going on and it’s actually returning the raw pixel fires from pages at https://kriesi.at/support/ I’mt not sure why it’s doing that?

    So I copied the code as you suggested in the php file and it did not work, but instead showed up as code below the footer on my site. Any suggestions?

    Thanks

    Jenny

    #786227

    Hi,

    I just checked the code I gave in private content but it seems some code were missing, try to use the code I have uploaded in pastebin, link in private content. Hopefully that works well :)

    Best regards,
    Nikko

    #786788

    HI Nikko I’ve added that code to the functions php.

    I’ve tested it in Facebook pixel helper and get the following error. Any advice?

    The Facebook pixel code on this page didn’t load, so no information was sent to Facebook.

    Facebook’s further advice is

    Pixel Did Not Load

    This error means that the Pixel Helper found what looks to be Facebook pixel code on your site, but the actual HTTP call was never made.

    This could typically due to an error in the code, but could also occur if the pixel fires on a dynamic event (e.g. on a button click).

    In that case, the error will disappear upon clicking on the button.

    #786921

    Hi,

    Can you give us a link to your site? so we can take a closer look, and also ftp access so I can access the functions.php file (modifying files in the dashboard is a bit risky). Just post the details in Private Content so it’s only visible for moderators.

    Best regards,
    Nikko

    #797182

    Hi Nikko I’ve included admin login in the private content. How do i give you FTP access?

    Thanks

    Jenny

    #797381

    Hi,

    You can try to search with these keywords get ftp access hostname where you replace hostname with the host where your site resides. For example godaddy has this instruction: https://ph.godaddy.com/help/find-your-ftp-loginusername-4881

    I have modified the code you have on functions.php and the problems are the single and double quotes which are reflecting on the frontend. Can you check again and tell us if it works :)

    Best regards,
    Nikko

    #812853

    Hi Nikko,

    I’m after something similar; we’ve been adding multiple ids to track different events, however we’re not sure how to add pixel code to the Woocommerce ‘thank you’ page specifically.

    Any help would be much appreciated.

    Thanks,
    Tanker

    #812924

    Hi,

    You can try this code: https://pastebin.com/i3Y9MEBv
    There are more options you can use, for more information just go to: https://codex.wordpress.org/Conditional_Tags and find is_page(). Hope this helps :)

    Best regards,
    Nikko

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.