We’ll use Bluehost ’s cPanel for this example. After logging into cPanel, go to File Manager under the Files tab . Navigate to the root public_html folder . In that folder, go to wp-content \ themes . Locate the active theme you are using on your site and select it. Finally, locate the header.php file inside that file and right-click on it to Edit . cpanel edit header In the code editor, locate the <head> line of code near the top. Paste the Google Analytics tracking code just before the closing </head> tag .
Then save your edit. cpanel add google tracking id header You just russian number for whatsapp added the Google Analytics tracking code manually into your WordPress theme via the header.php file. Add Tracking Code via Footer.PHP File Adding the tracking code to the footer is almost identical to adding it to the header. The only difference is that you'll add it to the footer.php file, not the header.php file . the public_html root folder as in the previous process. Follow the same process you did when inserting the code into the header.
php file , but this time locate the footer.php file . Finally, insert your Google Analytics tracking code just before the closing </body> tag in your footer.php file . cpanel add google tracking id footer Add it and you’re done. You can now successfully add the tracking code to your theme’s header or footer via cPanel or an FTP client. We insert the tracking code in the header or footer so that it can track all pages. Add tracking code via Functions.PHP file For this method, we will be using the WordPress dashboard.
To get started, use your cPanel or an FTP client portal and locate
-
- Posts: 7
- Joined: Sun Dec 22, 2024 4:14 am