- This topic has 12 replies, 7 voices, and was last updated 2 years, 12 months ago by
Katy.
-
AuthorPosts
-
March 30, 2017 at 10:00 am #299469
Lainey
Hi! I am looking at the GP Hooks option. Which of these boxes do I use to insert my Facebook pixel? Thank you!
GP Premium 1.2.96March 30, 2017 at 10:59 am #299502Tom
Lead DeveloperLead DeveloperThe wp_footer hook should do the job 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMarch 30, 2017 at 2:12 pm #299589Lainey
Sorry, I should have provided this additional information… the instructions from Facebook are:
“Copy the base code below and paste it between the header tags on every page of your website.” I wasn’t sure if that meant in the wp_head, Before Header, Before Header Content, After Header Content or After Header box in the GP Hooks. Just curious, if I used the wp_footer hook, would that mean the person would need to have scrolled down to the footer before the pixel would consider it engagement on that page? Thanks!March 30, 2017 at 4:45 pm #299632Tom
Lead DeveloperLead DeveloperIn that case, you would want to place it in the
wp_head
hook 🙂Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 30, 2017 at 4:29 am #357022Nicki Watson
I’m just doing this too, can I ask if the execute PHP box needs to be ticked?
July 30, 2017 at 9:38 am #357089Leo
StaffCustomer SupportSorry what’s the code?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 30, 2017 at 10:23 am #357109Nicki Watson
<!– 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’, ‘115238572459790’); // 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=115238572459790&ev=PageView&noscript=1″
/></noscript>
<!– DO NOT MODIFY –>
<!– End Facebook Pixel Code –>
>July 30, 2017 at 10:32 am #357117Tom
Lead DeveloperLead DeveloperNope, no PHP in there 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJuly 30, 2017 at 1:10 pm #357215Nicki Watson
Thanks- all done and working now.
July 30, 2017 at 6:17 pm #357302Tom
Lead DeveloperLead DeveloperGlad we could help 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentMay 15, 2019 at 2:55 am #899879José Ramón
Hello there! Do I have to chose a location in display rules for it to work?
If I select “Entire Site”, the site partly goes down.
Thank you!
May 15, 2019 at 4:38 am #899967David
StaffCustomer SupportHi there,
yes a display rule is required. I am not sure what you mean by:
If I select “Entire Site”, the site partly goes down.
Can you explain or provide a link to the site to show the issue?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/May 28, 2019 at 5:46 am #913130Katy
Is there a video tutorial showing how to install or add the FB Pixel into the site? I don’t know how to access hooks from my WordPress dashboard. If there isn’t a video tutorial, can someone walk me through the process.
1) Where do I go in WP to access hooks?
2) What kind of hook do I use – obviously wp_header – but how does this work with FB’s pixel code?Thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.