Maitiro Ekumisikidza Google Analytics Tsika Mapoka neGoogle Tag Manager

kugutsikana mapoka

Mune chinyorwa chakapfuura, ini ndakagovana maitiro ekushandisa Google Tag Manager uye Universal Analytics. Icho chinhu chekutanga chakakosha kungoita kuti uburuke pasi, asi Google Tag Manager chishandiso chinoshamisira (uye chakaomarara) chishandiso chinogona kushandiswa kune dzakawanda nzira dzakasiyana.

Ndichiri kuona kuti kumwe kusimudzira kunogona kudzikisira kumwe kunetseka kwekuitwa uku, ini ndakasarudza kuenda manyore nemapulagini, akasiyana, anokonzeresa uye ma tag. Kana iwe uine nzira dziri nani dzekushandisa zano iri pasina kodhi - neese nzira kuigovana mune zvakataurwa!

Imwe yemaitiro aya kugona kuzadza vanhu Zvemukati Mapoka muUniversal Analytics uchishandisa Google Analytics. Chinyorwa ichi chichava musanganiswa we rant, matambudziko ekuziva, uye nhanho-nhanho nongedzo mukunyatso kuisikidza Zvemukati Mapoka DuracellTomi's Google Tag Manager plugin yeWordPress, Google Tag Manager uye Google Analytics.

Google Tag Manager Rant

Kune chishandiso chakaoma kunzwisisa kudaro, zvinyorwa zvekutsigira zveGoogle zvinonyatsosveta. Ini handisi kungogunun'una chete, ndiri kutaura chokwadi. Ose mavhidhiyo avo, senge ari pamusoro, aya mavhidhiyo anopenya uye ane mavara pane izvo zvinogona kuitwa pasina zvachose nhanho nhanho mavhidhiyo, pasina screenshots muzvinyorwa zvavo, uye chete epamusoro ruzivo ruzivo. Chokwadi, izvo zvinosanganisira zvese zvasarudzo uye kushanduka zvaunazvo asi iwe hauna kana ruzivo rwekuchishandisa.

Mushure memakumi matatu shanduro dzekuisa ma tag angu, gumi nemaviri edhisheni mukati meGoogle Analytics, uye masvondo mashoma achipfuura pakati pekuchinja kuyedza… Ndakaona chiitiko ichi chinosemesa. Aya mapuratifomu maviri anofanirwa kushanda zvisina mushe asi zvechokwadi anenge asina kubatanidzwa kwakagadzirwa chero kunze kwenzvimbo dzinoverengeka kuti utange.

Google Zvemukati Zvemapoka Rant

Nepo kuiswa nekumaka kwave kuripo kwemakumi emakore, haungauwane mune kugona kweKugadzirira Boka. Zvichida ini ndinoburitsa chinyorwa chakadai chinosanganisira akawanda mapoka, gumi nemaviri kana akadaro ma tag, screenshots, uye vhidhiyo. Hazvingashamisi kucheka uye kunyorera iro ruzivo uchishandisa Google Analytics? Zvakanaka, rombo rakanaka, nekuti kugona kwako kugadzira zvinyorwa zvemukati zvinorambidzwa. Iko hakuna nzira dzekupfuudza akateedzana ezvikamu, mamaki, kana hunhu kuGoogle Analytics. Iwe unonamira nezvakangoita zvishanu zvinyorwa zvinyorwa zvakaganhurirwa kune imwechete kusiyanisa imwe neimwe.

Nekuda kweizvozvo, ini ndakagadzira yangu Yemukati Kuboka nenzira inotevera:

  1. Zvemukati Musoro - Saka kuti ndikwanise kutarisa zvinyorwa zvakaita sekuti "sei" uye zvimwe zvinowanzo kunzi zvinyorwa.
  2. Zvemukati Chikamu - Kuti ndikwanise kutarisa chikamu chekutanga uye ndione kukudzwa kwechikamu chimwe nechimwe uye kuti zvirimo zviri kuita sei mukati.
  3. Zvemukati Munyori - Saka kuti ndigone kuona vedu vanyori vanyori uye ndione kuti ndeapi ari kutyaira kubatikana uye shanduko.
  4. Rudzi rweMukati - Kuti ndikwanise kutarisa infographics, podcast, uye mavhidhiyo kuti ndione kuti izvo zvemukati zvinoita sei tichienzanisa nemamwe mhando zvemukati.

Zvimwe zvese zvekudzidzisa zvinoenderana nekuti iwe watove kusaina kuGoogle Tag Manager.

Nhanho 1: Kumisikidza Google Analytics Zvemukati Kuboka

Haufanire kunge uine chero data rinouya kuGoogle Analytics kuitira kuti ugadzire yako Yemukati Boka. Mukati meGoogle Analytics, enda kune manejimendi uye iwe uchaona Zvemukati Kuboka pane izvo zvinyorwa:

zvemukati-mapoka-admin

Mukati meKugadzirira Kuumbwa, iwe unozoda wedzera yega yega yezvinyorwa zvemukati:

Wedzera Zviri Mukati Mapoka

Cherekedza miseve miviri! Kuti uzviponese kubva pakubvarura bvudzi rako kana yako data isiri kuratidza muGoogle Analytics, nyatso chenjera mukutarisa-kaviri slot inowirirana nenhamba yako yenhamba. Nei izvi zviri kunyange sarudzo iri kupfuura ini.

Izvo zvakapedziswa zvemukati zvekumisikidza zvinyorwa zvinofanirwa kuoneka seizvi (kana iwe ukabaya rongedza… nekuti nekuda kwechimwe chikonzero Google Analytics inoda kutitambudza isu vanokanganisa vanoshandisa vanoshamisika kuti nei vasina kutomisikidzwa muhuwandu hwehuwandu. Ah… uye kana izvo zvisiri kutambudza zvakakwana, haugone kudzima boka remukati. Unogona kungoriremadza.)

zvemukati-kuronga-runyorwa

Wee… rinotaridzika zvakanaka. Basa redu raitwa muGoogle Analytics! Mhando ye… isu tichafanirwa kuyedza nekutumira imwe data gare gare iyo yatinogona kuongorora.

Nhanho 2: Kumisikidza Iyo DuracellTomi's WordPress Plugin yeGoogle Tag Manager

Tevere kumusoro, isu tinofanirwa kutanga kutsikisa dhata iyo Google Tag Manager inogona kutora, kuongorora, uye kumutsa Google Analytics kodhi kuburikidza. Izvi zvinogona kuve chiito chaive chisiri chevamwe vanoshamisa veWordPress vanogadzira kunze uko. Isu tinoda sarudzo dziripo kuburikidza DuracellTomi's WordPress plugin. Inotarisirwa zvakanaka uye inotsigirwa.

Bata ID yako yeGoogle Tag Manager kubva kune yako Yekushandira muGoogle Tag Manager woiisa mumazita epurogini> Google Tag Manager ID munda.

google-tag-maneja-id

Ini ndaikurudzira kwazvo kuisa iyo plugin nekushandisa iyo tsika nzira kwaunoisa iyo script mune yako tema (kazhinji iyo header.php faira). Ukasadaro, zvinogona kukonzera imwe nyaya inozonyanyisa kupenga iwe ... iyo dataLayer iyo iyo plugin iri kutumira kuGoogle Tag Manager fanira inyorwe script isati yaiswa kuGoogle Tag Manager. Ini handinzwisise pfungwa dzakabatana ipapo, ingo ziva kuti iwe unenge uchidhonza vhudzi rako kunze uchishamisika kuti nei data risiri kutumirwa nemazvo pasina kuiswa uku.

google-tag-maneja-tsika

Nhanho inotevera ndeyekugadzirisa izvo dataLayers iwe yaunoda kupfuudzwa muGoogle Tag Manager. Mune ino kesi, ini ndiri kupasa iyo posvo mhando, zvikamu, mamaki, iyo posvo munyori zita, uye iyo posvo zita. Uchaona kuti dzimwe sarudzo zhinji dziripo, asi isu takatotsanangudza mapoka atiri kugadzirisa uye nei.

Google Tag Manager WordPress dhataLayer

Panguva ino, plugin yakaiswa uye Google Tag Manager yakatakurwa, asi iwe hauna chaizvo data rakapfuudzwa kuUniversal Analytics (zvakadaro). Kana iwe ukatarisa kunobva peji rako izvozvi, iwe uchaona dataLayers akaburitswa eGoogle Tag Manager, asi:

Code Kuona

Cherekedza kuti iyo dataLayer yakabatanidzwa mune yakakosha-kukosha mapara (KVPs). In Step 4 pazasi, tiri kuzokuratidza maitiro ekuzviongorora izvi usingatarise kodhi kodhi peji rako. Yeiyo DuracellTomi Plugin, makiyi ndeaya:

  • pejiTitle - Uyu ndiwo musoro wepeji.
  • pejiPostType - Izvi ndezvekuti kana iri posvo kana peji.
  • pejiPostType2 - Izvi ndezvekuti kana iri chete posvo, chikamu dura, kana peji.
  • pejiCategory - Aya ndiwo marongero ezvikamu zvakatumirwa mukati.
  • pejiAttribute - Aya ndiwo marongero emategi akatumirwa iwo positi.
  • pejiPostAuthor - Uyu ndiye munyori kana chinyorwa.

Chengeta izvi zvirinyore, isu tichazoda izvi gare gare apo isu tinonyora zvedu zvinokonzeresa.

Ndiri kufunga kuti une Google Analytics plugin yakatakurwa kana iwe wakanyura iyo analytics script tag mune yako theme iwe pachako. Nyora pasi yako Google Analytics ID (inoita kunge UA-XXXXX-XX), iwe unozoda izvo zvinotevera. Iwe uchazoda kubvisa iyo tag tag kana iyo plugin, wobva waisa Universal Analytics kuburikidza neGoogle Tag Manager.

Nhanho 3: Kumisikidza Up Google Tag Manager

Kana iwe uchivhunduka nezve kusave neGoogle Analytics yakaburitswa pane yako saiti panguva ino, ngatichingozviita izvo chaizvo nekukurumidza tisati taita chero shanduko. Paunopinda muGoogle Tag Manager, sarudza yako Workspace:

  1. sarudza Wedzera Tag
  2. sarudza Yenyika Dzese Analytics, tumidza zita rako kumusoro kuruboshwe uye nyora yako UA-XXXXX-XX id
  3. Zvino taurira tag iyo yekupisa ikozvino nekudzvanya paTriggering uye kusarudza ese mapeji.

Universal Analytics Wedzera Tag Google Tag Manager

  1. Hausati wapedza! Iye zvino unofanirwa kudzvanya Publish uye tag yako ichave mhenyu uye analytics icharemerwa!

Nhanho 4: Is Google Tag Manager Inoshanda Chaizvo?

Ah, uchamuda uyu. Google Tag Manager inouya nenzira yekuyedza mamaki ako kuti akubatsire kugadzirisa nekugadzirisa iwo. Pane menyu diki pane iyo Tsikisa sarudzo iwe yaunogona kudzvanya nayo - Preview.

Google Tag Manager Preview uye Debug

Zvino vhura iyo webhusaiti iwe yauri kushanda pairi nyowani tebhu uye uchaita zvemashiripiti kuona iyo Tag Manager info mune yepasi pani.

Google Tag Manager - Ongorora uye Kugadzirisa

Zvakanaka sei izvozvo? Kana tangotanga kupfuudza iyo Dhata Rekushandisa dhata tichishandisa Google Tag Manager, unogona kuona tag irikupfura, chii chisiri kupfura, uye chero data riri kupfuudzwa! Mune ino kesi, ndiyo iyo Tag yatakatumidza Yenyika Dzese Analytics. Kana isu tikabaya pane izvo, isu tinogona chaizvo kuona iyo Google Analytics tag ruzivo.

Nhanho 5: Kumisikidza Zvemukati Mapoka muGoogle Tag Manager

Woohoo, tave kutopedza! Zvakanaka, kwete chaizvo. Iri rinenge riri iro danho rinogona kunyatsokupa iwe nguva yakaoma. Sei? Nekuti kudzinga peji rekutarisa muUniversal Analytics neIri Content Grouping rinofanirwa kuitiswa muchiitiko chimwe chete. Zvine musoro, heino maitiro anofanira kuitika:

  1. Peji reWordPress rinokumbirwa.
  2. Iyo WordPress Plugin inoratidza iyo dataLayer.
  3. Google Tag Manager script inoita uye inopfuudza iyo dataLayer kubva kuWordPress kuenda kuGoogle Tag Manager.
  4. Google Tag Manager akasiyana anoonekwa mune dataLayer.
  5. Google Tag Manager zvinokonzeresa zvinoonekwa zvichibva pamusiyano.
  6. Google Tag Manager inopisa mamwe ma tag anoenderana nezvinokonzeresa.
  7. Chitai chakatarwa chinodzingwa icho chinosundira iro rakakodzera zvemukati kuronga data kuGoogle Analytics.

Saka… kana chinhu chekutanga chichiitika ndechekuti dataLayer yapfuudzwa kuGoogle Tag Manager, saka tinofanirwa kukwanisa kuverenga iwo makiyi-ekukosha mapara. Tinogona kuita izvi nekuona izvo zvakapatsanurwa zvakapfuudzwa.

Google Tag Manager Mushandisi-Anotsanangurwa akasiyana

Iyezvino iwe unofanirwa kuwedzera uye kutsanangura imwe neimwe yemisiyano yakapfuudzwa mu dataLayer:

  • pejiTitle - Chinyorwa Chezvinyorwa
  • pejiPostType - Rudzi rweMukati
  • pejiPostType2 - Zvemukati Rudzi (Ini ndinoda izvi ndichishandisa iyi sezvo iri yakanyanya kunanga)
  • pejiCategory - Zvemukati Chikamu
  • pejiAttribute - Zvemukati Matagi (unogona kuda kushandisa izvi nguva nenguva panzvimbo pezvikamu chete)
  • pejiPostAuthor - Zvemukati Munyori

Ita izvi nekunyora muData Rakagadzika Rakashandurwa Zita uye nekuchengetedza izvo zvinoshanduka:

Musiyano wekugadzirisa

Panguva ino, Google Tag Manager anoziva inonzwisisa kuverenga iyo dataLayer akasiyana. Zvingave zvakanaka kana tikangokwanisa kupfuudza iyi data kuGoogle Analytics, asi isu hatigone. Sei? Nekuti rondedzero yako yezvikamu kana ma tag inopfuura iyo hunhu miganho yakatarwa pane yega yega Zvemukati Mapoka anotenderwa muGoogle Analytics. Google Analytics (zvinosuruvarisa) haigone kugamuchira rondedzero. Saka tinozvikomberedza sei? Ugh… ichi ndicho chikamu chinoshungurudza.

Iwe uchafanirwa kunyora chinokanda icho chinotsvaga chako chikamu kana tag zita mukati meakarongeka tambo yakapfuudzwa mune dataLayer kusiyanisa. Tiri zvakanaka kupfuura zita, munyori, nyora sezvo vari ivo voga mameseji mazwi. Asi chikamu hachina saka isu tinofanirwa kuongorora yekutanga (yepuraimari) chikamu chakapasiswa mune yakarongeka. Iko kusarudzika, chokwadika, ndeyekuti kana ukasasarudza akawanda mapoka pane posvo… ipapo unogona kungobaya bhatani uye sarudza Zvemukati Chikamu.

Heino kutarisisa kwakatarisa pane yedu runyorwa rweTrigger:

Zvinokonzeresa neChikamu

Heino muenzaniso weimwe yeaya anokonzeresa echikamu chedu Chekushambadzira Kwemukati:

Mamwe Peji Kuona Zvinokonzeresa

Tine chirevo chenguva dzose pano chinoenderana neyekutanga (yepuraimari) chikamu chakapasiswa mune yakarongeka muDathaLayer, ipapo tinova nechokwadi chekuti ingori imwechete posvo.

Kana iwe uchinge uine nguva yakaoma kunyora zvinyorwa zvenguva dzose, iwe ungangoda kumira kungodhonza bvudzi rako isu uye kwira Fiverr. Ndakave nemhedzisiro inoshamisa kwazvo paFiverr - uye ini ndinowanzo bvunza chirevo pamwe nezvinyorwa pamaitirwo azvo.

Paunenge iwe uchinge waiswa seti yechikamu chimwe nechimwe, wagadzirira kuvaka yako tag runyorwa! Isu zano redu pano ndere kutanga kunyora kubata-kwese Universal Analytics tag (UA), asi haina kudzingwa pese panopihwa chero edu echikwata mateki. Rondedzero yakazadzikiswa inoita senge iyi:

Matagi muGoogle Tag Manager

Zvakanaka… ndizvozvo! Isu tave kuenda nekuunza ese mashiripiti pamwe neyedu tag. Mumuenzaniso uyu, ini ndiri kuzopasa iyo Zvemukati Mapoka yechero imwechete posvo yakarongedzwa neMukati Kushambadzira ("zvemukati"):

Chikamu Zvemukati Mapoka

Ipa zita rako tag, isa yako Google Analytics ID, wobva wawedzera Mamwe Maitiro. Mukati mechikamu ichocho, iwe unowana Zvemukati Mapoka kwauchazoda kuisa iyo Index nhamba chaizvo kuti wakanyora sei mairi Google Analytics Admin zvirongwa.

Hechino chimwe chinhu chimumumu… hurongwa inofanira kufanana iko kurongeka kweako maAnalytics Admin marongero eiyo data. Iyo system haina kungwara zvakakwana kuti itore iwo akakosha akasiyana eiyo chaiyo index index.

Sezvo chikamu chacho chisina kupfuudzwa (nekuda kwekunetseka kwakarongeka), uchafanirwa kutaipa muchikamu chako che Index 2. Zvisinei, kune mamwe mapoka matatu ezvinyorwa, unogona kungobaya bhokisi kurudyi uye sarudza musiyano izvo zvakanyatso kupfuudzwa mukati me dataLayer. Ipapo iwe unozofanirwa kusarudza iyo inokonzeresa uye chengetedza tag yako!

Dzokorora chimwe nechimwe chezvikamu zvako. Wobva waita chokwadi chekudzokera kuUA yako (bata-ese) tag uye wedzera zvakasarudzika kune yega yega yezvikamu zvako. Ongorora uye kugadzirisa dambudziko kuti uedze uye uone kuti urikupfura ma tag ako uye kutumira data kune izvo zvemukati zvikwata zvakanaka.

Iwe unofanirwa kukwanisa kuongorora zvese, asi iwe uchatofanira kumirira maawa mashoma kuti Google Analytics ibate. Nguva inotevera paunopinda mukati, iwe unozogona kushandisa Zvemukati Musoro, Zvemukati Chikamu, uye Zvemukati Munyori kucheka uye kunyorera data rako muGoogle Analytics!

3 Comments

  1. 1

    Hi Douglas,

    Thanks for taking time to put together this article. As a professional who spends a lot of his time working with Google Tag Manager and Google Analytics, I’d like to share some thoughts I have to the points you’ve raised.

    I think that there are a number of weaknesses with both tools; this reply is not going to focus on that. Rather, I’m going to address points in your article where I think you are correct, and other areas that I disagree agree with. I believe this type of dialogue is healthy within our professional sphere. I am NOT trying to troll.

    “For such an amazingly complex tool, Google support articles absolutely suck”

    I think you’re looking at the wrong documentation. With regards to the “high level” videos, yeah — you’re not going to get very far. Google’s documentation certainly did used to suck, but it is much better now.

    Since both GTM and GA are tools which require a fair amount of technical knowledge to implement correctly, I’d like to suggest that your readers turn to the developer guides for these products:

    https://support.google.com/tagmanager/
    https://developers.google.com/tag-manager/devguide

    Also, the internet has no shortage of easily accessible guides for doing basically whatever the heck you want with GTM. The best sources of knowledge are:

    https://www.simoahava.com/
    https://www.thyngster.com/
    http://www.lunametrics.com/blog/

    Basically, anything that I’d want to write myself about GTM has already be covered by those three.

    As far as I’m concerned, the A-Z documentation doesn’t need to come from Google. The community is so robust you can find any answer with little effort.

    “These are two platforms that should work seamlessly but truly have almost no productized integration whatsoever outside a couple of fields to prepopulate.”

    I think you are misunderstanding what GTM is. It works great with GA, much better than any other TMS. GTM is not only for deploying Google Analytics. That said, I would not deploy GA using any other tool.

    GTM’s Google Analytics tag is a graphical user interface for deploying code that many people would find difficult to manage.

    When it comes to content groups, it sounds a lot easier to me to fill in a little box in GTM with a variable than to write

    ga(‘set’, ‘contentGroup’, ”);

    and have the dynamic values of your fields populated by server-side logic that is more difficult to maintain than a data layer.

    “There are no means of passing an array of categories, tags, or characteristics to Google Analytics”

    While you are correct that Google Analytics records values for Content Groupings as strings, not arrays or objects, that is simply a technical terminology.

    You absolutely can pass an array of categories or tags to GA. Turn your array into a delimited string and you’re set.

    A simple custom javascript variable will turn your array into a string.

    function(){
    var pageCategory = {{dl – page – pageCategory}};
    return pageCategory.join(“|”);
    }

    See this article for examples of how to analyze that data: http://www.lunametrics.com/blog/2016/05/25/report-items-in-multiple-categories-in-google-analytics/

    Do you need to know some basic javascript to use GTM effectively? Definitely. Is that a short coming of the tool? Absolutely not. It’s a TMS. Of course you need to know javascript to use it.

    ” Oh… and if that’s not torture enough, you can’t ever delete a content grouping. You can only disable it.”

    INDEED. There really should be toggles to remove the field from reports.

    “the dataLayer that the plugin is sending to Google Tag Manager must be written before the script is loaded for Google Tag Manager”

    This is a problem with the plugin. The author of the plugin is initializing the dataLayer incorrectly and not using an “event” which is GTM’s internal messaging bus. Don’t pull out your hair, though. It’s not worth it.

    Jumping to step 5 (other steps seem on target)

    “Because your array of categories or tags will surpass the character limits set on each Content Grouping allowed in Google Analytics. Google Analytics (sadly) can not accept an array. So how do we get around it? Ugh… this is the frustrating part.”

    This is not an issue of character limits for GA. You just need to change your array to a string, which is the expected value in GA’s API. A dimension describes thing. So a string (word) is what is expected.

    “Once you have a trigger set for each category, you’re ready to build your tag list!”

    Noooooo! 🙂 Don’t go down that path. Use a delimited value and you save yourself tons of headache.

    “Here’s another dumb thing… the order must match the order of your Analytics Admin settings for the data. The system isn’t intelligent enough to grab the right variables for the proper index number.”

    I don’t believe that is true. As long as your index is a number, the value for the index will populate your tag with the correct value.

    The main positive takeaway I have from your article is that your readers are exposed to a critical way to “slice and dice” data in GA. That is of huge importance and there are free plugins for WordPress that will allow them to do so.

    In terms of managing their data collection in a more sophisticated manner, it’s a really a function of IT to provide the proper data to marketing which has business value. The challenge that tool like GTM has introduced into the market (because of its huge adoption) is that marketers don’t think that they need to rely on IT to collect data. They do. Case in point –> The GA API requires a string for Custom Dimension fields. If you don’t transpose an array into a string, you’ll end up creating an absurd number of tags. That’s not an elegant solution, or even required.

    I hope that my feedback on your article is received well. I am not trying to troll. Rather, I am trying to add my experience with tools that you are discussing to broaden the conversation in a professional and constructive way.

    Best,

    Joshua

    • 2

      Yehoshua, are you kidding? That’s not trolling… that’s AMAZING feedback. Absolutely love the feedback and expertise you’re sharing with our audience.

      Note: I did have the indexes set correctly on the data passed for Content Groups but it did NOT work when it was not in the correct order.

      Thanks zvakare!

  2. 3

Unofungei?

Nzvimbo iyi inoshandisa Akismet kuderedza spam. Dzidza kuti sei deta yako inoshandiswa.