Reply To: How to add Google Analytics code on the script

Home Forums Bugs and Fixes How to add Google Analytics code on the script Reply To: How to add Google Analytics code on the script

#1735

wpdavesteam
Participant

Hi Max,
If I generate google analytics tracking code and add save it as analyticstracking.php and then include it in the index.php file of the script as:

<?php include(“header.php”);?>
<?php include_once(“analyticstracking.php”) ?>

1. Will this track all my pages on that script if it is added to the index page
or
2. The analyticstracking.php should be included in the header.php so it can track all the pages.

What would you recommend?
Best Regards,
Nishit Dave