Mokhoa oa ho kenya tšebetsong Lihlopha tsa Tloaelo tsa Google Analytics le Google Tag Manager

sehlopha sa litaba

Sehloohong se fetileng, ke arolelane Mokhoa oa ho kenya ts'ebetsong Google Tag Manager le Universal Analytics. Ke qalo ea mantlha ea ho u fothola, empa Google Tag Manager ke sesebelisoa se fetolehang habonolo (hape se rarahaneng) se ka sebelisoang bakeng sa maano a fapaneng a fapaneng.

Ha ke ntse ke hlokomela hore nts'etsopele e 'ngoe e ka fokotsa mathata a mang a ts'ebetsong ena, ke khethile ho tsamaea ka letsoho ka li-plugins, mefuta-futa, lisosa le li-tag. Haeba u na le mekhoa e metle ea ho kenya tšebetsong leano lena ntle le khoutu - ka mekhoa eohle o e arolelane litlatsong!

O mong oa maano ao ke bokhoni ba ho ba le baahi Sehlopha sa Likateng ho Universal Analytics ho sebelisoa Google Analytics. Sengoloa sena e tla ba motswako wa mathata, mathata a ho elelloa, le tataiso ea mehato le mehato ea ho kenya tšebetsong ka mokhoa o ikhethileng Sehlopha sa Liteng Phallo ea Google Tag Manager ea DuracellTomi bakeng sa WordPress, Google Tag Manager le Google Analytics.

Rant ea Google Tag Manager

Bakeng sa sesebelisoa se rarahaneng joalo ka mokhoa o makatsang, lingoloa tsa tšehetso ea Google li anya ka botlalo. Ha ke lle feela, ke bua 'nete. Livideo tsohle tsa bona, joalo ka e kaholimo, ke livideo tsena tse khanyang le tse mebala-bala ho se ka fihlelloang ntle le mohato ka mohato livideo, ho se na li-skrini lihloohong tsa bona, le tlhaiso-leseling e holimo feela. Ehlile, li tla kenyelletsa likhetho tsohle le ho tenyetseha tseo u nang le tsona empa ha u na lintlha tsa ho li sebelisa.

Ka mor'a liphetolelo tse 30 tsa ho tsamaisa li-tag tsa ka, liphetoho tse ngata ka har'a Litlhahlobo tsa Google, le libeke tse 'maloa tse fetang lipakeng tsa liphetoho ho leka… ke fumane boikoetliso bona bo nyahamisa haholo. Tsena ke liforomo tse peli tse lokelang ho sebetsa li sa sisinyehe empa kannete li se na kopanyo e hlahisitsoeng ka ntle ho libaka tse 'maloa tse lokelang ho etsoa pele.

Rant Google Grouping Rant

Le ha ho aroloa le ho tšoaea ho se ho fetile lilemo tse mashome a seng makae, u ke ke ua ho fumana ho bokhoni ba Sehlopha sa Liteng. Mohlomong ke phatlalatsa molaetsa o kang ona o kenyelletsang mekhahlelo e mengata, li-tag tse 5 kapa tse ling, li-screenshots le video. Na e ke ke ea ba ho makatsang ho sela le ho tšoaea tlhaiso-leseling eo u sebelisa Google Analytics? Lehlohonolo, hobane bokhoni ba hau ba ho hlahisa lihlopha tsa litaba bo thibetsoe. Ha ho na mekhoa ea ho fetisetsa mefuta e mengata, li-tag, kapa litšobotsi ho Google Analytics. U ntse u khomaretse likarolo tse XNUMX tsa mongolo tse nang le moelelo o le mong feela.

Ka lebaka leo, ke hlophisitse Sehlopha sa ka sa Khokahano ka tsela e latelang:

  1. Sehlooho sa Likateng - E le hore nka sheba lingoloa tse kang "how to's" le lingoloa tse ling tse tloahelehileng ho bitsoa.
  2. Sehlopha sa Likateng - E le hore nka sheba sehlopha sa mantlha mme ke bone hore na sehlopha ka seng se ratoa hakae le hore na litaba li sebetsa joang kahare.
  3. Sengoli sa Likateng - E le hore nka sheba bangoli ba rona ba baeti mme ke bone hore na ke bo-mang ba khannang boitlamo le liphetoho.
  4. Mofuta oa Litaba - E le hore nka sheba infographics, podcast, le livideo ho bona hore na litaba tseo li sebetsa joang ha li bapisoa le mefuta e meng ea litaba.

Tse ling tsa thupelo ena li ipapisitse le taba ea hore u se u ntse u le teng ingolisetse Google Tag Manager.

Mohato oa 1: Ho theha sehlopha sa litaba tsa Google Analytics

Ha ho hlokahale hore u be le data efe kapa efe e tlang ho Google Analytics molemong oa ho hloma sehlopha sa hau sa Khokahano. Ka hare ho Google Analytics, e-ea ho tsamaiso 'me u tla bona Sehlopha sa Boitsebiso lenaneng:

litaba tsa lihlopha-admin

Ka hare ho Sehlopha sa Likateng, o tla batla eketsa sehlopha ka seng sa litaba:

Kenya Sehlopha sa Likateng

Hlokomela metsu e 'meli! Ho itšireletsa hore u se ke ua hahola moriri ha data ea hau e sa hlahe ho Google Analytics, hlokomela hore o lekola habeli hore na li-slot li tsamaellana le nomoro ea hau ea index. Hobaneng ha ena e bile khetho e le hole le nna.

Lethathamo le felileng la lihlopha tse hlophisitsoeng li lokela ho hlaha ka tsela ena (ha o tobetsa mofuta o mong… hobane ka lebaka le itseng Google Analytics e rata ho re hlokofatsa basebelisi ba sa tsotelleng ba ipotsang hore na hobaneng ba se ba sa hlophisoe ka tatellano. u ke ke ua hlakola sehlopha sa litaba. O ka se thibela feela.)

lenane la lihlopha-lihlopha

Whew ... e shebahala hantle. Mosebetsi oa rona o entsoe ho Google Analytics! Mofuta oa… re tla tlameha ho leka le ho romella lintlha hamorao hore re li hlahlobe.

Mohato oa 2: Ho theha Plugin ea WordPress ea DuracellTomi bakeng sa Google Tag Manager

Ka mor'a moo, re hloka ho qala ho phatlalatsa lintlha tseo Google Tag Manager e ka li kenyang, tsa li sekaseka le ho li fa khoutu ea Google Analytics. Sena e ka ba mosebetsi o matla haholo e ne e se ka baetsi ba bang ba hlollang ba WordPress kantle ho moo. Re rata likhetho tse fumanehang ka Phallo ea WordPress ea DuracellTomi. E tsamaisoa hantle ebile e ts'ehelitsoe.

Tšoara ID ea Motsamaisi oa Lithepa tsa Google ho tsoa sebakeng sa hau sa Ts'ebetso ho Google Tag Manager 'me u se behe ka har'a li-plugins tse akaretsang> Sebaka sa ID sa Google Tag Manager

mookameli-tag-manager-id

Ke khothaletsa haholo ho kenya plugin ka ho sebelisa tloaelo ea tloaelo moo o kenyang sengoloa ka har'a sehlooho sa hau (hangata file ea header.php). Haeba u sa etse joalo, e ka baka bothata bo bong bo tla u hlantsha ka botlalo… dataLayer eo plugin e e romellang ho Motsamaisi oa Litheko tsa Google lokela ho ngoloa pele script e laeloa bakeng sa Google Tag Manager. Ha ke utloisise mohopolo o amehang moo, tseba feela hore u tla be u ntša moriri u ipotsa hore na hobaneng data e sa romelloe hantle ntle le ho beoa hona.

mookameli-tag-manager-tloaelo

Mohato o latelang ke ho hlophisa liLayLayers tseo u batlang ho li fetisetsoa ho Google Tag Manager. Maemong ana, ke fetisa mofuta oa poso, mekhahlelo, li-tag, lebitso la mongoli oa poso le sehlooho sa poso. U tla bona hore likhetho tse ling tse ngata lia fumaneha, empa re se re hlalositse lihlopha tseo re li hlophisang le hore hobaneng.

Datha ea Google Tag Manager ea WordPress

Mothating ona, plugin e kentsoe mme Google Tag Manager e laetsoe, empa ha u na data e fetiselitsoeng ho Universal Analytics (leha ho le joalo). Haeba u sheba mohloli oa leqephe la hau hona joale, u tla bona dataLayers e phatlalalitsoe bakeng sa Google Tag Manager, leha:

Khoutu ea Pono

Hlokomela hore dataLayer e kopantsoe le lipara tsa boleng ba bohlokoa (KVPs). Ka Bohato ba 4 ka tlase, re tla u bonts'a hore na u ka li netefatsa joang ntle le ho sheba mohloli oa khoutu ea leqephe la hau. Bakeng sa Plug ea DuracellTomi, linotlolo ke:

  • pageTitle - Ena ke sehlooho sa leqephe lena.
  • leqephePostType - Sena ke hore na ke poso kapa leqephe.
  • leqephePostType2 - Sena ke hore na ke poso e le 'ngoe, polokelo ea mekhahlelo, kapa leqephe.
  • leqepheCategory - Ena ke mefuta ea likarolo tseo poso e neng e arotsoe ka tsona.
  • leqepheAttribute - Ena ke lethathamo la li-tag tseo poso e neng e tšoaetsoe tsona.
  • leqephePostAuthor - Sena ke mongoli kapa poso.

Boloka tsena li le bonolo, re tla li hloka hamorao ha re ntse re ngola lisosa tsa rona.

Ke nahana hore u na le plugin ea Google Analytics e laetsoeng kapa u kentse file ea Analytics sengoloa sa sehlooho sa hau ka bouena. Ngola ID ea hau ea Litlhahlobo tsa Google (e shebahala joalo ka UA-XXXXX-XX), o tla e hloka ka mor'a moo. U tla batla ho tlosa tag ea script kapa plugin, ebe u kenya Universal Analytics ka Google Tag Manager.

Mohato oa 3: Ho theha Google Tag Manager

Haeba u tšohile hore ha ho na Google Analytics e hatisitsoeng sebakeng sa hau sa marang-rang hona joale, ha re e etse kapele pele re etsa liphetoho. Ha o kena ho Google Tag Manager, khetha Sebaka sa hau sa Sebaka:

  1. khetha Kenya Tag
  2. khetha Litlhahlobo tsa Bokahohle, bitsa tag ea hau ka holimo leqeleng ebe u kenya id ea hau ea UA-XXXXX-XX
  3. Joale bolella tag hore na u thunya neng hona joale ka ho tobetsa ho Triggering le ho khetha maqephe ohle.

Litlhahlobo tsa Bokahohle li Kenya Tag Tag Google Tag Manager

  1. Ha u e-so qete! Joale o tlameha ho tobetsa phatlalatsa 'me tag ea hau e tla phela mme Analytics e tla laeloa!

Mohato oa 4: Na Google Tag Manager e hlile ea sebetsa?

Oho, o tlo mo rata. Google Tag Manager e hlile e tla le mokhoa oa ho leka li-tag tsa hau ho u thusa ho li rarolla le ho li lokisa. Ho na le menyu e nyane ho khetho ea Publish eo u ka e tobetsang - Preview.

Ponelopele le Tlhatlhobo ea Molaoli oa Google

Joale bula webosaete eo u sebetsang ho eona ho tabo e ncha 'me u tla bona ka mohlolo leseli la Tag Manager ho phanele ea maoto:

Molaoli oa Google Tag - Preview le Debug

Ho pholile hakae? Hang ha re se re qalile ho fetisa litaba tsa Sehlopha sa Likateng re sebelisa Google Tag Manager, o tla bona hore na ke eng eo ho thunngoang ho eona, se sa thunyeng, le data efe kapa efe e fetisoang! Maemong ana, ke Tag eo re e rehileng Litlhahlobo tsa Bokahohle. Haeba re tobetsa ho seo, re ka sheba tlhaiso-leseling ea li-Google Analytics.

Mohato oa 5: Ho theha lihlopha tsa li-Content ho Google Tag Manager

Woohoo, re se re batla re qetile! Che, ha ho joalo. Ona e tla ba mohato o kanna oa u fa nako e thata. Hobane'ng? Hobane ho thunya ponelopele ea leqephe ho Universal Analytics le Sehlopha sa Litaba ho tlameha ho etsoa ketsahalong e le 'ngoe. Ka mokhoa o utloahalang, mona ke kamoo e tlamehang ho etsahala:

  1. Leqephe la WordPress le kopuoa.
  2. Plugin ea WordPress e bonts'a dataLayer.
  3. Sengoloa sa Google Tag Manager se hlahisa le ho fetisa dataLayer ho tloha WordPress ho ea Google Tag Manager.
  4. Liphetoho tsa Google Tag Manager li tsejoa ho dataLayer.
  5. Lisebelisoa tsa Google Tag Manager li khetholloa ho ipapisitsoe le mefuta.
  6. Google Tag Manager e chesa li-tag tse ikhethang ho latela lintho tse li bakileng.
  7. Ho lelekoa tag e itseng e sutumetsang litaba tse hlophisehileng tse hlophisitsoeng hantle ho Google Analytics.

Kahoo… haeba ntho ea pele e etsahalang ke hore dataLayer e fetiselitsoe ho Google Tag Manager, re tla tlameha ho tseba ho bala lihlopha tsa boleng ba bohlokoa. Re ka etsa sena ka ho khetholla mefuta e fetisitsoeng.

Liphetoho tse hlalositsoeng ke mosebelisi tsa Google Tag Manager

Joale o hloka ho eketsa le ho hlalosa e 'ngoe le e' ngoe ea mefuta e fetisitsoeng ho dataLayer:

  • pageTitle - Sehlooho sa Sehlooho
  • leqephePostType - Mofuta oa Boitsebiso
  • leqephePostType2 Mofuta oa Boitsebiso (Ke rata ho sebelisa ona kaha o totobetse haholo)
  • leqepheCategory - Sehlopha sa Likahare
  • leqepheAttribute - Litags tsa likahare (o kanna oa lakatsa ho sebelisa sena nako le nako ho fapana le mekhahlelo feela)
  • leqephePostAuthor - Sengoli sa Likateng

Etsa sena ka ho ngola ho Data Layer Variable Name le ho boloka se fapaneng:

Phetoho e fapaneng

Hona joale, Motsamaisi oa Litheko tsa Google oa tseba hore o utloisisa ho bala mefuta ea dataLayer. Ho ka ba monate haeba re ka fetisetsa data ena ho Google Analytics, empa re ke ke. Hobane'ng? Hobane sehlopha sa hau sa mekhahlelo kapa li-tag li tla feta meeli ea boits'oaro e behiloeng ho sehlopha ka seng sa litaba se lumelletsoeng ho Google Analytics Google Analytics (ka masoabi) ha e khone ho amohela sehlopha. Joale re ka e potoloha joang? Ugh… ena ke karolo e nyahamisang.

U tla tlameha ho ngola sesebelisoa se batlang sehlopha sa hau kapa lebitso la tag ka har'a mohala o hlophisitsoeng o fetisitsoeng mofuteng oa dataLayer. Re hantle ho fetisa sehlooho, sengoli, mofuta kaha ke mantsoe a se nang molekane. Empa sehlopha ha se joalo kahoo re hloka ho lekola sehlopha sa pele (sa mantlha) se fetisitsoeng ka bongata. Mokhelo, ehlile, ke haeba u sa khethe mekhahlelo e mengata ka poso… joale u ka tobetsa konopo ebe u khetha Sehlopha sa Boitsebiso.

Mona re shebile lenane la rona la lintho tse bakang mathata.

Lisosa tsa Sehlopha

Mona ke mohlala oa e 'ngoe ea lintho tse hlohlelletsang sehlopha sa rona sa Papatso ea Litaba:

Tse ling tsa Page View Triggers

Re na le polelo e tloaelehileng mona e lumellanang le sehlopha sa pele (sa mantlha) se fetisitsoeng ka bongata ho dataLayer, ebe re etsa bonnete ba hore ke poso e le 'ngoe.

Haeba u na le nako e thata ea ho ngola lipolelo tse tloaelehileng, u ka lakatsa ho emisa ho hula moriri oa hau 'me u tsoelepele Fiverr. Ke bile le liphetho tse ntle haholo ho Fiverr - mme hangata ke kopa polelo le litokomane tsa hore na e sebelitse joang.

Hang ha u se u e-na le sesebelisoa sa sehlopha ka seng, u se u itokiselitse ho theha lethathamo la hau la tag! Leano la rona mona ke ho qala ho ngola lintlha tse tšoasang tsa Universal Analytics tag (UA), empa ha e lelekoe neng kapa neng ha lethathamo la sehlopha sa rona le lelekoa. Lethathamo le tlatsitsoeng le bonahala le shebahala tjena:

Litags ho Google Tag Manager

Ho lokile… ke hona! Ha joale re tla tlisa boselamose bohle le tag ea rona. Mohlala ona, ke tlil'o fetisa file ea Sehlopha sa Likateng bakeng sa poso efe kapa efe e arotsoeng ka Phatlalatso ea Boitsebiso ("litaba"):

Sehlopha Lihlopha tsa Lihlahisoa

Bolela tag ea hau, kenya ID ea hau ea Litlhahlobo tsa Google, ebe u holisa Litlhophiso tse ling. Kahare ho karolo eo, o tla fumana Lihlopha tsa Lihlahisoa moo o tla batla ho kenya nomoro ea Index hantle hore na o e kentse joang Tsamaiso ea Google Analytics litlhophiso.

Ntho e 'ngoe ea semumu ke ena… taelo lokela ho tšoanang otara ya dipeakanyo tsa Tsamaiso ya Ditlhahlobo bakeng sa data. Sisteme ha e bohlale ka ho lekana ho nka mefuta e nepahetseng bakeng sa nomoro e nepahetseng ea index.

Kaha sehlopha ha se fetisoe (ka lebaka la bothata bo boholo), o tla tlameha ho thaepa sehlopheng sa hau bakeng sa Index 2. Leha ho le joalo, bakeng sa lihlopha tse ling tse 3 tsa litaba, o ka tobetsa lebokose ka ho le letona ebe o khetha mofuta o fapaneng. e fetisitsoe ka kotloloho kahare ho dataLayer. Ebe o hloka ho khetha sesebelisoa ebe o boloka tag ea hau!

Pheta bakeng sa sehlopha ka seng sa hau. Ebe u netefatsa hore u khutlela tag ea hau ea UA (catch-all) ebe u eketsa mekhelo bakeng sa sehlopha ka seng sa hau. Hlahloba le ho rarolla bothata ho leka le ho netefatsa hore o chesa li-tag tsa hau mme o romella data ho lihlopha tsa litaba hantle.

O lokela ho netefatsa tsohle, empa o ntse o tla tlameha ho emela lihora tse 'maloa hore Google Analytics e fihle. Nako e tlang ha u kena, u tla khona ho sebelisa Sehlooho sa Likateng, Sehlopha sa Likateng, 'me Sengoli sa Likateng ho sela le ho taka data ea hau ho Google 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.

    Molemo ka ho fetisisa,

    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.

      Ke leboha hape!

  2. 3

U nahana eng?

Sebaka sena se sebelisa Akismet ho fokotsa spam. Ithute kamoo litlhaloso tsa hau li hlahang kateng.