欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

seo 相关记录 & 谷歌统计

程序员文章站 2022-05-16 19:53:28
...

seo 优化

seo 优化是未来更好的给爬虫收入,以便提高排名和权重。除了加

<meta name="Keywords" content="**,**,********">
<meta name="Description" content="**,**,********">

还可以加一段代码javascript 代码。称 Structured Data(结构化的数据)。

<script type="application/ld+json">
        {
        "@context": "http://schema.org",
        "@type": "SaleEvent",
        "header":"Message Here!",
        "name": "page Name Millions",
        "description": "page description",
        "image": "https://img/lotto/lg/mega-millions.png",
        "startDate": "2018-01-13T02:00:00+00:00",
        "endDate": "2018-01-13T02:15:00+00:00",
        "url": "https://www.****.uk/en/lotto-results/mega-millions/2018-01-13",
        "location": {
            "@type": "Place",
            "address": "co.uk",
            "name": "co.uk"
        },
        "offers": {
            "@type": "Offer",
            "price": "2.50",
            "priceCurrency": "EUR",
            "url": "https://www.******.co.uk/en/mega-millions"
        },
        "performer": {
            "@type": "Organization",
            "image": "https://img/lotto/lg/mega-millions.png",
            "name": "Mega Millions",
            "url": "http://www.**.com/"
        }
    }
    </script>

下列是google 站长提供的例子,更详细的可*查看。

seo 相关记录 & 谷歌统计

还可以是这种形式(相应的描述写在标签里头)
seo 相关记录 & 谷歌统计
可以访问网站了解:
http://schema.org/

关于结构化数据的描述:
https://developers.google.com/search/docs/guides/intro-structured-data#guidelines

相关链接

网站的SEO以及它和站长工具的之间秘密
SEO:让搜索引擎对你的网站更有亲和力(译)

https://ziyuan.baidu.com/dashboard/index
http://humanstxt.org/ZH
http://www.google.com/webmasters/tools/home

谷歌统计
注意自己去analytics.google.com 上申请账号。

不带ga.js

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118873303-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-118873303-1');
</script>

带ga.js

<script type="text/javascript">
    <!--  Google Analytics  -->
    var _gaq = _gaq || [];
    //  ua  是一个账号、id
    _gaq.push(['_setAccount', 'UA-36810333-1']);
    _gaq.push(['_setDomainName', 'sheetjs.com']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_trackPageview']);
    (function () {
        var ga = document.createElement('script');
        ga.type = 'text/javascript';
        ga.async = true;
//        判断当前页面的协议,如果是https
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
    })();
</script>
相关标签: seo