Kirjutasin veel ühe postituse selle kohta, kuidas Google Analyticsiga WordPressis mitut autorit jälgida üks kord varem, kuid sain valesti aru! Väljaspool WordPress Loopi ei saa te autorinimesid hõivata, nii et kood ei töötanud.
Vabandan ebaõnnestumise eest.
Olen teinud mõned täiendavad kaevamised ja teada saanud, kuidas seda mitme Google Analyticsi profiiliga nutikamalt teha. (Päris ausalt - see on siis, kui sa armastad professionaali analytics paketid meeldivad Veebitrendid!)
1. samm: lisage profiil olemasolevale domeenile
Esimene samm on lisada praegusele domeenile täiendav profiil. See on valik, mida enamik inimesi ei tunne, kuid sobib suurepäraselt seda tüüpi stsenaariumide jaoks.
2. samm: lisage kaasamisfilter uue autori profiilile
Soovite mõõta ainult selles profiilis autorite jälgitud lehevaatamisi, seega lisage alamkataloogile filter / autor /. Üks märkus selle kohta - pidin operaatorina tegema “mis sisaldavad”. Google'i juhised nõuavad enne kausta ^. Tegelikult ei saa te väljale ^ kirjutada!
3. samm: lisage välistamisfilter oma peamisele profiilile
Te ei soovi kõiki originaalses profiilis olevaid autori täiendavaid lehevaatamisi jälgida, seega lisage alamkataloogi välistamiseks oma algsele profiilile filter / autor-autor /.
4. samm: lisage jaluse skripti aas
Lisage oma olemasolevas Google Analyticsi jälgimisruumis ja praeguse trackPageView rea alla jalusteemafaili järgmine silmus:
var authorTracker = _gat._getTracker ("UA-xxxxxxxx-x"); authorTracker._trackPageview ("/ autor-autor / ");
See haarab kogu teie jälgimise autori järgi teie domeeni teisele profiilile. Kui jätate selle jälgimise oma põhiprofiililt välja, ei lisa te täiendavaid tarbetuid lehevaatamisi. Pidage meeles, et kui teil on 6 postitusega avaleht, jälgite selle koodiga 6 lehevaatamist - üks iga postituse kohta, mida jälgib autor.
Autori jälgimine näeb selles konkreetses profiilis välja järgmine:
Kui olete selle teistmoodi saavutanud, olen avatud täiendavatele viisidele autori teabe jälgimiseks! Kuna minu Adsense'i tulud on seotud profiiliga, näen isegi, millised autorid teenivad kõige rohkem reklaamitulusid :).
Great post Doug! An alternative for tracking Authors at this level is with event tracking in GA. You can get a tally of how many times each of your authors’ posts were viewed, in the same profile as your regular data, without inflating pageviews. Also, you can use multiple dimensions in the Event reporting to see what sources were driving visitors to various authors (e.g. who is attracting the most readers via Twitter), where they are coming from, etc. I tried to post the script, but I was over the character limit. Here is the link: http://www.wheresitworking.com/2010/02/08/tracking-authors-in-wordpress-with-google-analytics-event-tracking/
Doug, you always seem to put up the right post at the right time, I’m going to implement this on our Indiana Insider blog (http://www.VisitIndiana.com/blog/) today!
Awesome, thanks for sharing this Doug! I’m finding that the_author() needs to be replaced with get_the_author() in order to prevent the author name being duplicated and outputted twice.
Also, how does your solution compare with Adam’s?
Doug, I tried to implement this, but it’s only tracking views of the actual author pages (…/author/AUTHORNAME), and not views of each post viewed, separated by author – any thoughts?
Hi Jeremy!
The way I implemented it was actually utilizing two different accounts within Google Analytics (separate UA codes). I call one account “Author” and the other one I keep as the entire site. Make sense?
Doug
Oh, two totally separate UA codes? I just set up a new profile under the blog UA code. I’ll give that one a shot and will let you know if it works for me.
Aitäh Doug!
Thanks very much. I’m trying this out now. One thing though, I removed “echo” out of the loop because it seemed to be duplicating the author name. For instance /by-author/Author NameAuthor Name was appearing with the echo.
Thanks for the tutorial. I need to track the pageviews each writer on a news blog accumulates in order to pay them by views.
Including the homepage doesn’t really work, though.
Can you just exclude code from the homepage? If that code was inserted only in the single-page layouts (an option on custom webpages), would that work? excluding homepage views from the count?
We’ve actually been using Context.ly for that and it’s working quite well.
How do you do step 1 please: “add an additional profile to your current domain”
You show how to complete the step, but not how to get there in the first place.
They sure don’t make it easy, to they Justin? Here’s an overview on the Google Analytics lehel.