Lasoco Qoraaga WordPress Bogagga AMP ee Falanqaynta Google Iyadoo Lagu Darey PageFrog Plugin

Track Wordpress Author Amp Pages Google Analytics With Pagefrog Plugin







Isku Day Aaladdayada Si Loo Ciribtiro Dhibaatooyinka

Waxaad hormuud u tahay adduunka AMP iyo WordPress, laakiin si fudud u raadinta boggaga bogga kuma filna. Haa, Articles Instant Facebook & Google AMP Pages by PageFrog WordPress plugin ayaa kuu fududeynaya noloshaada, laakiin adigu ma tihid runti diyaar u ah inaad iska dhaafto cabbirada aad ujeceshahay ee gaarka ah ee Google Analytics maxaa yeelay shaqadu kuma dhisna? Waxaan u maleynayaa maahan!







Maqaalkan, waan ku tusi doonaa sida loo soo diro magaca qoraaga WordPress ee loo yaqaan 'Google Analytics' oo ah qaab cabbir leh iyadoo la adeegsanayo doorsoomayaasha AMP Analytics leh Articles Instant Facebook & Google AMP Pages by PageFrog plugin.



Si shaqadan loo sameeyo, waxaan u baahanahay inaan:



  • Samee Cabbir Qaas ah oo loo yaqaan 'qoraaga' Google Analytics
  • Tafatir koodhka boggaga PageFrog si loogu qoro magaca qoraaga boostada 'qoraha' Qaab-dhismeedka Gaarka ah ee qoraalka Google Analytics

Sida Loola Socdo Qoraaga WordPress Sida Cabbiraadda Khaaska ah ee Falanqaynta Google Iyadoo Loogu Jiro PageFrog AMP Plugin Ee WordPress

  1. Gal Google Analytics, tag qeybta ADMIN ee koontadaada, oo guji Cabirka Custom hoostiisa cinwaanka HANTI
    Qaybta Maamulka Falanqaynta Google ee Cabbirka Custom AMP
  2. Kudar cabir qaas ah oo loo yaqaan qoraaga oo taabo Abuur.
  3. Ka fiirso tusmada qoraha bogga Cabirka Caadiga ah. Taasi waa sida aan ugu sheegi doonno koodhka falanqaynta nooca cabbirka loo qoondeeyo qoraaga ku beddelashada. Xaaladdayda, qoraagu waa tixraaca 1.
  4. Fur feylka ku yaal/wp-content/plugins/pagefrog/public/partials/amp-google-analytics-template.phptifaftiraha aad jeceshahay. Ugu talagal ahaan, feylku wuxuu u egyahay sidan:
     { 'vars': { 'account': 'get_google_analytics_site_id() ?>' }, 'triggers': { 'trackPageview' : { 'on': 'visible', 'request': 'pageview' } } } 
  5. Soo qaado magaca qoraaga qoraaga WordPress una soo dir sidii AMP Analytics oo Ku-beddelan Google Analytics oo ah Qiyaasta Macaamiisha adigoo cusbooneysiinaya koodhka sidan oo kale:
     { 'requests': { 'pageviewWithCd1': '${pageview}&cd1=${cd1}' }, 'vars': { 'account': 'get_google_analytics_site_id() ?>' }, 'triggers': { 'trackPageviewWithCustom' : { 'on': 'visible', 'request': 'pageviewWithCd1', 'vars': { 'cd1': 'post_author the_author_meta( 'display_name', $author_id ) ?>' } } } } 

    Muhiim: Ku beddel Cd1 iyo cd1 adoo ku beddelaya cd (tusmada cabbirka qorahaaga), oo ka taxaddar xarfaha waaweyn.

  6. Xaqiiji magaca qoraaga in lagu daro HTML-kaaga adoo furaya kormeeraha Google Chrome isla markaana eegaya lambarka Google Analytics ee la gelinayo isla furitaanka ka dibsumad
  7. Hubi in lambarka AMP uu ansax yahay adoo furaya jaantuska JavaScript ee Google Chrome iyo booqashada boggaaga AMP# horumar = 1ku lifaaqan url. Haddii aad aragto 'AMP Ansaxinta Guul.', Waad fiicantahay inaad tagto.

Qoraha WordPress: Waa la aqoonsaday.

Hadda oo aad tahay gebi ahaanba AMPed maxaa yeelay waxaad la socotaa shaqsi kasta oo qoraa ah waxqabadka Google Analytics, ku hambalyee naftaada inaad ka mid tahay malaha laba ama saddex qof oo ka helay maqaalkan mid xiiso leh oo ku filan si dhab ah u akhriya. Anaga hadaan nahay hormoodka WordPress AMP waxaan ubaahanahay inaan isku dheganaano, waana ku faraxsanahay inaad halkaan ka heshay jawaabtii aad raadineysay. Ka tag faallo hoosta haddii ay shaqeysay. Ama haddii kale.

Waad ku mahadsantahay aqrinta iyo inta ugu fiican,
David P.