How to Pull Ecommerce Data From Data Layer in GTM
文章推薦指數: 80 %
You can navigate to any of the product pages on your website and then click on the 'Datalayer Checker' extension to validate if the product ... Home About Testimonials Services GoogleAnalytics>MConsulting DigitalAnalyticsTraining Blog Books DigitalAnalyticsTraining Contact HowtoPullEcommerceDataFromDataLayerinGTM GoogleTagManager LastUpdated:January13,2022 TableofContentsforHowtoPullEcommerceDataFromDataLayerinGTM [show]PrerequisitesforpullingecommercedatafromthedatalayerUnderstandingtheecommercedatalayerFrequentlyaskedquestionsabouthowtopullecommercedatafromthedatalayerinGTM IfyouareusingGoogleTagManagerforimplementingenhancedecommercetrackingonyourwebsite,thedatalayeristhesinglesourceoftruththatdefinesyourwebsite-relateddata,ecommercedata,campaigndataanduserdataaswell. Prerequisitesforpullingecommercedatafromthedatalayer YoumusthaveanecommercewebsiteYouhavedeployeddatalayeronthewebsiteGoogleTagManagerisinstalledonyourwebsiteGoodknowledgeofHTML,DOMandJavaScriptGoodunderstandingofGTMvariablesandtriggersDatalayerCheckerChromeextensionisinstalledinyourbrowser Note:Ifyouarebrandnewtotheconceptofthedatalayer,thencheckoutthefollowingarticlefirst:GoogleTagManagerDataLayerTutorialwithExamples MyStep-By-StepBlueprint(100+Pages)ForLearningandMasteringGTMDataLayers GetTheOnlyEbookOnGTMDataLayerEverPublished(100+pages).Learn&MasterDataLayers YesIwanttheebook Understandingtheecommercedatalayer Duringanyecommerceeventslikeproductimpression,productclick,addtocart,checkout,andtransaction,thedatalayerisupdatedinthebackendusingthe‘datalayer.push()’method. Asampledatalayercodewhentheproductdetailvieweventhappenswilllooklikebelow: Youcannavigatetoanyoftheproductpagesonyourwebsiteandthenclickonthe‘DatalayerChecker’extensiontovalidateiftheproductdetailviewispushedtothedatalayer. Youshouldseethe‘productDetail’eventmarkedinayellowcircle.Thisisthesamedatalayervariable‘event’thatwehavedeclaredintheabovecode. Nowclickonthe‘productDetail’eventtoseetheexactdetailspassed. Asyoucanseeintheimageabove,thedatalayerispopulatedwithecommercedetails. FollowthestepsbelowtopullecommercedatafromthedatalayerinGTM Step-1:NavigatetoyourGTMcontainerandclickon‘Variables’ Step-2:Clickon‘New’under‘User-DefinedVariables’. Step-3:Selectthevariabletypeas‘DataLayerVariable’. Step-4:Nameyourvariableas“ProductName”andenter“product.name”inthe‘DataLayerVariableName’field. Step-5:SavethevariableandsimilarlycreateothervariablesProductID,ProductPrice,ProductCategory Step-6:PutyourGTMcontainerinpreviewmodeandvisittheproductpageagain. Step-7:Selectthe‘productDetail’eventfromthesummarytabavailableinthepreviewwindowandthenclickon‘Variable’. Step-8:Checkforthedatalayervariablesthatyouhavecreatedintheearliersteps. Youshouldseethatthevariablesarepopulatedwiththedatalayervalues. Congratulations!YouhavesuccessfullypulledecommercedatafromthedatalayerinGTM. Similarly,youcancreatecustomdatalayervariablesforotherecommercedataaswelllike,productquantity,shippingamount,transactionid,revenue,etc.YoucanusethesevariablestosenddatatoyourGoogleAnalyticstagsaswellasotherthirdpartytagslikeFacebook,Linkedin,etc. FrequentlyaskedquestionsabouthowtopullecommercedatafromthedatalayerinGTM WhydoweneedtopullecommercedatafromthedatalayerinGTM? Thedatalayeristhesinglesourceoftruththatdefinesyourwebsite-relateddata,ecommercedata,campaigndataanduserdataaswell. IfyouareusingGoogleTagManager,youcansendtheecommercedatafromthedatalayerinGTMandthenforwardittoanotheranalyticstoolsuchasGoogleAnalytics,Facebook,Linkedin,Twitter,etc. Whatisadatalayerpushandwhyisitneeded? “datalayer.push()”iscodethatallowsyoutoupdatedatastoredinthedatalayer.Let’ssupposeyouhaveanecommercewebsiteandwanttotrackecommercetransactions.Aseverytransactionidwillbeuniqueandwillbegeneratedonlywhentheusercompletesthepurchase. ThiskindofdatacannotbedirectlyaccessedfromGTM.Herethe“datalayer.push()”codeupdatesthedatalayerinreal-timeandthenonlythetransactionidwillbemadeavailableinGTMforfurtheruse. Canyouoverwritetheecommercedatalayervariables? Yes,youcan,bypushingavariableofthesamenameasanexistingvariable,butwithanewvaluetothedatalayer.Letussupposeyourexistingdatalayercontainsaproductquantityvariableanditscurrentvalueis4: Nowifuseraddsonemoreproducttocart,youcanusethepushmethod,liketheonebelow: ThevalueofproductQuantitydatalayervariablewouldbeoverwrittenanditsnewvaluewillbe5. RegisterfortheFREETRAINING... "HowtouseDigitalAnalyticstogeneratefloodsofnewSalesandCustomerswithoutspendingyearsfiguringeverythingoutonyourown." Here’swhatwe’regoingtocoverinthistraining… #1Whydigitalanalyticsisthekeytoonlinebusinesssuccess. #2Thenumber1reasonwhymostmarketersarenotabletoscaletheiradvertisingandmaximizesales. #3WhyGoogleandFacebookadsdon’tworkformostbusinesses&howtomakethemwork. #4Whyyouwon’tgetanycompetitiveadvantageinthemarketplacejustbyknowingGoogleAnalytics. #5Thenumber1reasonwhyconversionoptimizationisnotworkingforyourbusiness. #6HowtoadvertiseonanymarketingplatformforFREEwithanunlimitedbudget. #7Howtolearnandmasterdigitalanalyticsandconversionoptimizationinrecordtime. MybestsellingbooksonDigitalAnalyticsandConversionOptimization MathsandStatsforWebAnalyticsandConversionOptimization Thisexpertguidewillteachyouhowtoleveragetheknowledgeofmathsandstatisticsinordertoaccuratelyinterpretdataandtakeactions,whichcanquicklyimprovethebottom-lineofyouronlinebusiness. MastertheEssentialsofEmailMarketingAnalytics Thisbookfocusessolelyonthe‘analytics’thatpoweryouremailmarketingoptimizationprogramandwillhelpyoudramaticallyreduceyourcostperacquisitionandincreasemarketingROIbytrackingtheperformanceofthevariousKPIsandmetricsusedforemailmarketing. AttributionModellinginGoogleAnalyticsandBeyondSECONDEDITIONOUTNOW! Attributionmodellingistheprocessofdeterminingthemosteffectivemarketingchannelsforinvestment.Thisbookhasbeenwrittentohelpyouimplementattributionmodelling.Itwillteachyouhowtoleveragetheknowledgeofattributionmodellinginordertoallocatemarketingbudgetandunderstandbuyingbehaviour. AttributionModellinginGoogleAdsandFacebook ThisbookhasbeenwrittentohelpyouimplementattributionmodellinginGoogleAds(GoogleAdWords)andFacebook.Itwillteachyou,howtoleveragetheknowledgeofattributionmodellinginordertounderstandthecustomerpurchasingjourneyanddeterminethemosteffectivemarketingchannelsforinvestment. AbouttheAuthor HimanshuSharma Founder,OptimizeSmart.com Over15yearsofexperienceindigitalanalyticsandmarketing Authoroffourbest-sellingbooksondigitalanalyticsandconversionoptimization NominatedforDigitalAnalyticsAssociationAwardsforExcellence Runsoneofthemostpopularblogsintheworldondigitalanalytics Consultanttocountlesssmallandbigbusinessesoverthedecade error:Alert:Contentisprotected!! Weusecookiesonourwebsitetogiveyouthemostrelevantexperiencebyrememberingyourpreferencesandrepeatvisits.Byclicking“AllowCookies”,youconsenttotheuseofALLthecookies.However,youmayvisit"CookieSettings"toprovideacontrolledconsent.CookieSettingsAllowCookiesManageconsent Close PrivacyOverview Thiswebsiteusescookiestoimproveyourexperiencewhileyounavigatethroughthewebsite.Outofthese,thecookiesthatarecategorizedasnecessaryarestoredonyourbrowserastheyareessentialfortheworkingofbasicfunctionalitiesofthewebsite.Wealsousethird-partycookiesthathelpusanalyzeandunderstandhowyouusethiswebsite.Thesecookieswillbestoredinyourbrowseronlywithyourconsent.Youalsohavetheoptiontoopt-outofthesecookies.Butoptingoutofsomeofthesecookiesmayaffectyourbrowsingexperience. Necessary Necessary AlwaysEnabled Necessarycookiesareabsolutelyessentialforthewebsitetofunctionproperly.Thesecookiesensurebasicfunctionalitiesandsecurityfeaturesofthewebsite,anonymously. CookieDurationDescriptioncookielawinfo-checkbox-analytics11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookieisusedtostoretheuserconsentforthecookiesinthecategory"Analytics".cookielawinfo-checkbox-functional11monthsThecookieissetbyGDPRcookieconsenttorecordtheuserconsentforthecookiesinthecategory"Functional".cookielawinfo-checkbox-necessary11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookiesisusedtostoretheuserconsentforthecookiesinthecategory"Necessary".cookielawinfo-checkbox-others11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookieisusedtostoretheuserconsentforthecookiesinthecategory"Other.cookielawinfo-checkbox-performance11monthsThiscookieissetbyGDPRCookieConsentplugin.Thecookieisusedtostoretheuserconsentforthecookiesinthecategory"Performance".viewed_cookie_policy11monthsThecookieissetbytheGDPRCookieConsentpluginandisusedtostorewhetherornotuserhasconsentedtotheuseofcookies.Itdoesnotstoreanypersonaldata. Functional functional Functionalcookieshelptoperformcertainfunctionalitieslikesharingthecontentofthewebsiteonsocialmediaplatforms,collectfeedbacks,andotherthird-partyfeatures. Performance performance Performancecookiesareusedtounderstandandanalyzethekeyperformanceindexesofthewebsitewhichhelpsindeliveringabetteruserexperienceforthevisitors. Analytics analytics Analyticalcookiesareusedtounderstandhowvisitorsinteractwiththewebsite.Thesecookieshelpprovideinformationonmetricsthenumberofvisitors,bouncerate,trafficsource,etc. Advertisement advertisement Advertisementcookiesareusedtoprovidevisitorswithrelevantadsandmarketingcampaigns.Thesecookiestrackvisitorsacrosswebsitesandcollectinformationtoprovidecustomizedads. Others others Otheruncategorizedcookiesarethosethatarebeinganalyzedandhavenotbeenclassifiedintoacategoryasyet. Save&Accept
延伸文章資訊
- 1GTM Data Layer 資料層基礎介紹- Google Tag Manager - 數據酷
Datalayer Checker 是測試和檢查Data Layer 最簡單的方法, 打開插件就能夠查看當前頁面所有的Data Layer 變更紀錄;延續先前的範例,要取得文章作者 ...
- 2Datalayer Checker_2.3.15_chrome扩展插件下载安装 - 插件小屋
Sublimetrix 很高兴发布具有多项新功能和改进设计的Datalayer Checker 2! 新功能: - 平面和Json 视图 - 复制到剪贴板变量(快速GTM 变量映射)
- 3The Data Layer | Simo Ahava's blog
- 4How to get values from dataLayer object - Stack Overflow
- 5DataLayer Checker Chrome Extension - Air360 Help Center
Air360 Data Layer Checker lets you check DataLayer variables right from your browser. Easily trou...