Google Analytics 4 Events

文章推薦指數: 80 %
投票人數:10人

The coupon name/code associated with the item. Event-level and item-level coupon parameters are independent. currency, string, No, USD ... 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 Configuration Events Home Products GoogleAnalytics Measurement GoogleAnalytics4 Reference GoogleAnalytics4Events add_payment_info Thiseventsignifiesauserhassubmittedtheirpaymentinformation. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeevent. Event-levelanditem-levelcouponparametersare independent. payment_type string No CreditCard Thechosenmethodofpayment. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","add_payment_info",{ currency:"USD", value:7.77, coupon:"SUMMER_FUN", payment_type:"CreditCard", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); add_shipping_info Thiseventsignifiesauserhassubmittedtheirshippinginformation. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeevent. Event-levelanditem-levelcouponparametersare independent. shipping_tier string No Ground Theshippingtier(e.g.Ground,Air, Next-day)selectedfordeliveryofthepurchaseditem. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","add_shipping_info",{ currency:"USD", value:7.77, coupon:"SUMMER_FUN", shipping_tier:"Ground", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); add_to_cart Thiseventsignifiesthatanitemwasaddedtoacartforpurchase. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","add_to_cart",{ currency:"USD", value:7.77, items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); add_to_wishlist Theeventsignifiesthatanitemwasaddedtoawishlist.Usethiseventto identifypopulargiftitemsinyourapp. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","add_to_wishlist",{ currency:"USD", value:7.77, items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ], }); begin_checkout Thiseventsignifiesthatauserhasbegunacheckout. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeevent. Event-levelanditem-levelcouponparametersare independent. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","begin_checkout",{ currency:"USD", value:7.77, coupon:"SUMMER_FUN", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); earn_virtual_currency Thiseventmeasurestheawardingofvirtualcurrency.Logthisalongwith spend_virtual_currencytobetterunderstandyourvirtualeconomy. Parameters Name Type Required Examplevalue Description virtual_currency_name string No Gems Thenameofthevirtualcurrency. value number No 5 Thevalueofthevirtualcurrency. Example gtag("event","earn_virtual_currency",{ virtual_currency_name:"Gems", value:5 }); generate_lead Logthiseventwhenaleadhasbeengeneratedtounderstandtheefficacyofyour re-engagementcampaigns. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. Example gtag("event","generate_lead",{ currency:"USD", value:99.99 }); join_group Logthiseventwhenauserjoinsagroupsuchasaguild,team,orfamily.Use thiseventtoanalyzehowpopularcertaingroupsorsocialfeaturesare. Parameters Name Type Required Examplevalue Description group_id string No G_12345 TheIDofthegroup. Example gtag("event","join_group",{ group_id:"G_12345" }); level_end Thiseventsignifiesthataplayerhasreachedtheendofalevel. Parameters Name Type Required Examplevalue Description level_name string No Thejourneybegins... Thenameofthelevel. success boolean No true Settotrueifthelevelwascompletedsuccessfully. Example gtag("event","level_end",{ level_name:"Thejourneybegins...", success:true, }); level_start Thiseventsignifiesthataplayerhasstartedalevel. Parameters Name Type Required Examplevalue Description level_name string No Thejourneybegins... Thenameofthelevel. Example gtag("event","level_start",{ level_name:"Thejourneybegins..." }); level_up Thiseventsignifiesthataplayerhasleveledup.Useittogaugethelevel distributionofyouruserbaseandidentifylevelsthataredifficultto complete. Parameters Name Type Required Examplevalue Description level number No 5 Thelevelofthecharacter. character string No Player1 Thecharacterthatleveledup. Example gtag("event","level_up",{ level:5, character:"Player1" }); login Sendthiseventtosignifythatauserhasloggedin. Parameters Name Type Required Examplevalue Description method string No Google Themethodusedtologin. Example gtag("event","login",{ method:"Google" }); post_score Sendthiseventwhentheuserpostsascore.Usethiseventtounderstandhow usersareperforminginyourgameandcorrelatehighscoreswithaudiencesor behaviors. Parameters Name Type Required Examplevalue Description score number Yes 10000 Thescoretopost. level number No 5 Thelevelforthescore. character string No Player1 Thecharacterthatachievedthescore. Example gtag("event","post_score",{ score:10000, level:5, character:"Player1" }); purchase Thiseventsignifieswhenoneormoreitemsispurchasedbyauser. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. transaction_id string Yes T_12345 Theuniqueidentifierofatransaction. Thetransaction_idparameterhelpsyouavoidgettingduplicateeventsforapurchase. value number Yes* 12.21 Themonetaryvalueoftheevent. *valueisrequiredformeaningfulreportingandto populatethepurchaserspredictive audience. *currencyisrequiredifyousetvalue. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeevent. Event-levelanditem-levelcouponparametersare independent. shipping number No 3.33 Shippingcostassociatedwithatransaction. tax number No 1.11 Taxcostassociatedwithatransaction. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","purchase",{ transaction_id:"T_12345", affiliation:"GoogleMerchandiseStore", value:25.42, tax:4.90, shipping:5.99, currency:"USD", coupon:"SUMMER_SALE", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 }, { item_id:"SKU_12346", item_name:"GoogleGreyWomen'sTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:3.33, index:1, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"gray", location_id:"L_12345", price:20.99, promotion_id:"P_12345", promotion_name:"SummerSale", quantity:1 }] }); refund Thiseventsignifiesarefundwasissued. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. transaction_id string Yes T_12345 Theuniqueidentifierofatransaction. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeevent. Event-levelanditem-levelcouponparametersare independent. shipping number No 3.33 Shippingcostassociatedwithatransaction. tax number No 1.11 Taxcostassociatedwithatransaction. items Array No* Theitemsfortheevent. *itemsisrequiredforpartialrefundsbutitcanbe omittedforfullrefunds. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example Fullrefund gtag("event","refund",{ currency:"USD", transaction_id:"T_12345", value:12.21, affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", shipping:3.33, tax:1.11 }); Partialrefund gtag("event","refund",{ currency:"USD", transaction_id:"T_12345", value:12.21, affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", shipping:3.33, tax:1.11, items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); remove_from_cart Thiseventsignifiesthatanitemwasremovedfromacart. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","remove_from_cart",{ currency:"USD", value:7.77, items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); search Usethiseventtocontextualizesearchoperations.Thiseventcanhelpyou identifythemostpopularcontentinyourapp. Parameters Name Type Required Examplevalue Description search_term string Yes t-shirts Thetermthatwassearchedfor. Example gtag("event","search",{ search_term:"t-shirts" }); select_content Thiseventsignifiesthatauserhasselectedsomecontentofacertaintype. Thiseventcanhelpyouidentifypopularcontentandcategoriesofcontentin yourapp. Parameters Name Type Required Examplevalue Description content_type string No product Thetypeofselectedcontent. item_id string No I_12345 Anidentifierfortheitemthatwasselected. Example gtag("event","select_content",{ content_type:"product", item_id:"I_12345" }); select_item Thiseventsignifiesanitemwasselectedfromalist. Parameters Name Type Required Examplevalue Description item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ignoredifsetattheitem-level. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ignoredifsetattheitem-level. items Array Yes* Theitemsfortheevent. *Theitemsarrayisexpectedtohaveasingle element,representingtheselecteditem.Ifmultipleelementsare provided,onlythefirstelementinitemswillbeused. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","select_item",{ item_list_id:"related_products", item_list_name:"Relatedproducts", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); select_promotion Thiseventsignifiesanpromotionwasselectedfromalist. Parameters Name Type Required Examplevalue Description creative_name string No summer_banner2 Thenameofthepromotionalcreative. Ignoredifsetattheitem-level. creative_slot string No featured_app_1 Thenameofthepromotionalcreativeslotassociatedwiththe event. Ignoredifsetattheitem-level. location_id string No L_12345 TheIDofthelocation. Ignoredifsetattheitem-level. promotion_id string No P_12345 TheIDofthepromotionassociatedwiththeevent. Ignoredifsetattheitem-level. promotion_name string No SummerSale Thenameofthepromotionassociatedwiththeevent. Ignoredifsetattheitem-level. items Array No Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. creative_name string No summer_banner2 Thenameofthepromotionalcreative. Ifset,event-levelcreative_nameisignored. Ifnotset,event-levelcreative_nameisused,if present. creative_slot string No featured_app_1 Thenameofthepromotionalcreativeslotassociatedwiththe item. Ifset,event-levelcreative_slotisignored. Ifnotset,event-levelcreative_slotisused,if present. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. promotion_id string No P_12345 TheIDofthepromotionassociatedwiththeitem. Ifset,event-levelpromotion_idisignored. Ifnotset,event-levelpromotion_idisused,if present. promotion_name string No SummerSale Thenameofthepromotionassociatedwiththeitem. Ifset,event-levelpromotion_nameisignored. Ifnotset,event-levelpromotion_nameisused,if present. quantity number No 1 Itemquantity. Example gtag("event","select_promotion",{ creative_name:"SummerBanner", creative_slot:"featured_app_1", location_id:"L_12345", promotion_id:"P_12345", promotion_name:"SummerSale", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", creative_name:"summer_banner2", creative_slot:"featured_app_1", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, promotion_id:"P_12345", promotion_name:"SummerSale", quantity:1 } ], }); share Usethiseventwhenauserhassharedcontent. Parameters Name Type Required Examplevalue Description method string No Twitter Themethodinwhichthecontentisshared. content_type string No image Thetypeofsharedcontent. item_id string No C_12345 TheIDofthesharedcontent. Example gtag("event","share",{ method:"Twitter", content_type:"image", item_id:"C_12345", }); sign_up Thiseventindicatesthatauserhassignedupforanaccount.Usethiseventto understandthedifferentbehaviorsofloggedinandloggedoutusers. Parameters Name Type Required Examplevalue Description method string No Google Themethodusedforsignup. Example gtag("event","sign_up",{ method:"Google" }); spend_virtual_currency Thiseventmeasuresthesaleofvirtualgoodsinyourappandhelpsyouidentify whichvirtualgoodsarethemostpopular. Parameters Name Type Required Examplevalue Description value number Yes 5 Thevalueofthevirtualcurrency. virtual_currency_name string Yes Gems Thenameofthevirtualcurrency. item_name string No StarterBoost Thenameoftheitemthevirtualcurrencyisbeingusedfor. Example gtag("event","spend_virtual_currency",{ value:5, virtual_currency_name:"Gems", item_name:"StarterBoost" }); tutorial_begin Thiseventsignifiesthestartoftheon-boardingprocess.Usethisinafunnel withtutorial_completetounderstandhowmanyuserscompletethetutorial. Parameters Therearenoparametersforthisevent. Example gtag("event","tutorial_begin"); tutorial_complete Thiseventsignifiestheuser'scompletionofyouron-boardingprocess.Usethis inafunnelwithtutorial_begintounderstandhowmanyuserscompletethe tutorial. Parameters Noparametersaresuggestedforthisevent. Example gtag("event","tutorial_complete"); unlock_achievement Logthiseventwhentheuserhasunlockedanachievement.Thiseventcanhelp youunderstandhowusersareexperiencingyourgame. Parameters Name Type Required Examplevalue Description achievement_id string Yes A_12345 Theidoftheachievementthatwasunlocked. Example gtag("event","unlock_achievement",{ achievement_id:"A_12345" }); view_cart Thiseventsignifiesthatauserviewedtheircart. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","view_cart",{ currency:"USD", value:7.77, items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); view_item Thiseventsignifiesthatsomecontentwasshowntotheuser.Usethiseventto discoverthemostpopularitemsviewed. Parameters Name Type Required Examplevalue Description currency string Yes* USD Currencyoftheitemsassociatedwiththeevent,in 3-letter ISO4217format. Ifset,item-levelcurrencyisignored. Ifnotset,currencyfromthefirstiteminitemsisused. *Ifyousetvaluethencurrencyisrequired forrevenuemetricstobecomputedaccurately. value number Yes* 7.77 Themonetaryvalueoftheevent. *valueistypicallyrequiredformeaningfulreporting. Ifyoumark theeventasaconversionthenit'srecommendedyouset value. *currencyisrequiredifyousetvalue. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","view_item",{ currency:"USD", value:7.77, items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); view_item_list Logthiseventwhentheuserhasbeenpresentedwithalistofitemsofa certaincategory. Parameters Name Type Required Examplevalue Description item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ignoredifsetattheitem-level. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ignoredifsetattheitem-level. items Array Yes Theitemsfortheevent. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. quantity number No 1 Itemquantity. Example gtag("event","view_item_list",{ item_list_id:"related_products", item_list_name:"Relatedproducts", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, quantity:1 } ] }); view_promotion Thiseventsignifiesanpromotionwasviewedfromalist. Parameters Name Type Required Examplevalue Description creative_name string No summer_banner2 Thenameofthepromotionalcreative. Ignoredifsetattheitem-level. creative_slot string No featured_app_1 Thenameofthepromotionalcreativeslotassociatedwiththe event. Ignoredifsetattheitem-level. location_id string No L_12345 TheIDofthelocation. Ignoredifsetattheitem-level. promotion_id string No P_12345 TheIDofthepromotionassociatedwiththeevent. Ignoredifsetattheitem-level. promotion_name string No SummerSale Thenameofthepromotionassociatedwiththeevent. Ignoredifsetattheitem-level. items Array Yes* Theitemsfortheevent. *Theitemsarrayisexpectedtohaveasingle element,representingtheitemassociatedwiththepromotion.Ifmultiple elementsareprovided,onlythefirstelementinitemswill beused. Itemparameters Name Type Required Examplevalue Description item_id string Yes* SKU_12345 TheIDoftheitem. *Oneofitem_idoritem_nameisrequired. item_name string Yes* StanandFriendsTee Thenameoftheitem. *Oneofitem_idoritem_nameisrequired. affiliation string No GoogleStore Aproductaffiliationtodesignateasupplyingcompanyorbrickand mortarstorelocation. Event-levelanditem-levelaffiliationparametersare independent. coupon string No SUMMER_FUN Thecouponname/codeassociatedwiththeitem. Event-levelanditem-levelcouponparametersare independent. currency string No USD Thecurrency,in 3-letterISO4217format. Ifset,event-levelcurrencyisignored. Multiplecurrenciespereventisnotsupported.Eachitemshouldset thesamecurrency. creative_name string No summer_banner2 Thenameofthepromotionalcreative. Ifset,event-levelcreative_nameisignored. Ifnotset,event-levelcreative_nameisused,if present. creative_slot string No featured_app_1 Thenameofthepromotionalcreativeslotassociatedwiththe item. Ifset,event-levelcreative_slotisignored. Ifnotset,event-levelcreative_slotisused,if present. discount number No 2.22 Themonetarydiscountvalueassociatedwiththeitem. index number No 5 Theindex/positionoftheiteminalist. item_brand string No Google Thebrandoftheitem. item_category string No Apparel Thecategoryoftheitem.Ifusedaspartofacategoryhierarchyor taxonomythenthiswillbethefirstcategory. item_category2 string No Adult Thesecondcategoryhierarchyoradditionaltaxonomyfortheitem. item_category3 string No Shirts Thethirdcategoryhierarchyoradditionaltaxonomyfortheitem. item_category4 string No Crew Thefourthcategoryhierarchyoradditionaltaxonomyfortheitem. item_category5 string No Shortsleeve Thefifthcategoryhierarchyoradditionaltaxonomyfortheitem. item_list_id string No related_products TheIDofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_idisignored. Ifnotset,event-levelitem_list_idisused,if present. item_list_name string No Relatedproducts Thenameofthelistinwhichtheitemwaspresentedtotheuser. Ifset,event-levelitem_list_nameisignored. Ifnotset,event-levelitem_list_nameisused,if present. item_variant string No green Theitemvariantoruniquecodeordescriptionforadditionalitem details/options. location_id string No L_12345 Thelocationassociatedwiththeitem.It'srecommendedtousethe Google PlaceIDthatcorrespondstotheassociateditem.Acustomlocation IDcanalsobeused. Ifset,event-levellocation_idisignored. Ifnotset,event-levellocation_idisused,if present. price number No 9.99 Themonetarypriceoftheitem,inunitsofthespecifiedcurrency parameter. promotion_id string No P_12345 TheIDofthepromotionassociatedwiththeitem. Ifset,event-levelpromotion_idisignored. Ifnotset,event-levelpromotion_idisused,if present. promotion_name string No SummerSale Thenameofthepromotionassociatedwiththeitem. Ifset,event-levelpromotion_nameisignored. Ifnotset,event-levelpromotion_nameisused,if present. quantity number No 1 Itemquantity. Example gtag("event","view_promotion",{ creative_name:"SummerBanner", creative_slot:"featured_app_1", location_id:"L_12345", promotion_id:"P_12345", promotion_name:"SummerSale", items:[ { item_id:"SKU_12345", item_name:"StanandFriendsTee", affiliation:"GoogleMerchandiseStore", coupon:"SUMMER_FUN", creative_name:"summer_banner2", creative_slot:"featured_app_1", currency:"USD", discount:2.22, index:0, item_brand:"Google", item_category:"Apparel", item_category2:"Adult", item_category3:"Shirts", item_category4:"Crew", item_category5:"Shortsleeve", item_list_id:"related_products", item_list_name:"RelatedProducts", item_variant:"green", location_id:"L_12345", price:9.99, promotion_id:"P_12345", promotion_name:"SummerSale", quantity:1 } ] }); Exceptasotherwisenoted,thecontentofthispageislicensedundertheCreativeCommonsAttribution4.0License,andcodesamplesarelicensedundertheApache2.0License.Fordetails,seetheGoogleDevelopersSitePolicies.JavaisaregisteredtrademarkofOracleand/oritsaffiliates. Lastupdated2022-04-11UTC. [{ "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 Русский 中文–简体 日本語 한국어



請為這篇文章評分?