Google Global Site Tag

I am trying to set up Google Analytics on my photo-album website, and it seems that things may have changed since I used Google Analytics several years ago for a client.

Google is saying…

In the past, this is what I did…

<!DOCTYPE HTML>
<html lang="en">
<head>
    <title><?php echo TITLE_HOME_PAGE; ?></title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">

    <link type="text/css" rel="stylesheet" href="css/main.css" />

    <?php
         include_once(WEB_ROOT . 'utilities/google-analytics.php');
    ?>
</head>

How crucial is the order of things in the < HEAD > and do I need to put that PHP line first, or is what I have above okay?

Thanks!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.