Yadda Ake Bin diddigin Tsarin Fom na Elementor a cikin Ayyukan Google Analytics ta amfani da JQuery

Yadda Ake Bin diddigin Tsarin Elementor a cikin Ayyukan Google Analytics

Na yi aiki a kan shafin yanar gizo na abokin ciniki na 'yan makonnin da suka gabata wanda ke da' yan rikitarwa. Suna amfani WordPress tare da hadewa zuwa ActiveCampaign don raya jagoranci da a Zapier hadewa zuwa Zendesk Sayar via Siffofin Elementor. Yana da babban tsari… yana fara kamfen na faɗuwa ga mutanen da ke buƙatar bayani da tura jagora ga wakilin tallace -tallace da ya dace lokacin da aka nema. Ina matukar burgewa da sassaucin fasalin Elementor da kallo da ji.

Mataki na ƙarshe shine samar da dashboard na nazari don abokin ciniki ta hanyar Google Analytics wanda ya ba su aikin watanni fiye da wata akan ƙaddamar da fom. Suna shigar da Google Tag Manager, don haka mun riga mun kama ma'amala ta e-commerce da aikin duba YouTube akan shafin.

Na yi ƙoƙari da yawa don amfani da DOM, abubuwan da ke faruwa, da abubuwan da ke faruwa a cikin Mai sarrafa Tag na Google don kama ƙaddamar da ƙaddamar da tsari ga Elementor amma ba ni da sa'a ko kaɗan. Na gwada ton na hanyoyi daban -daban don saka idanu kan shafin, kallon saƙo na nasara wanda zai tashi ta hanyar AJAX kuma ba ya aiki. Don haka… Siffar fitilar Elementor tare da GTM.

Rubutun yana amfani jQuery da Google Tag Manager don turawa Taron Google Analytics lokacin da aka yi nasarar ƙaddamar da fom ɗin. Tare da wasu ƙananan gyare -gyare da haɓaka haƙiƙa ɗaya, Ina da duk abin da nake buƙata. Ga lambar:

<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>

Yana da kyau sosai, yana kallo don nasarar ƙaddamarwa, sannan ya wuce Form a matsayin category, da sunan wuri a matsayin Action, kuma Musulunci a matsayin lakabin. Ta hanyar yin shirye -shiryen manufa, kawai kuna iya samun wannan lambar a cikin gindin kowane shafi don lura da ƙaddamar da fom. Don haka… yayin da kuke ƙarawa ko canza siffofin, ba lallai ne ku damu da sabunta rubutun ba ko ƙara shi zuwa wani shafi.

Shigar da Rubutun Ta Lambar Kwastomomin Elementor

Idan kun kasance hukuma, Ina ba da shawarar sosai haɓaka haɓaka mara iyaka da amfani da Elementor ga duk abokan cinikin ku. Dandali ne mai ƙarfi kuma adadin haɗin haɗin gwiwa yana ci gaba da hauhawa. Ku hada shi da Plugin kamar Siffar Sadarwa DB kuma za ku iya tattara duk bayanan da kuka gabatar.

Elementor Pro yana da babban zaɓi na sarrafa rubutun da aka gina a ciki. Ga yadda zaku iya shigar da lambar ku:

Lambar Kwastan Elementor

  • Nuna zuwa Elementor> Lambar Custom
  • Sanya lambar ku
  • Saita wurin, a wannan yanayin ƙarshen alamar jiki.
  • Saita fifiko idan kuna da rubutun sama da ɗaya da kuke son sakawa da saita tsarin su.

Ƙaddamar da Fom na Elementor ga Taron GA ta hanyar GTM

  • Danna sabuntawa
  • Za a nemi ku saita yanayin kuma kawai saita shi zuwa tsoffin duk shafuka.
  • Wartsake ajiyar ku kuma rubutun ku yana rayuwa!

Yi samfoti Haɗin Mai sarrafa Tag ɗin ku na Google

Google Tag Manager yana da kyakkyawan tsari don haɗawa zuwa misalin mai bincike kuma a zahiri yana gwada lambar ku don lura ko ana aika masu canji daidai. Wannan yana da mahimmanci saboda Google Analytics ba ainihin lokaci bane. Kuna iya gwadawa da gwadawa da gwadawa kuma da gaske kuna jin takaici cewa bayanan ba su bayyana a cikin Google Analytics idan ba ku gane hakan ba.

Ba zan ba da koyawa a nan kan yadda ake ba samfoti da gyara Manajan Google Tag… Zan ɗauka kun sani. Zan iya ƙaddamar da fom na akan shafin gwajin da na haɗa kuma in ga bayanan da aka tura zuwa bayanan GTM kamar yadda ake buƙata:

google tag manager data Layer

A wannan yanayin, rukunin ya kasance mai rikitarwa azaman Fom, manufa ita ce fom ɗin Tuntube Mu, kuma lakabin ƙaddamarwa ne.

A cikin Manajan Tag na Google Saita Canje -canjen Bayanai, Lamari, Mai jawo, da Tag

Mataki na ƙarshe akan wannan shine saita Manajan Google Tag don kama waɗancan masu canji kuma aika su zuwa Google Analytics Tag kafa don wani taron. Elad Levy yayi cikakken bayanin waɗannan matakan a cikin sauran post ɗin sa - Bin diddigin abubuwan da suka faru a cikin Manajan Tag na Google.

Da zarar an kafa waɗancan, za ku iya ganin abubuwan da suka faru a cikin Google Analytics!

Samu Elementor Pro

Bayyanawa: Ina amfani da hanyoyin haɗin kaina a cikin wannan labarin.

Me kuke tunani?

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.