好!欢迎访问迷津渡口 现在时间是: 天气 °C ~ °C

迷津渡口

越感到迷惑 越接近真理

pjax 百度统计失效解决(小指亲测)

百度统计在pjax失效解决办法:

原来百度统计的代码

<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?这里是网站统计id";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

修改后的百度统计代码

<script id="bd-hm">
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "//hm.baidu.com/hm.js?这里是网站统计id";
        hm.onload = function() {
            // 清除百度统计的加载标识
            delete window["_bdhm_loaded_这里是网站统计id"];
        };
        var s = document.getElementById('bd-hm');
        s.parentNode.insertBefore(hm, s);
    })();
</script>

找到pjax触发的容器,如本站使用的是#contentleft:

<div id="contentleft">...</div>

将修改后的百度统计代码添加到容器的最后,即</div>之前

删除其他地方重复部署的统计代码

注意:所有包含pjax触发容器的页面都需要添加百度统计代码


搞定啦^_^

点赞9
 标签: pjax 百度统计失效
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
breconpharm
 breconpharm 约 14 小时前回复
#214
<a href="http://www.twistnik.com/nike-internationalist-olive-green-shoesl">nike internationalist olive green</a> <a href="http://www.pkbocrangsu.com/ralph-lauren-crew-neck-jumper-sale-poloh">ralph lauren crew neck jumper sale</a> <a href="http://www.celudela.com/nike-mercurial-superfly-fg-hvid-volt-skok">nike mercurial superfly fg hvid volt</a> <a href="http://www.fooksung.com/nike-air-max-2018-m%C3%A4nner-grau-wein-rot-schwarz-schuheh">nike air max 2018 m盲nner grau wein rot schwarz</a> <a href="http://www.ankaramarti.com/nike-free-flyknit-womens-purple-shoesk">nike free flyknit womens purple</a> <a href="http://www.gcpoloclub.com/nike-air-max-tavas-herre-gr%C3%A5-skol">nike air max tavas herre gr氓</a>
breconpharm http://www.breconpharm.com/
crypolio
 crypolio 约 16 小时前回复
#213
<a href="http://www.townyplay.com/adidas-16-purechaos-fg-ag-oro-nero-scarpei">adidas 16 purechaos fg ag oro nero</a> <a href="http://www.djpunjabii.com/nike-hombres-negro-azul-zoom-winflo-2-corriendo-zapatos-zapatosh">nike hombres negro azul zoom winflo 2 corriendo zapatos</a> <a href="http://www.avsomurie.com/nike-kyrie-3-lyser%C3%B8d-r%C3%B8d-skok">nike kyrie 3 lyser酶d r酶d</a> <a href="http://www.circusveil.com/nike-high-turf-mercurialx-proximo-rainbow-gr%C3%B8nn-svart-r%C3%B8d-obuvi">nike high turf mercurialx proximo rainbow gr酶nn svart r酶d</a> <a href="http://www.laconiaoil.com/comprar-adidas-projoator-boots-zapatosl">comprar adidas projoator boots</a> <a href="http://www.hurizmir.com/ray-ban-sunglasses-wayfarer-sale-sunglassesh">ray ban sunglasses wayfarer sale</a>
crypolio http://www.crypolio.com/
cacikvideo
 cacikvideo 2019-05-18 18:20回复
#212
<a href="http://www.hinogi.com/nike-free-inneva-woven-mine-grigio-scarpel">nike free inneva woven mine grigio</a> <a href="http://www.prontosignsus.com/womens-asics-gel-noosa-tri-7-white-purple-shoesj">womens asics gel noosa tri 7 white purple</a> <a href="http://www.ticahome.com/kvinders-air-max-90-hyperfuse-alle-bl%C3%A5-skok">kvinders air max 90 hyperfuse alle bl氓</a> <a href="http://www.prformusic.com/nike-kobe-10-elite-svart-gr%C3%B8nn-obuvp">nike kobe 10 elite svart gr酶nn</a> <a href="http://www.tatilblogu.com/nike-air-max-tailwind-8-womens-yellow-orange-shoesi">nike air max tailwind 8 womens yellow orange</a> <a href="http://www.danieladirosa.com/kvinders-asics-gel-noosa-tri-8-sort-gr%C3%A5-skoj">kvinders asics gel noosa tri 8 sort gr氓</a>
cacikvideo http://www.cacikvideo.com/
bestoftumblr
 bestoftumblr 2019-05-18 17:41回复
#211
<a href="http://www.wuxiangtaichi.com/air-jordan-retro-10-kvinners-himmelen-bl%C3%A5-s%C3%B8lv-obuvl">air jordan retro 10 kvinners himmelen bl氓 s酶lv</a> <a href="http://www.culdesacmag.com/air-jordan-3-retro-lyser%C3%B8d-skoj">air jordan 3 retro lyser酶d</a> <a href="http://www.livinggreedy.com/femminile-nike-zoom-pegasus-31-bianca-oro-scarpel">femminile nike zoom pegasus 31 bianca oro</a> <a href="http://www.clickstroy.com/womens-nike-air-max-tailwind-6-blue-gold-shoesj">womens nike air max tailwind 6 blue gold</a> <a href="http://www.zotorrent.com/air-jordan-retro-13-lilla-s%C3%B8lv-skok">air jordan retro 13 lilla s酶lv</a> <a href="http://www.viptarimas.com/air-jordan-retro-11-rosa-mint-gr%C3%B8nn-obuvp">air jordan retro 11 rosa mint gr酶nn</a>
bestoftumblr http://www.bestoftumblr.com/
ottomanplaza
 ottomanplaza 2019-05-18 12:45回复
#210
<a href="http://www.govolsrealtor.com/limited-mychal-kendricks-youth-jersey-philadelphia-eagles-95-alternate-black-nfla">limited mychal kendricks youth jersey philadelphia eagles 95 alternate black</a> <a href="http://www.djdiscgolf.com/new-balance-retro-sneakers-skox">new balance retro sneakers</a> <a href="http://www.saraviquez.com/ray-ban-aviator-folding-ultra-75th-anniversary-collection-time-sunglassesb">ray ban aviator folding ultra 75th anniversary collection time</a> <a href="http://www.dfweliquid.com/mulberry-tessie-tote-pris-zero-mulberrya">mulberry tessie tote pris zero</a> <a href="http://www.mrforgps.com/billig-nike-shox-nz-dam%C3%A4nner-silber-trainersa">billig nike shox nz dam盲nner silber</a> <a href="http://www.nunbori.com/canada-goose-kensington-arctic-dusk-canadagooser">canada goose kensington arctic dusk</a>
ottomanplaza http://www.ottomanplaza.com/
mariusen
 mariusen 2019-05-18 03:25回复
#209
<a href="http://www.keleric.com/nike-air-max-bw-sky-blue-grey-shoesi">nike air max bw sky blue grey</a> <a href="http://www.jeffreya.com/nike-flyknit-lunar-3-lila-wei%C3%9F-schuhei">nike flyknit lunar 3 lila wei脽</a> <a href="http://www.vuduchoan.com/nike-lebron-soldier-9-blanco-rosado-zapatosk">nike lebron soldier 9 blanco rosado</a> <a href="http://www.gmfamilylaw.com/air-jordan-cp3-lyser%C3%B8d-mintgr%C3%B8n-skoi">air jordan cp3 lyser酶d mintgr酶n</a> <a href="http://www.clubephytus.com/kvinners-nike-air-max-tailwind-8-svart-obuvl">kvinners nike air max tailwind 8 svart</a> <a href="http://www.findnewcoupon.com/nike-air-max-2017-green-white-shoesh">nike air max 2017 green white</a>
mariusen http://www.mariusen.com/
twistnik
 twistnik 2019-05-16 01:51回复
#208
<a href="http://www.avantajreyonu.com/houston-texans-beanie-hatj">houston texans beanie</a> <a href="http://www.oranjeskishop.com/nike-air-max-zero-maschio-nero-scarpej">nike air max zero maschio nero</a> <a href="http://www.johannafrost.com/nike-air-max-90-prm-em-frau-blakc-rosa-schuhei">nike air max 90 prm em frau blakc rosa</a> <a href="http://www.rolandviet.com/m%C3%A6nd-nike-lunarglide-8-dark-bl%C3%A5-r%C3%B8d-skoh">m忙nd nike lunarglide 8 dark bl氓 r酶d</a> <a href="http://www.classmedya.com/minnesota-vikings-adam-thielen-19-nike-limited-purple-vapor-untouchable-mens-nfl-home-cheap-sale-nfli">minnesota vikings adam thielen 19 nike limited purple vapor untouchable mens nfl home cheap sale</a> <a href="http://www.anteageserums.com/nike-mercurialx-pro-street-tf-svart-hvit-oransje-obuvk">nike mercurialx pro street tf svart hvit oransje</a>
twistnik http://www.twistnik.com/
iotlsebring
 iotlsebring 2019-05-16 01:15回复
#207
<a href="http://www.teddevans.com/nike-blazer-mid-lr-neutral-grau-schwarz-schuhej">nike blazer mid lr neutral grau schwarz</a> <a href="http://www.cateycontrols.com/navy-dixie-cup-hat-history-hath">navy dixie cup hat history</a> <a href="http://www.prodomfactory.com/nike-free-trainer-5.0-gris-and-vert-chaussuresh">nike free trainer 5.0 gris and vert</a> <a href="http://www.tonyaespinoza.com/nike-m%C3%A4nner-air-max-flair-schwarz-wei%C3%9F-schuheh">nike m盲nner air max flair schwarz wei脽</a> <a href="http://www.nemagrp.com/adidas-neo-shoes-black-and-white-shoesk">adidas neo shoes black and white</a> <a href="http://www.viajesclic.com/adidas-super-samba-hvid-r%C3%B8d-skoj">adidas super samba hvid r酶d</a>
iotlsebring http://www.iotlsebring.com/
eczacinim
 eczacinim 2019-05-14 11:36回复
#206
<a href="http://www.sguerradesign.com/nike-flyknit-lunar-3-kvinders-himmelbl%C3%A5-appelsin-skoi">nike flyknit lunar 3 kvinders himmelbl氓 appelsin</a> <a href="http://www.zeneventsja.com/air-max-thea-rosso-nero-scarpeq">air max thea rosso nero</a> <a href="http://www.adharaweb.com/womens-jordan-bel-air-red-shoesj">womens jordan bel air red</a> <a href="http://www.jrelselaw.com/michael-kors-brown-leather-shoulder-tote-mkh">michael kors brown leather shoulder tote</a> <a href="http://www.intellalegal.com/mennns-asics-asics-gel-kayano-17-bl%C3%A5-hvit-obuvi">mennns asics asics gel kayano 17 bl氓 hvit</a> <a href="http://www.carmelscoffee.com/femminile-asics-gel-noosa-tri-7-verde-grigio-scarpej">femminile asics gel noosa tri 7 verde grigio</a>
eczacinim http://www.eczacinim.com/
aktuelresim
 aktuelresim 2019-05-13 12:10回复
#205
<a href="http://www.champste.com/women-nike-air-max-2014-orange-blue-green-black-shoesk">women nike air max 2014 orange blue green black</a> <a href="http://www.rollaname.com/sort-lilla-jordan-12-herre-skol">sort lilla jordan 12 herre</a> <a href="http://www.sfcigar.com/nike-air-max-thea-svart-hvit-gr%C3%A5-obuvk">nike air max thea svart hvit gr氓</a> <a href="http://www.slotoyunpro.com/nike-kobe-ad-nero-bianca-scarpei">nike kobe ad nero bianca</a> <a href="http://www.eistyles.com/ni%C3%B1os-negro-velcro-converse-zapatosh">ni帽os negro velcro converse</a> <a href="http://www.filmoriental.com/nike-air-max-agitate-6-bl%C3%A5-skok">nike air max agitate 6 bl氓</a>
aktuelresim http://www.aktuelresim.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸