Return to Support

Goggle Universal Analytics tracking code where does it go?

Home Forums Franz Josef Support Goggle Universal Analytics tracking code where does it go?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10485
    franzss
    Member

    In the Franz theme where should I enter the code below for new Goggle Universal analytic s?

    Goggle fro some reason is no longer recognizing tracking codes in between head tags.

    tracking Instructions from Goggle below:

    PHP Implementation optional

    Use the code above to create a file named “analyticstracking.php”, and include the file on each PHP template page. ( I did this)

    Add the following line to each template page immediately after the opening <body> tag (where do i do this?)

    <?php include_once("analyticstracking.php") ?>

    this is the body tag I see, in :

    Franz Josef: Theme Header (header.php)

    </head>

    <body <?php body_class(); ?>>

    is this correct location for this code <?php include_once("analyticstracking.php") ?> here?

    #46228

    Avoid editing theme files. Instead, create a child theme, copy FJ’s header.php file over to you child theme, and add the code to that file.

    And yep, that is the correct location for that code.

    FWIW, there are probably plugins that can handle this for you, if they have been recently updated.

    #46229
    franzss
    Member

    Thanks for your answer.

    Will this new code I enter for this disappear when the Theme is updated? will I have to enter it again at that time?

    Where do I find out how to create child themes?

    Thanks Again

    Mike

    #46230

    Yes, it will. That is why you want to use a child theme.

    WordPress Child Themes: The Whys and Hows

    https://codex.wordpress.org/Child_Themes

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

You must be logged in to reply to this topic.