How to add Google Analytics code on the script

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

This topic contains 2 replies, has 2 voices, and was last updated by max max 1 month, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1732

    wpdavesteam
    Participant

    Hi Max,
    There are scripts that has Google Analytics code. But how do we add Google Analytics code on scripts that does not have the option to add the code. Also, where do we add the code in the php script so it can track all pages.
    Can you also suggest how to add sitemaps for these scripts.
    Best Regards,
    Nishit Dave

    #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

    #1738
    max
    max
    Keymaster

    May i ask which script your going to add GA code on? Most of our scripts have the option to add GA code directly from admin panel.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.