Jedan google analytics kod za glavni domen i vise poddomena

Moze li mi neko pojasniti kako ovo da izvedem, da jedan te isti kod koristim na vise poddomena, ako moze neki primer.
Gledam tamo na google stranama, ali nisam siguran da mi je bas jasno.

Ono sto sam dodao u kodu je ovo sa domenom, srednji red:

 _gaq.push(['_setAccount', 'UA-xxxxxx-x']);
  _gaq.push(['_setDomainName', 'domen.com']);
  _gaq.push(['_trackPageview']);

Ja i koristim isti kod, ali mi je na stranici google analitike izaslo neko crveno obavestenje, pa bi sigurno trebalo napraviti neke izmene:

A significant portion of referral traffic to property domain.com is from the following hostnames, which may be self-referrals:

*subdomain.domain.com*

Self-referrals are referrals from pages within your own domains. Self-referrals can obscure the actual sources of traffic to which conversions and other engagement on your site should be attributed. As a result, your referral metrics could be inaccurate. Further, self-referrals could be indicative of improperly-configured cross-domain tagging. Your users could be generating a session per domain, which would artificially inflate session counts.

There are multiple different Analytics misconfigurations that can cause self-referrals. Users navigating from an untagged page on your site to a tagged page can appear as self-referrals. Users navigating from one subdomain on your site to another subdomain that uses a different cookie domain can appear as self-referrals. If you track multiple domains in one web property, users navigating across multiple domains on your site without linker parameters set up to transfer cookie information properly can appear as self-referrals.

To avoid self-referrals, ensure all pages on your site are correctly tagged with the Analytics tracking code, make sure that cross-domain tracking is configured correctly on all your pages, and check your cookie domain settings in your tracking code to be sure that all subdomains in a domain are using the same cookie domain.

Ma samo uzmi onaj isti kod i polijepi ga na poddomene i to je to :smiley:

Tako je bilo do sad, al eto sad dobih to neko crveno upozorenje, a posto je crveno, verovatno nesto nije dobro :smile: .
S tim sto sam sad ubacio u kodu ovo na domenu i pododmenim

_gaq.push([’_setDomainName’, ‘domen.com’]);

pa nisam siguran da li je to dovoljno, da mozda ne treba nesto na samoj stranici google analyitice nesto da se podesi.

Google Analytics (GA) tretira poddomen kao poseban sajt, zato i upozorenje. Self-referrals praktično znači da će ti poddomen slati istog posetioca na glavni domen kao novog (new session), što verujem da nećeš.

Rešenje nije tako komplikovano, ali i nije baš na jedan klik.
Prvo ti preporučujem da koristiš novi Universal Analytics kod. Na njemu ne moraš nikakvu izmenu da praviš. Uputstvo je za novi kod.

  1. Zalepi taj isti kod na sve stranice koje pratiš (domene i poddomene)
  2. Ako nisi, kreiraj default view za sve posete (admin -> desno view panel -> drop down Create new view). Dodeli samo naziv i vremensku zonu.
  3. Kao u prethodnom koraku kreiraj novi view za poddomen. Dodeli mu naziv npr “poddomen.domen.com” i izaberi istu vremensku zonu
  4. Selektuj view koji si poslednji kreirao (za poddomen) i kreiraj filter na njemu (filters -> new filter). Daj mu naziv, filter type izaberi custom, izaberi include, za Filter Field izaberi “Hostname” i pod Filter Pattern upiši “poddomen.domen.com” i snimi.
  5. Izađi iz svega i vrati se na admin panel. Pod property view ideš na Tracking info -> Referral Exclusion List -> Add Referral Exclusion i upiši poddomen.domen.com

Ovim poslednjim korakom rešavaš problem Self Referral saobraćaja sa poddomena. Takođe, imaćeš i idvojen pregled statistike za poddomen što je bolje rešenje.

1 Like

Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Profit Monkey