Faʻamama Subdomains i Google Analytics

ga

Faʻatasi ai ma polokalama e pei o se tautua (SaaS) faʻatau atu tagata fiafia Aofaʻiga, oe faʻatuina se subdomain ma talimalo lau blog i luga o se isi subdomain nai lo lau '' upega tafaʻilagi. Masani lava, o lenei e faʻatinoina i blog.domain.com ma www.domain.com. Masani kamupani faʻaogaina se matua eseʻese tala i Google Analytics e mataʻituina le blog subdomain. E matua le manaʻomia.

Google Analytics o le a faʻatagaina oe e mataitu le tele o subdomains i totonu o le tasi talaʻaga. Ina ia faia lenei mea, oe na ona faʻaopopo se laina o tulafono i lau taimi nei Google Analytics tusitusiga:

Fou Google Analytics Script

	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.getE ElementByTagName ('script') [0]; s.parentNode.insertBefore (ga, s);}) ();

Tusitusiga tuai a Google Analytics

 try {
var pageTracker = _gat._getTracker("UA-XXXXXX-XX");
itulauTracker._setDomainName (". example.com");
itulauTracker._trackPageview (); } puʻe (sese) {}

E te leʻi maeʻa! Afai e na o lou faia o lena, oe tamoʻe i le lomiga o auala tutusa e fuaina i lalo o le tasi URl i Google. Ma - afai e i ai lau index.php i luga o lau blog ma www subdomains, o le a fuaina uma i latou o index.php. E le lelei lena O lona iʻuga, e tatau ona e faia ni siʻitia alualu i luma o le faʻamamaina i le teuga tupe!

Alu i Google Analytics ma kiliki Faʻatonutonu luga o lau Google talaʻaga. Tusi i lalo le itulau e mafai ona e faʻaopopo ai se faamama ma faʻaopopo se faʻasologa alualu i luma ma tulaga nei:
Lisi faʻasolo mo Subdomains i Google Analytics

Lenei lau faʻamatalaga e tatau ona vaʻaia le subdomain i totonu o le Analytics Account.

13 Faamatalaga

  1. 1
  2. 2
  3. 3

    O le vaega "pasese le code" i luga o Google Analytics ua lua nei laasaga:

    1. O le a le mea o lo'o e tulituliloaina?
    Se vaega e tasi (fa'aoga)
    Vaega: marketingtechblog.com

    Tasi le itu e iai le tele o subdomains
    faataitaiga:
    http://www.marketingtechblog.com
    apps.marketingtechblog.com
    store.marketingtechblog.com

    E tele vaega pito i luga

    ona sosoo ai lea ma se pusa siaki mo Adwords Tracking

    Ole tasi lenei mo oe: aisea ua fa'aalia ai e la'u su'esu'ega safari mo le PC le leai o se google foliga ae le tu'uina mai ia te a'u se filifiliga e siaki Fa'afouga (fa'afou fa'aagafesootai) ma mea faapena?

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

    Talofa Doug,

    Na ou faʻaopoopoina le faʻamatalaga o loʻo i luga ae e foliga mai e le o aoga. E i ai se mea na ou se'e ua outou iloa? 

    O le a fesoasoani tele pe a mafai ona e ave aʻu i luma i lenei mea. 

    Faʻafetai ma Faʻafetai,
    Nishanth T

    • 9

      O nai mea, @google-1f23c56cd05959c64c268d8e9c84162e:disqus . Muamua (ma sili ona manino) o le faʻamautinoa o loʻo faʻatulaga lelei lau code UA. Ou te le fiafia e tusi lena mea, ae o nisi taimi tatou te kopi ma faapipii ma galo. Lona lua… e tele itula e alu ai e maua ai. Tuu atu se aso ona vaai lea!

      • 10

        Hey @douglaskarr:disqus - Faafetai tele mo le tali. Fa'afetai tele- o le UA code ua fa'atulaga lelei. Toe siaki foi. Sa ou siakiina i lenei code mo le silia ma le masina i le taimi nei. Ole microsites/sub-domains e le fa'aalia ile GA. 

        Manuia…

  8. 11

    Fa'afetai! Fesoasoani tele. E i ai laʻu tulafono tutusa e faʻatinoina i vaega eseese, e faʻatatau i le http poʻo le https e faʻaaogaina (tele lava e vavae ese kuki, aua o loʻo ia te aʻu foʻi ni nai pusa pito i tua ma ou te manaʻo e aloese mai faʻamatalaga toe fai), ae o le javascript sa fai si laiti o suiga.

  9. 12

    Talofa faafetai mo lenei aʻoaʻoga sa fesoasoani tele! O le taimi lava ou te faʻaopoopoina ai le code i laʻu vaega pito i lalo o fuainumera ia o loʻo faʻaalia e auʻiliʻiliga e aofia ai fefaʻatauaiga mai aʻu subdimains?

  10. 13

O le'a sou manatu?

O lenei 'upega tafaʻilagi e faʻaaogaina le Akismet e faʻaitiitia le spam. Aoao pe faapefea ona faʻasoa lau faʻamatalaga faʻamatalaga.