Kānana i nā subdomain ma Google Analytics

ga

Me nā polokalamu e like me kahi lawelawe (SaaS) mea kūʻai aku e like me Hoʻohui, ʻelele ʻoe i kahi subdomain a hoʻokipa i kāu blog ma kahi subdomain ʻokoʻa ma mua o kāu pūnaewele. ʻO ka maʻamau, hoʻokō ʻia kēia me blog.domain.com a me www.domain.com. Hoʻokomo nā ʻoihana maʻamau i kahi moʻokāki kaʻawale loa ma Google Analytics e nānā i ka subdomain blog. ʻAʻole pono ia.

E ʻae ʻo Google Analytics iā ʻoe e nānā i nā subdomain he nui i loko o kahi kikoʻī. E hana ai i kēia, hoʻohui wale ʻoe i kahi laina o ke code i kāu script Google Analytics i kēia manawa:

Palapala Google Analytics hou

	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-XXXXXX-XX']);
    _gaq.push (['_ setDomainName', 'example.com']);
	_gaq.push (['_ trackPageview']); _gaq.push (['_ trackPageLoadTime']); (function () {var ga = document.createElement ('script'); ga.type = 'text / javascript'; ga.async = true; 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);}) ();

Palapala Kahiko Google Analytics kahiko

 try {
var pageTracker = _gat._getTracker("UA-XXXXXX-XX");
ʻaoʻaoTracker._setDomainName (". example.com");
ʻaoʻaoTracker._trackPageview (); } hopu (err) {}

ʻAʻole ʻoe i pau. Inā hana wale ʻoe i kēlā, holo ʻoe i ka pilikia o nā ala like e ana ʻia ma lalo o hoʻokahi URl ma Google. No laila - inā he index.php kāu ma kāu blog a me nā subdomain www, e ana ʻia lāua ʻelua ma ke ʻano he index.php. ʻAʻole maikaʻi kēlā. A ʻo kahi hopena, pono ʻoe e hana i kahi kānana holomua i ka moʻokāki.

ʻEʻe i Google Analytics a kaomi i ka hoʻoponopono ma kāu ʻikepili Google. E kaomi i ka ʻaoʻao kahi e hiki ai iā ʻoe ke hoʻohui i kahi kānana a hoʻohui i kahi kānana holomua me nā hoʻonohonoho aʻe:
Kānana kiʻekiʻe no nā subdomain ma Google Analytics

I kēia manawa pono e hoʻokaʻawale kāu ʻikepili i ka subdomain ma o ka Waihona Analytics.

13 Comments

  1. 1

    ʻAʻole hiki iā ʻoe ke hoʻohana i ka hiʻohiʻona subdomain hou ma GA? e hahai ana i kahi pūnaewele ma ke ʻano he subdomain o kahi TLD?

  2. 2
  3. 3

    ʻElua mau ʻanuʻu ka ʻāpana "paste the code" ma Google Analytics:

    1. He aha kāu e hahai nei?
    He kahua hoʻokahi (paʻamau)
    Domain: marketingtechblog.com

    Hoʻokahi kahua me nā subdomain he nui
    ano he kumu hoʻohālike:
    http://www.marketingtechblog.com
    apps.marketingtechblog.com
    store.marketingtechblog.com

    Nui nā kāʻei kapu kiʻekiʻe

    a laila he pahu pahu no Adwords Tracking

    Eia kekahi no ʻoe: no ke aha kaʻu polokalamu safari no PC e hōʻike ana i nā hiʻohiʻona google akā ʻaʻole hāʻawi iaʻu i kahi koho e nānā i nā mea hou (nā mea hou pūnaewele) a me nā mea like?

  4. 4
  5. 5
  6. 7
  7. 8

    Aloha Doug,

    Ua hoʻohui au i ka palapala i luna akā ʻaʻole ia e hana. ʻO kekahi mea aʻu i pahehe ai a ʻoukou i ʻike ai? 

    E kōkua nui inā hiki iā ʻoe ke lawe iaʻu i mua ma kēia. 

    Mahalo a aloha,
    Nishanth T

    • 9

      ʻElua mau mea, @google-1f23c56cd05959c64c268d8e9c84162e:disqus . ʻO ka mea mua (a maopopo loa) ʻo ia ka hōʻoia i ka hoʻonohonoho pono ʻana o kāu code UA. Makemake au e kākau i kēlā, akā i kekahi manawa mākou e kope a paʻi a poina. ʻO ka lua… he mau hola ka lōʻihi o ka hopu ʻana. Hāʻawi i kahi lā a laila e ʻike!

      • 10

        Hey @douglaskarr:disqus - Mahalo nui no ka pane. Mahalo nui loa- ua hoʻonohonoho pono ʻia ke code UA. Ua nānā hou aku. Ua ʻimi au iā ia me kēia code no hoʻokahi mahina i kēia manawa. ʻAʻole hōʻike ʻia nā microsites/sub-domains i ka GA. 

        Ke aloha…

  8. 11

    Mahalo! Kokua loa. Loaʻa iaʻu ka code hoʻokahi e hoʻokō nei i nā kikowaena like ʻole, e hilinaʻi ana inā hoʻohana ʻia ka http a i ʻole https (ʻo ka hapa nui e hoʻokaʻawale i nā kuki, no ka mea, loaʻa iaʻu nā ʻāpana hope ʻelua ʻē aʻe & makemake wau e pale i nā moʻokāki replay-style), akā ʻo ka javascript liʻiliʻi nā loli.

  9. 12

    Aloha ʻoe no kēia kumu aʻo he kōkua nui ia! No laila ke hoʻohui nei au i ke code i kaʻu mau subdomain a pau nā stats e hōʻike ana nā analytics e hoʻokomo i nā kaʻa mai kaʻu subdimains?

  10. 13

Pehea kou manaʻo?

Ke hoʻohana nei kēia pūnaewele i ka Akismet e ho'ēmi i ka spam. E aʻo pehea e hanaʻia ai kāuʻikeʻikepili.