<?php 
$url_c =$_GET['url'];
$url_c_v = filter_var($url_c, FILTER_SANITIZE_STRING);
if($url_c_v != ""){
$c=$url_c_v.'.html';
$sql_metas = "select url,categoria,titulo,bajada,keywords,imagen_redes from noticias where url='".$c."'";
$result_metas=mysqli_query($con,$sql_metas);
$filas_metas=mysqli_num_rows($result_metas);
    if($filas_metas >0){while ($r_metas=mysqli_fetch_array($result_metas)){
?>       <title>INNOVAPUCP | <?php echo $r_metas['titulo'] ?></title>    
        <!-- Basic HTML Meta Tags -->
        <meta name='title' content='INNOVAPUCP | <?php echo $r_metas['titulo'] ?>' /> 
        <meta name='description' content='<?php echo $r_metas['bajada'] ?>' />
         <?php if($r_metas['categoria'] == 1){$categoria='articulo';?>  
        <meta name='url' content='<?php echo $host; ?><?php echo $r_metas['url'] ?>' />   
        <?php }elseif($r_metas['categoria'] == 2){$categoria='tedencia';    ?>
        <meta name='url' content='<?php echo $host; ?>innovapucp/<?php echo $r_metas['url'] ?>' />         
        <?php                
        }elseif($r_metas['categoria'] == 3){$categoria='evento'; ?>
        <meta name='url' content='<?php echo $host; ?><?php echo $r_metas['url'] ?>'/>          
        <?php }?>
        <meta name='keywords' content='<?php echo $r_metas['keywords'] ?>' />
        <!-- OpenGraph Meta Tags --> 
        <meta property="og:locale" content="es_ES" />
        <meta property="og:type" content="website" />
        <meta property='og:title' content='INNOVAPUCP | <?php echo $r_metas['titulo'] ?>' />
        <meta property='og:description' content='<?php echo $r_metas['bajada'] ?>' />
        <?php if($r_metas['categoria'] == 1){$categoria='articulo';?>  
        <meta property='og:url' content='<?php echo $host; ?><?php echo $r_metas['url'] ?>' />   
        <?php }elseif($r_metas['categoria'] == 2){$categoria='tedencia';    ?>
        <meta property='og:url' content='<?php echo $host; ?><?php echo $r_metas['url'] ?>' />         
        <?php                
        }elseif($r_metas['categoria'] == 3){$categoria='evento';?>
        <meta property='og:url' content='<?php echo $host; ?><?php echo $r_metas['url'] ?>'/>          
        <?php }?>
        <meta property="og:site_name" content='<?php echo $r_metas['titulo'] ?>'/>
        <meta property='og:image' content="<?php echo $host; ?>admin/img/noticias/<?php echo $r_metas['imagen_redes']?>" />
<?php }}}?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P4864XH');</script>
<!-- End Google Tag Manager -->


Additionally, paste this code immediately after the opening <body> tag: 

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-P4864XH"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
</head>