analyticstracking.php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DemOnstar
    Senior Member
    • Nov 2012
    • 1912

    analyticstracking.php

    I have created a php file based on the tracking code and I am about to upload it.

    Create a PHP file named "analyticstracking.php" with the code above and include it on each PHP template page. Then, add the following line to each template page immediately after the opening <body> tag:
    Code:
    <?php include_once("analyticstracking.php") ?>
    These are the instructions according to Google Analytics, but I really don't understand what is meant when it says after the <body> tag: as I can't find the body tag in the php file..ie.forum.php.

    Where is this code placed please?

    Code:
    <?php include_once("analyticstracking.php") ?>
    Thanks..


  • Will Watts
    Member
    • Nov 2012
    • 43
    • 4.2.X

    #2
    It would be much easier for you to just add the GA Tracking code to your templates. If you use vBSEO, you can also add your GA code there.

    Adding more PHP files will add a performance hit every time a page loads, albeit a small one. It also might cause you issues in the future if you upgrade to a newer vB release and forget to modify the correct files again.

    Comment

    • DemOnstar
      Senior Member
      • Nov 2012
      • 1912

      #3
      Cheers Will, I will look into that... BTW, does one add it to the forum root PHP files or are the additions made to some other area that I am not yet familiar with?

      I have this confusion with files and templates..

      Is there a list of common templates that this is added to?

      Thanks again...


      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...