Return to Support
Home › Forums › Franz Josef › Support › Goggle Universal Analytics tracking code where does it go?
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)
<body <?php body_class(); ?>>
is this correct location for this code <?php include_once("analyticstracking.php") ?> here?
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.
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?
Yes, it will. That is why you want to use a child theme.
WordPress Child Themes: The Whys and Hows
You must be logged in to reply to this topic.
Made with by Graphene Themes.