Facebook Analytics Integration with WordPress Website

Posted in: Newspaper
Post count: 1

Hi, I wanted to integrate Facebook Analytics to my WordPress website but there is a problem. The Facebook Analytics requires to upload the JavaScript to every page that I want to use analytics for, and it should be placed in the <body> tag of that page. Now how can I access code for each page I have created my self, like “contact” page for example. I can’t seem to find that in Appearance–Editor.

Here is the screenshot of Facebook Requirement.

Facebook Analytics for Webiste - Facebook Apps

Post count: 23312

Hello shoaibmumtaz,

You should edit the header.php core file because in that file you will found the body tags like this -> https://www.screencast.com/t/SolMBZuqk Also, if you want to target a specific page you should create some conditions for these, using the is_page() like to this documentation here -> https://developer.wordpress.org/reference/functions/is_page/

Hope this helps!

Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.