Ungakulandelela Kanjani Ukuthunyelwa Kwamafomu Elementor ku-Google Analytics Events usebenzisa i-JQuery

Ungakulandelela Kanjani Ukuthunyelwa Kwamafomu Elementor Kumicimbi Ye-Google Analytics

Kade ngisebenza kusayithi leklayenti le-WordPress emasontweni ambalwa edlule elinobunzima obuningi. Bayasebenzisa WordPress ngokuhlanganiswa ukuze I-ActiveCampaign okondla okokuhola kanye a Zapier ukuhlanganiswa ku- Thengisa iZendesk nge Amafomu Elementor. Kuyindlela enhle… ukukhahlela imikhankaso yedriphu kubantu abacela imininingwane bese behola abahola ngokufanele uma bethengwa. Ngihlabeke umxhwele kakhulu ngokuguquguquka kwefomu lika-Elementor nokubukeka nokuzizwa.

Isinyathelo sokugcina bekuwukuhlinzeka ideshibhodi ye-analytics yeklayenti nge-Google Analytics ebanikeze ukusebenza kwenyanga nenyanga ekufakweni kwamafomu. Bane-Google Tag Manager efakiwe, ngakho-ke sesivele sithwebula ukuthengiselana nge-e-commerce nomsebenzi wokubuka we-YouTube kusayithi.

Ngenze imizamo eminingana yokusebenzisa i-DOM, izingqinamba, nemicimbi ngaphakathi kwe-Google Tag Manager ukubamba ukuthunyelwa kwefomu okuyimpumelelo kwe-Elementor kepha angibanga nenhlanhla nhlobo. Ngivivinye ithani lezindlela ezahlukahlukene zokuqapha ikhasi, ngibheka umlayezo wempumelelo ozovela nge-AJAX futhi bekungasebenzi nje. Ngakho-ke ... ngacwaninga ngathola isisombululo esihle kusuka ku-Tracking Chef, esibizwa Ukulandela ngomkhondo ifomu le-Bulletproof Elementor nge-GTM.

Iskripthi sisebenzisa jQuery kanye ne-Google Tag Manager ukuphusha i- Umcimbi we-Google Analytics lapho ifomu lihanjiswa ngempumelelo. Ngokuhlelwa okuthile okuncane nokuthuthukiswa okukodwa kwe-syntax, benginakho konke engikudingayo. Nayi ikhodi:

<script>
jQuery(document).ready(function($) {
    $(document).on('submit_success', function(evt) {
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
            'event': 'ga_event',
            'eventCategory': 'Form ',
            'eventAction': evt.target.name,
            'eventLabel': 'Submission'
        });
    });
});
</script>

Kuwubuhlakani obuhle, ubheke ukuthunyelwa okuphumelelayo, bese udlula Ifomu njengesigaba, i- igama lendawo okuyiwa kuyo Njengesenzo, futhi Ukwethulwa njengoba ilebula. Ngokwenza uhlelo oluqondiwe, ungavele ube nale khodi onyaweni wawo wonke amakhasi ukubona ukuhanjiswa kwefomu. Ngakho… njengoba ungeza noma uguqula amafomu, awudingi ukukhathazeka ngokubuyekeza iskripthi noma ukungeza kwelinye ikhasi.

Faka i-Script Via Elementor Custom Code

Uma uyinkampani, ngincoma kakhulu ukuthuthukiswa okungenamkhawulo nokusebenzisa i-Elementor kuwo wonke amaklayenti akho. Yipulatifomu eqinile futhi nenombolo yokuhlanganiswa kozakwethu iyaqhubeka nokukhuphuka. Yibhangise nge-Plugin efana Ifomu Lokuxhumana DB futhi ungaqoqa konke ukuthunyelwa kwefomu lakho.

I-Elementor Pro inenketho enkulu yokuphathwa kweskripthi eyakhelwe ngaphakathi. Nakhu ukuthi ungafaka kanjani ikhodi yakho:

Ikhodi yangokwezifiso ye-Elementor

  • Zulalela ku I-Elementor> Ikhodi Yokwezifiso
  • Qamba ikhodi yakho
  • Setha indawo, kulokhu ekugcineni ithegi yomzimba.
  • Setha okubalulekile uma unombhalo ongaphezu kowodwa ofuna ukuwufaka bese usetha ukuhleleka kwawo.

Ukuhanjiswa Kwefomu Elementor Kumcimbi WeGA nge-GTM

  • Chofoza buyekeza
  • Uzocelwa ukuthi usethe umbandela bese uvele uwusethele kokuzenzakalelayo kwawo wonke amakhasi.
  • Qala kabusha i-cache yakho bese iskripthi sakho sibukhoma!

Hlola kuqala Ukuhlanganiswa Kwakho Kwomphathi Wokumaka We-Google

Umphathi Wethegi yakwaGoogle unendlela enhle yokuxhuma kusimo sesiphequluli futhi empeleni uhlole ikhodi yakho ukubona ukuthi okuguqukayo kuthunyelwa kahle yini. Lokhu kubalulekile ngoba i-Google Analytics ayisona isikhathi sangempela. Ungahlola futhi uvivinye futhi uvivinye bese ukhungatheka ngempela ngokuthi idatha ayiveli ku-Google Analytics uma ungakwazanga lokhu.

Angizukuhlinzeka ngesifundo lapha sendlela yokwenza hlola kuqala bese ulungisa iphutha i-Google Tag Manager… Ngizocabanga ukuthi uyazi. Ngingahambisa ifomu lami ekhasini lami lokuhlola elixhunyiwe futhi ngibona idatha idonswa kwimininingwane ye-GTM njengoba kudingeka ukuthi ibe:

ungqimba lwedatha yomphathi we-google tag

Kulokhu, isigaba besinekhodi enzima njengeFomu, okubhekiswe kukho bekuyifomu Lokuxhumana Nathi, bese kuthi ilebula kuthunyelwe.

Ku-Google Tag Manager Setha okuguquguqukayo kwedatha, umcimbi, i-Trigger, ne-Tag

Isinyathelo sokugcina kulokhu ukusetha i-Google Tag Manager ukuthatha lezo zinto eziguqukayo bese uzithumela ku-Google Analytics Tag esethelwe umcimbi. U-Elad Levy uchaza lezi zinyathelo kokunye okuthunyelwe kwakhe - Ukulandela Umcimbi Okujwayelekile Kusiphathi Somaki seGoogle.

Uma lezo sezimisiwe, uzokwazi ukubona Imicimbi ku-Google Analytics!

Thola i-Elementor Pro

Ukudalulwa: Ngisebenzisa izixhumanisi zami ezihambisanayo kulo mbhalo.

6 Amazwana

  1. 1
  2. 3
  3. 5

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.