how to insert google tag code in php or anlaytics code in php

 how to insert google tag code in php or insert analytics code


insert the gtag in header


<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=G-5PPLT8JWQ2"></script>

<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());


  gtag('config', 'G-5PPLT8JWQ2');

</script>

---------------------------


<!doctype html>

<html class="no-js" lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="description" content="">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Title  -->

    <title>Online Courses </title>


    <!-- Favicon  -->

    <link rel="icon" href="assets/img/favicon.png">


    <link rel="stylesheet" href="assets/css/themify-icons.css">


    <!-- ***** All CSS Files ***** -->

    <link rel="stylesheet" href="assets/css/swiper.min.css">


    <!-- Style css -->

    <link rel="stylesheet" href="assets/css/style.css">


    <!-- Responsive css -->

    <link rel="stylesheet" href="assets/css/responsive.css">

<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=G-5PPLT8JWQ2"></script>

<script>

  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag('js', new Date());


  gtag('config', 'G-5PPLT8JWQ2');

</script>


</head>

<body data-spy="scroll">


    <div id="scrollUp" title="Scroll To Top">

        <i class="fas fa-arrow-up"></i>

    </div>



Comments

Popular posts from this blog

cpanel exam CPSP Answers

How to install zimbra collaboration suite 8.8.11 on CentOS 7

awstats installation