Measure ecommerce | Google Analytics 4 Properties
文章推薦指數: 80 %
Measure a purchase by sending a purchase event with one or more items defined with the relevant fields. For details on the parameters to send, see the Events ... Google Analytics Measurement GoogleAnalytics4 Language English BahasaIndonesia Deutsch Español Français Português–Brasil Русский 中文–简体 日本語 한국어 Signin Guides Reference Support Google Analytics Measurement GoogleAnalytics4 Guides Reference Support Overview IntroductiontoGoogleAnalytics4 Howto MeasureexceptionsMeasureviewsSenduserIDs Ecommerce MeasureecommerceSetupapurchaseevent Home Products GoogleAnalytics Measurement GoogleAnalytics4 Measureecommerce Youcansetupecommerceeventstocollectinformationabouttheshopping behaviorofyourusers.Theeventsenableyoutoquantifyyourmostpopular productsandseetheinfluenceofpromotionsandproductplacementonrevenue. Thisarticledescribeseachecommerceeventandwhentosetuptheevent.For astep-by-stepexampleofhowtosetupanecommerceevent,see Setupapurchaseevent. Globalsitetag TagManager Beforeyoubegin Recommendations Enabledebugmodesoyoucanseeeventsinrealtimeandmoreeasilytroubleshootissues Reviewthecustomdimensionandmetriclimitswhensendingcustomparameterswithecommerceevents Setcurrencywhensendingvalue(revenue)datatoensurerevenuemetricsarecalculatedcorrectly Seteachecommerceparameteryouhavedatafor,regardlessofwhethertheparameterisoptional Usethesampleecommercewebsitetoseeanexampleofhowtotagyourwebsite Implementation Atypicalecommerceimplementationmeasuresanyofthefollowingactions: Selectanitemfromalist Viewitemdetails Add/removeaproductfromashoppingcart Initiatethecheckoutprocess Makepurchasesorrefunds Applypromotions Attheheartoftheseactionsaretheproductsandservicesyousell.Youcanrepresentproductsandservicesasanarrayofitemsthatcanbeaddedtoecommerceevents.Thefollowingexampledemonstrateshowtocreatethecollectionofitemsthatarereferencedthroughoutthisguide.Theitemsarraycanincludeupto200elements. Selectanitemfromalist Whenauserispresentedwithalistofresults,sendaview_item_listeventincludinganitemsarrayparametercontainingthedisplayeditems.Fordetailsontheparameterstosend,seetheEventsreference. Onceauserselectsanitemfromthelist,sendtheselect_itemeventwiththeselectediteminanitemsarrayparameter.Fordetailsontheparameterstosend,seetheEventsreference. Viewitemdetails Tomeasurehowmanytimesitemdetailsareviewed,sendaview_itemeventwheneverauserviewsanitem’sdetailsscreen.Fordetailsontheparameterstosend,seetheEventsreference. Addorremoveanitemfromashoppingcart Measureanitembeingaddedtoashoppingcartbysendinganadd_to_carteventwiththerelevantitemsinanitemsarray.Fordetailsontheparameterstosend,seetheEventsreference. Youcanalsomeasurewhenanitemisaddedtoawishlistbysendinganadd_to_wishlisteventwiththerelevantitemsinanitemsarray.Fordetailsontheparameterstosend,seetheEventsreference. Whenausersubsequentlyviewsthecart,sendtheview_carteventwithallitemsinthecart.Fordetailsontheparameterstosend,seetheEventsreference. Tomeasurewhenauserremovesanitemfromacart,sendtheremove_from_cartevent.Fordetailsontheparameterstosend,seetheEventsreference. Initiatethecheckoutprocess Measurethefirststepinacheckoutprocessbysendingabegin_checkouteventwithoneormoreitemsdefinedwiththerelevantfields.Acouponcanalsobeaddedatthisstagetotheentireorderbyaddingittotheeventorappliedtoaparticularitembyaddingittospecificelementsintheitemsarray.Fordetailsontheparameterstosend,seetheEventsreference. Whenauserproceedstothenextstepinthecheckoutprocessandaddsshippinginformation,sendanadd_shipping_infoevent.Usetheparametershipping_tiertospecifytheuser’sdeliveryoption,suchas"Ground","Air",or"Next-day".Fordetailsontheparameterstosend,seetheEventsreference. Sendtheadd_payment_infoeventwhenausersubmitstheirpaymentinformation.Ifapplicable,includepayment_typewiththiseventforthechosenmethodofpayment.Fordetailsontheparameterstosend,seetheEventsreference. Makeapurchaseorissuearefund Measureapurchasebysendingapurchaseeventwithoneormoreitemsdefinedwiththerelevantfields.Fordetailsontheparameterstosend,seetheEventsreference. Note:Thepurchaseeventreplacesecommerce_purchaseandisdifferentfromthein_app_purchaseevent,whichisreportedautomatically. Measurerefundsbysendingarefundeventwiththerelevanttransaction_idspecifiedandoptionally(forpartialrefunds)oneormoreitemsdefinedwithitem_idandquantity.Fordetailsontheparameterstosend,seetheEventsreference. Note:Therefundeventreplacesecommerce_refund. Applypromotions Ecommerceincludessupportformeasuringimpressionsandclicksofinternalpromotions,suchasbannersdisplayedtopromoteasale. Promotionimpressionsaretypicallymeasuredwiththeinitialscreenviewbysendingtheview_promotioneventwithanitemsparametertospecifythepromoteditem.Fordetailsontheparameterstosend,seetheEventsreference. Toindicateauserclickedonapromotion,sendaselect_promotioneventwiththatitemasanitemparameter.Fordetailsontheparameterstosend,seetheEventsreference. Exceptasotherwisenoted,thecontentofthispageislicensedundertheCreativeCommonsAttribution4.0License,andcodesamplesarelicensedundertheApache2.0License.Fordetails,seetheGoogleDevelopersSitePolicies.JavaisaregisteredtrademarkofOracleand/oritsaffiliates. Lastupdated2022-07-15UTC. [{ "type":"thumb-down", "id":"missingTheInformationINeed", "label":"MissingtheinformationIneed" },{ "type":"thumb-down", "id":"tooComplicatedTooManySteps", "label":"Toocomplicated/toomanysteps" },{ "type":"thumb-down", "id":"outOfDate", "label":"Outofdate" },{ "type":"thumb-down", "id":"samplesCodeIssue", "label":"Samples/codeissue" },{ "type":"thumb-down", "id":"otherDown", "label":"Other" }] [{ "type":"thumb-up", "id":"easyToUnderstand", "label":"Easytounderstand" },{ "type":"thumb-up", "id":"solvedMyProblem", "label":"Solvedmyproblem" },{ "type":"thumb-up", "id":"otherUp", "label":"Other" }] GitHub TryGoogleAnalyticssamples StackOverflow Askquestionsusingthegoogle-analyticstag Twitter Follow@googleanalyticsonTwitter Videos ViewGoogleAnalyticsvideosonYouTube Connect Community&Updates GettingHelp ReportinganIssue ProductInfo Protocol/SDKPolicy BrandingPolicy Developerconsoles GoogleAPIConsole GoogleCloudPlatformConsole GooglePlayConsole FirebaseConsole ActionsonGoogleConsole CastSDKDeveloperConsole ChromeWebStoreDashboard Android Chrome Firebase GoogleCloudPlatform Allproducts Terms Privacy SignupfortheGoogleDevelopersnewsletter Subscribe Language English BahasaIndonesia Deutsch Español Français Português–Brasil Русский 中文–简体 日本語 한국어
延伸文章資訊
- 1Tracking shopping cart events | Voog website building platform
In order to also track purchase events in the shopping cart, ... You can check whether you're usi...
- 2Gtag Purchase Event Ignored On Google Analytics - ADocLib
- 3全域網站代碼和事件程式碼片段的技術詳情- Search Ads 360說明
Place this snippet on pages with events you're tracking. Creation date: 11/01/2017 --> <script> g...
- 4How to Measure Purchases With gtag.js From iFrame - Medium
Global site tag (gtag.js) - Google Analytics --> ... we use gtag with the 'purchase' event to sen...
- 5Google Analytics 4 實現電子商務事件设定
purchase:購買成功