In the purchase journey the user can view the product details page. Add the following code on each product details page: gtag('event' ...
Home
About
Testimonials
Services
GoogleAnalytics>MConsulting
DigitalAnalyticsTraining
Blog
Books
DigitalAnalyticsTraining
Contact
gtagEnhancedEcommerce TrackinginGoogleAnalytics–Tutorial
EnhancedEcommerce
LastUpdated:May20,2022
TableofContentsforgtagEnhancedEcommerceTrackinginGoogleAnalytics
[show]CaveatEnhancedEcommerceshoppingactivitiesIntroductiontohitsandhittypeIntroductiontoGlobalSiteTag(gtag.js)#1Measuringinternalpromotion impressions#2Measuringclicksoninternalpromotion#3Measuringproductimpressions#4Measuringclickonaproductlinkintheproductlist(measuringproductclicks)#5Measuringproductdetailsview#6Measuringtheadditionofaproduct(s)toashoppingcart#7Measuring removalofaproduct(s)fromashoppingcart#8Measuringthefirst checkoutstep#9Measuringthesecondandsubsequent checkoutsteps#10Measuringthecheckoutoptions#11Measuringpurchase#12MeasuringrefundFollowthestepsbelowtoimplementenhancedecommercetrackingonyourwebsite:Step-1:UpgradeToUniversalAnalytics(optional)Step-2:AddtherequiredenhancedecommercetrackingcodeonvariouswebpagesStep-3:EnableenhancedecommerceandconfigureCheckoutstepsnameinyourGApropertyStep-4:Replacetheoldecommercetrackingcode withtheproductpurchasetrackingcodeOtherArticlesonEnhancedEcommerceTracking
ThisarticleisinconjunctionwiththearticleBeginnersGuide toEnhancedEcommerceTrackinginGoogleAnalytic whereIexplainedtheconceptofenhancedecommerceingreatdetailandalsoexplainedhowenhancedecommercetrackingisdifferentfromthetraditionalecommercetracking.
Ifyouhavenotalreadyreadthatarticle,thenIwouldstronglysuggestyoureadit,beforereadingthisadvancedarticleonthesametopic.
Caveat
ThisarticleexplainssettingupgtagenhancedecommercetrackinginGoogleAnalytics(forthegtag.jslibrary)
Ifyouareusingtheanalytics.jslibrarythenfollowthestepsmentionedinthisarticle:ImplementingEnhancedEcommerceTrackinginGoogleAnalytics(analytics.js)–Tutorial
Ihavesharedalotoftrackingcodethroughoutthisarticle.Thistrackingcodeisprettyclosetoactualtrackingcodeusedforimplementingenhancedecommercetrackingbutitisnotthecodewhichyoucansimplycopy-pastewithoutmodificationandthenexpectenhancedecommercetrackingtoautomaticallystartworkingonyourwebsite.
ThatisbecauseEnhancedecommercetrackingjustlikethetraditionalecommercetrackingcannotbeimplementedwithoutaddingaserversidescripttotheenhancedecommercetrackingcode.
Theobjectiveofthisarticleistoprovideaframeworkthroughwhichyouand/oryourdevelopercanimplementenhancedecommercetrackingonyourwebsite.
EnhancedEcommerceshoppingactivities
Whenwesetupenhancedecommercetracking,wetrackfollowing(butnotlimitedto)shoppingactivitiesonanecommercewebsite:
Viewingofaninternalpromotioncampaign(likeaninternalbanneronahomepage).Clickingontheinternalpromotioncampaign Viewingaproductontheproductlist.Clickingononeoftheproductlinksintheproductlist(toviewmoredetailsabouttheproduct).Viewingtheproductdetailspage.Addingaproducttotheshoppingcart. Removingaproductfromtheshoppingcart.Startingthecheckoutprocessandcompletingthevariousstepsintheprocess.Providingadditionalinformationduringcheckout(likeselectingapaymentorshippingmethod).Completingthecheckoutprocessbymakingapurchase.Askingforarefund.
MyStepByStepGuideToReadingBothStandardAndEnhancedE-CommerceReportsInGoogleAnalytics
LearnToReadBothStandardAndEnhancedE-CommerceReportsInGoogleAnalytics(104pages)
YesIwanttheebook
Introductiontohitsandhittype
InthecontextofGoogleAnalytics,ahitisuserinteractionwithyourwebsite/mobileapp.ThedatayousendtoaGoogleAnalyticsWebPropertyisalsoknownas‘hit’.
ThetypeofdatayousendtoaGoogleAnalyticswebpropertyisknownasHitType.Forexample,‘pageview’,‘event’,‘transactions’,‘item’etcareallhittypes.
IntroductiontoGlobalSiteTag(gtag.js)
Globalsitetagorgtag.jsisthenewJavaScriptlibraryfromGoogle.
Unlikega.jsoranalytics.js,thegtag.jsisnotstrictlyaGoogleAnalyticslibraryasitissupportingGoogleAdsConversiontrackingandwillsupporttrackingformanyotherGoogleproductsinthenearfuture.Sogtag.jsisnotreallythenextversionofanalytics.js
Atpresent,thereisanalytics.jslibrarywhichisusedtomeasureusers’interactionswithyourwebsiteandsendthemtoGoogleAnalyticsServer.Thenwehavegotgtm.jslibrarywhichisusedforGoogleTagManager. Thenwehavegotfirebase.jslibrarywhichisusedtomeasureusersinteractionswithyourmobileappsviaFirebase.Thenwehavegotconversion.jslibrarywhichisusedforGoogleAdsConversionTracking.
Thepurposeofgtag.jsistoreplacealloftheselibrarieswithonesinglelibraryandhencegtag.jsisbeingpromotedas‘onetagtorulethemall’.Inordertokeepthesizeofgtag.jssmall,thislibrarycallsotherlibrariesinternally.Forexample,gtag.jscallsanalytics.jsandconversions.jsinternally.
BelowistheexampleofglobalsitetagconfiguredforGoogleAnalyticsaswellasGoogleAds:
InsteadofhavingmultipletrackingcodesfortheGoogleproductswecannowmanagealltheeventsandpageviewdatausinggtag.js.
Toinstalltheglobalsitetag,copythefollowingcodeandpasteitimmediatelyafterthetagoneverypageofyoursite.ReplaceUA-XXXXwiththeIDofyourGoogleAnalyticspropertytowhichyouwanttosenddata:
Youneedonlyoneglobalsnippetperpage.
OncetheGlobalsitetagisplacedintheheadersectionofthewebsitewecanusethegtag()commandsanywhereonawebpagetosendeventsdataaswellasecommercedatatoGoogleAnalyticsandotherGoogleproductslikeGoogleAds,Campaignmanageretc.
#1Measuringinternalpromotion impressions
Internalpromotionsarethoseads(likeabannerad)whichtakeuserstootherpartsofyourwebsite.
Forexample,youmayrunabanneradonthehomepage,whichpromotesaparticularproductcategoryandwhenauserclicksonthebannerad,heisredirectedtotheproductcategorypage.
Theviewingofaninternalpromotioniscalledinternalpromotionimpression.
Soifauserviewedabanneradonthehomepagetwotimes,thenthenumberofinternalpromotionimpressionswouldbe2.
Followingisanexampleofatrackingcodewhichmeasurestheinternaladimpression:
gtag(‘event’,‘view_promotion’,{//promoFieldObjectstoresinternalpromotionimpressiondata“promotions”:[{“id”:“[ServerVariable]“,//internaladID–Required–Type:string–Example:‘homeBanner1’“name”:“[ServerVariable]“,//internalpromotioncampaignName–Type:string–Example:‘Springsale’“creative”:“[ServerVariable]”,//internaladname–Type:String–Example:‘SpringSalebanner1’“position”:“[ServerVariable]”//Positionoftheinternalad–Type:string–Example:‘hometopbanner’},]});
Thistrackingcodeisplacedonthewebpage,whereyouarerunningyourinternalpromotionadandwhoseimpressions(views)youwanttomeasure.
FollowingarethevariouspropertiesofpromoFieldObject:
id–AvalidinternalPromoadidlike“homeBanner1”,“Men’sCategoryBanner”.name–Avalidinternalpromotioncampaignnamelike“summersale”,“CyberMondaysale”.creative–Apromotioncreativedescriptionlike“Summersalecasualsbanner”position–wheretheinternalpromotionadispositionedlike‘categorypagetopbanner’.
[ServerVariable]–thesearetheserversidevariables.Youneedtoaskyourdevelopertowriteaserversidescriptwhichpopulatesthevariousfields(servervariables)ofthetrackingcodeabove,withtheactualdata.
Note:UseyourownpropertyID(insteadof‘UA-XXXX-YY’)inthetrackingcodeabove.
MyStep-By-StepBlueprint(100+Pages)ForLearningandMasteringGTMDataLayers
GetTheOnlyEbookOnGTMDataLayerEverPublished(100+pages).Learn&MasterDataLayers
YesIwanttheebook
#2Measuringclicksoninternalpromotion
Inapurchasejourney,ausermayclickonaninternalpromotioncampaign.
TiethefollowingfunctionviaaJavascripteventhandleronClicktomeasuretheclicksonaninternalpromotioncampaign(likeaninternalbanner):
gtag(‘event’,‘select_content’,{//promoFieldObjectstoresinternalpromotionimpressiondata“promotions”:[{“id”:“[ServerVariable]“,//internaladID–Required–Type:string–Example:‘homeBanner1’“name”:“[ServerVariable]“,//internalpromotioncampaignName–Type:string–Example:‘Springsale’“creative”:“[ServerVariable]”,//internaladname–Type:String–Example:‘SpringSalebanner1’“position”:‘[ServerVariable]‘//Positionoftheinternalad–Type:string–Example:‘hometopbanner’},]});
Thistrackingcodeisplacedonthewebpage,whereyouarerunningyourinternalpromotionadandwhoseclicksyouwanttomeasure.
#3Measuringproductimpressions
Inapurchasejourney,ausermayviewaproductintheproductlist(productcategorypageorinternalsearchresultpage).
Theviewingofaproductinaproductlistiscalledproductimpression.
Usethefollowingproductimpressiontrackingcodeonpageswhereyourproductsarelisted:
gtag(‘event’,‘view_item_list’,{//ImpressionFieldObjectstoresproductimpressiondata“items”:[{”id”:“[ServerVariable]”,//ProductID/SKU–Type:string“name”:“[ServerVariable]”,//Productname–Type:string”category”:“[ServerVariable]”,//NameoftheProductcategory.//Use/asadelimitertospecifyupto5levelsofhierarchy(e.g.Men/Shirts/T-Shirts)–Type:string“brand”:“[ServerVariable]”,//NameofProductbrand–Type:string“variant”:“[ServerVariable]”,//Variantoftheproductlike:colour,sizeetc–Type:string“list”:“[ServerVariable]”,//NameoftheProductlistlike“searchresults”–Type:string“position”:[ServerVariable]//Productpositioninalist.Forexample2–Type:numeric},{//ImpressionFieldObjectstoresproductimpressiondata”id”:“[ServerVariable]”,//ProductID/SKU–Type:string“name”:“[ServerVariable]”,//Productname–Type:string”category”:“[ServerVariable]”,//NameoftheProductcategory.//Use/asadelimitertospecifyupto5levelsofhierarchy(e.g.Men/Shirts/T-Shirts)–Type:string“brand”:“[ServerVariable]”,//NameofProductbrand–Type:string“variant”:“[ServerVariable]”,//Variantoftheproductlikecolour,sizeetc–Type:string“list”:“[ServerVariable]”,//NameoftheProductlistlike“searchresults”–Type:string“position”:[ServerVariable]//Productpositioninalist.Forexample2–Type:numeric}]});
Here,
ImpressionFieldObjectisaJavaScriptobjectwhichisusedtostoreproductimpressionanditlooksliketheonebelow:
{
//ImpressionFieldObjectstoresproductimpressiondata
‘id’:‘[ServerVariable]‘,//ProductID/SKU–Type:string
‘name’:‘[ServerVariable]‘,//Productname–Type:string
‘category’:‘[ServerVariable]‘,//NameoftheProductcategory.
//Use/asadelimitertospecifyupto5levelsofhierarchy(e.gMen/Shirts/T-Shirts)–Type:string
‘brand’:‘[ServerVariable]‘,//NameofProductbrand–Type:string
‘variant’:‘[ServerVariable]‘,//Variantoftheproductlike:color,sizeetc–Type:string
‘list’:‘[ServerVariable]‘,//NameoftheProductlistlike‘searchresults’–Type:string
‘position’:[ServerVariable]//Productpositioninalist.Forexample2–Type:numeric
}
Note:AnimpressionFieldObjectmusthaveanameoridvalue.Allothervaluesareoptional
FollowingarethepropertiesofimpressionFieldObject:
idnamecategorybrandvariantlistposition
Youneedtoaskyourdevelopertowriteaserversidescript(likePHP)whichloopthroughalltheproductsonapageandsendproductimpressiondataforeachofthem.Thescriptshouldautomaticallypopulatethevariousfields(servervariables)ofyourtrackingcodewiththeactualproductdata.
Note(1):Yourproductimpressiontrackingcodewouldlookquitedifferentoncetheserversidescripthasbeenaddedtoit.
Note(2):Donotsendinternalpromotionclickdataalongwithproductdatainasinglehit.Ifyouneedtosendinternalpromotionclickdatathensenditinaseparatehit.
#4Measuringclickonaproductlinkintheproductlist(measuringproductclicks)
Inthepurchasejourney,ausermayclickonaproductlink,intheproductlist,toviewmoredetailsabouttheproduct.
TiethefollowingfunctionviaaJavascripteventhandler‘onClick’tothelinksofalltheproductslistedonapage:
//Calledwhenalinktoaproductisclicked.functiononProductClick(){gtag(‘event’,‘select_content’,{//productFieldObjectstoresproductclickandotherdetails“content_type”:“product”,“items”:[{”id”:“[ServerVariable]”,//ProductID/SKU–Type:string”name”:“[ServerVariable]”,//Productname–Type:string”category”:“[ServerVariable]”,//Productcategory–Type:string”brand”:“[ServerVariable]”,//Productbrand–Type:string”variant”:“[ServerVariable]”,//Variantoftheproductlike:color,sizeetc–Type:string”position”:[ServerVariable]//Productpositioninalist–Type:numericExample:10}]});
Here,
productFieldObjectisaJavaScriptobjectwhichisusedtostoreallproductdata(otherthanproductimpressiondata).DataforthefollowingtypeofproductsarestoredinthisJavaScriptobject:
Individualproductsthatwereviewedinaproductlist(productProductswhosedetailpageswereviewedProductsaddedtotheshoppingcartProductsremovedfromtheshoppingcartProductsateachstep ofthe checkoutprocessProductsthatarepurchasedProductsthatarepartofarefund.
TheproductFieldObjectlooksliketheonebelow:
{
//productFieldObjectstoresproductclickandotherdetails“id”:“[ServerVariable]”,//ProductID/SKU–Type:string“name”:“[ServerVariable]”,//Productname–Type:string“category”:“[ServerVariable]”,//Productcategory–Type:string“brand”:“[ServerVariable]”,//Productbrand–Type:string“variant”:“[ServerVariable]”,//Variantoftheproductlike:color,sizeetc–Type:string“position”:[ServerVariable]//Productpositioninalist–Type:numericExample:10
}
FollowingarethepropertiesofproductFieldObject:
idnamecategorybrandvariantpricequantitycouponposition
Yourdeveloperwouldhavetowriteaserversidescriptwhichsendsproductclickdatawheneveraproductlinkisclickedinaproductlist.Thescriptshouldautomaticallypopulatethevariousfields(servervariables)ofyourtrackingcodewiththeactualproductdata.
The‘onProductClick‘functioncanbetiedviaonlineJavascripteventhandler‘onClick’liketheonebelow:
#5Measuringproductdetailsview
Inthepurchasejourneytheusercanviewtheproductdetailspage.
Add thefollowingcodeoneachproductdetailspage:
gtag(‘event’,‘view_item’,{“items”:[{//productFieldObjectstoresproductclickandotherdetails
”id”:“[ServerVariable]”,//ProductID/SKU–Type:string”name”:“[ServerVariable]”,//Productname–Type:string”category”:“[ServerVariable]”,//Productcategory–Type:string”brand”:“[ServerVariable]”,//Productbrand–Type:string”variant”:“[ServerVariable]”,//Variantoftheproductlikecolor,sizeetc–Type:string}]
Yourdeveloperwouldwriteascriptwhichpopulatesthevariousfields(servervariables)ofyourtrackingcodewiththeactualproductdata.
#6Measuringtheadditionofaproduct(s)toashoppingcart
Inthepurchasejourney,theusermaydecidetobuyaproduct.Sohecanaddtheproducttotheshoppingcart.
TiethefollowingfunctionviaaJavascripteventhandler‘onClick’totheshoppingcart‘add’buttononeachproductdetailpageandonthecheckoutpage:
gtag(‘event’,‘add_to_cart’,{//Calledwhenaproductisaddedtoashoppingcart.“items”:[{//productFieldObjectstoresproductclickandotherdetails“id”:“[ServerVariable]”,//ProductID/SKU–Type:string“name”:“[ServerVariable]”,//Productname–Type:string“category”:“[ServerVariable]”,//Productcategory–Type:string“brand”:“[ServerVariable]”,//Productbrand–Type:string“variant”:“[ServerVariable]”,//Variantoftheproductlikecolor,sizeetc–Type:string“price”:[ServerVariable],//Productprice–Type:numeric“quantity”:[ServerVariable],//Productquantity–Type:numeric}]});
Yourdeveloperwouldwriteascriptwhichpopulatesthevariousfields(servervariables)ofyourtrackingcodewiththeactualproductdata.The‘add_to_cart’functioncanbetiedviaonlineJavascripteventhandler‘onClick’liketheonebelow:
AddtoCart
#7Measuring removalofaproduct(s)fromashoppingcart
Inthepurchasejourney,theusermaydecidenottobuyacertainproduct.Sohecanremovetheproductfromhisshoppingcart.
TiethefollowingfunctionviatheJavascripteventhandler‘onClick’totheshoppingcart‘remove’buttononeachproductdetailpageandonthecheckoutpage:
gtag(‘event’,‘remove_from_cart’,{//Calledwhenaproductisremovedfromashoppingcart.“items”:[{//productFieldObjectstoresproductclickandotherdetails“id”:“[ServerVariable]”,//ProductID/SKU–Type:string”name”:“[ServerVariable]”,//Productname–Type:string”category”:“[ServerVariable]”,//Productcategory–Type:string”brand”:“[ServerVariable]”,//Productbrand–Type:string”variant”:“[ServerVariable]”,//Variantoftheproductlikecolor,sizeetc–Type:string“price”:[ServerVariable],//Productprice–Type:numeric“quantity”:[ServerVariable],//Productquantity–Type:numeric}]});
Yourdeveloperwouldwriteascriptwhichpopulatesthevariousfields(servervariables)ofyourtrackingcodewiththeactualproductdata. The‘remove_from_cart’functioncanbetiedviaonlineJavascripteventhandler‘onClick’liketheonebelow:
RemovefromCart
#8Measuringthefirst checkoutstep
Inthepurchasejourney,theusermaydecidetostartthecheckoutprocessandcompletethevariousstepsintheprocess.
Inordertomeasurethefirstcheckoutstep,settheactiontypeto‘checkout’and‘stepfield’tothestepnumber.Tiethefollowingfunctionviathe Javascripteventhandler‘onClick’tothe‘checkout’button:
/***Calledwhentheuserclicksonthe‘checkout’button*/functioncheckout(cart){for(vari=0;iCheckout
#9Measuringthesecondandsubsequent checkoutsteps
Tomeasureeachsubsequentcheckoutstep,sendacheckout_progresseventwiththecheckoutitems.Settheactiontypeto‘checkout_step’tothestepnumber.
Tomeasurethesecondstepofthecheckoutprocess:
gtag(‘event’,‘checkout_progress’,{“items”:[{“checkout_step”:“2”,
Similarly,
Tomeasurethethirdstepofthecheckoutprocess:
gtag(‘event’,‘checkout_progress’,{“items”:[{“checkout_step”:“3”,
TiethefollowingfunctionviatheJavascripteventhandler‘onClick’toeachbuttonwhichtakesausertothenextcheckoutstep:
/***Calledwhentheusermovestothenextcheckoutstep*/functioncheckout(cart){for(vari=0;iContinue
Note:Ifyourcheckoutprocesscontainsonlyasinglesteporifyouhavenotconfiguredenhancedecommercecheckoutfunnelsettingsinyourwebpropertythenmeasuringtheindividualcheckoutstepsisnotrequired.
#10Measuringthecheckoutoptions
Ifyouhavemeasuredacheckoutstepduringtheinitialpageviewbutadditionalinformationaboutthesamecheckoutstepbecomesavailableafterauserhasselectedanoption(likepaymentmethod)thenyouneedtotie thefollowingfunction viathe Javascripteventhandler‘onClick’tothe button(s)whichtakesausertothenextcheckoutstep:
gtag(‘event’,‘set_checkout_option’,{“checkout_step”:1,“checkout_option”:“shippingmethod”,});
Note:Noteverycheckoutprocessneedacheckoutoption.
#11Measuringpurchase
Inthepurchasejourney,theusercompletesthecheckoutprocessbymakingapurchase.
Inordertomeasuretransaction,usethefollowingtrackingcodeontheorderconfirmationpage:
gtag(‘event’,‘purchase’,{//actionFieldObjectstoresactiondata“id”:“[ServerVariable]”,//Transactionid–Type:string“affiliation”:“[ServerVariable]”,//Storename–Type:string“revenue”:“[ServerVariable]”,//TotalRevenue–Type:numeric“tax”:“[ServerVariable]”,//Tax–Type:numeric“shipping”:“[ServerVariable]”,//Shipping–Type:numeric“coupon”:“[ServerVariable]”//Order/Transactioncoupon–Type:string“items”:[{“id”:“[ServerVariable]”,“name”:“[ServerVariable]”,“list_name”:“[ServerVariable]”,“brand”:“[ServerVariable]”,“category”:“[ServerVariable]”,“variant”:“[ServerVariable]”,“list_position”:1,“quantity”:2,“price”:‘12.0’},});
#12Measuringrefund
Oncethepurchasejourneyisover,theusermayaskforarefund. Youcanprovideeitherafullrefundorpartialrefund.
Fullrefundmeansrefundingtheentireorder.
Whereaspartialrefundmeansrefundingapartoftheorderlikerefundingasingleproduct.
Inordertomeasuretheimpactofrefundonyourbusinessbottomline,youfirstneedtoimporttherefunddatatoyourGAproperty.
Youcanimportrefunddataeithermanuallyusingthe‘Dataimport’featureofGoogle AnalyticsorthroughManagementAPI.
Onceyouhaveuploadedrefunddatayoucanseeit,inyour‘SalesPerformance’report:
Note:Youcannotdeleteormodifyrefunddataonceithasbeenuploadedtoawebproperty.Sodoublecheckthevalidityoftherefunddatabeforeyouuploadit.
Tomeasureafullrefundusethefollowingtrackingcode:
gtag(‘event’,‘refund’,{“transaction_id”:“actionFeildObject”})
andprovidethetransactionIDintheactionFieldObject.
Tomeasureapartialrefundusethefollowingtrackingcode:
gtag(‘event’,‘refund’,{“transaction_id”:“79.18502354114992”,//Transactionid–Type:string–Requiredfield“value”:23.07,“currency”:“USD”,“tax”:1.24,“shipping”:0,“items”:[{“id”:“ProductID”,////ProductID/SKU–Type:string–requiredfield“name”:“ProductName”,“brand”:“ProductBrand”,“category”:“ProductCategory”,“variant”:“ProductVariant”,“quantity”:2,////Productquantity–Type:numeric–requiredfield“price”:‘2.0’},
Note:Therefundhitwillbesentonlywhenamatchingtransactionisfound.
Getthis70pagedetailedchecklistcontainingscreenshots,step-by-stepinstructionsandlinkstoarticles
DoyouwanttosetupGoogleAnalytics4(GA4)fastandcorrectly?
YesIwanttheebook
Followthestepsbelowtoimplementenhancedecommercetrackingonyourwebsite:
UpgradeToUniversalAnalytics(optional).Addtherequiredenhancedecommercetrackingcodeonvariouswebpages.EnableenhancedecommerceandconfigureCheckoutstepsnameinyourGAproperty.Replacetheoldecommercetrackingcodewiththeproductpurchasetrackingcode.
Step-1:UpgradeToUniversalAnalytics(optional)
ThisstepisrequiredonlywhenyouarestillusingtheclassicGoogleAnalytics(ga.js).TheupgradeisrequiredbecauseclassicGoogleAnalyticsdoesnotsupportenhancedecommercetracking.Readthisarticlefortheupgrade: UniversalAnalyticsUpgradeGuide
Step-2:Addtherequiredenhancedecommercetrackingcodeonvariouswebpages
Addtherequiredenhancedecommercetrackingcodeonvariouswebpagesofyourwebsite(asmentionedinthisarticle)totrackthemostimportantshoppingactivities.
Ifyouhavealreadyhadstandardecommercetrackinginstalledthendonotaddthetrackingcodetomeasureproductpurchasesatthisstage.
ThatisbecauseyoucannotrunenhancedecommercetrackinginparallelwiththestandardecommercetrackingforthesameGApropertyandyoualsodonotwanttoloseecommercedatawhileyousetupandtestenhancedecommercetracking.
However, Ifyouaresettingupecommercetrackingforthefirsttimeonyourwebsite,thenyoucanalsoaddthetrackingcodetomeasureproductpurchasesatthisstage.
Step-3:EnableenhancedecommerceandconfigureCheckoutstepsnameinyourGAproperty
#1NavigatetotheadminsectionofyourGAproperty.
#2Clickon‘EcommerceSettings’underthe‘View’column:
#3‘EnableEcommerce’ andthen‘EnhanceEcommerceReporting’byswitchingthetogglebuttonto‘ON’:
#4Giveadescriptivenametoeachstepinyourcheckoutfunnel:
Note:Ifyoudonotconfigurethecheckoutstepsnamesthenyouwillseeonlyasinglestepcalledstep1inyour‘CheckoutbehaviourAnalysis’reportwhichisagoodoptiononlywhenyouhavegotasinglestepcheckout:
Onceyouconfiguredthecheckoutstepsnames,yourcheckoutbehavioranalysisreportisgoingtolookliketheonebelow:
Onceyouhaveenabled‘enhancedecommercereporting,youcanseethenewenhancedecommercetrackingreports(underConversions>EcommerceinyourGAview):
Note:Itisimportantthatyouonlyenabletheenhancedecommercetrackingviathereportinginterfacewhenyouarereadytotestyourenhancedecommercetrackingsetup.
Step-4:Replacetheoldecommercetrackingcode withtheproductpurchasetrackingcode
Onceyouhavereplacedtheoldecommercetrackingcodewiththeproductpurchasetrackingcodeontheorderconfirmationpage,thestandardecommercetrackingwillbereplacedbyenhancedecommercetracking.
Ifyouwanttoplaysupersafe,thenfirstdeployenhancedecommercetrackingonyourstagingwebsiteviaGAtestproperty.Youmayneedtousemultipletrackershere.Andwheneverythinglooksgreat,thendeploytheenhancedecommercetrackingcodeonthelivewebsiteviayourmainGAproperty.
OtherArticlesonEnhancedEcommerceTracking
#1UnderstandingEnhancedEcommercetrackinginGoogle Analytics#2UsingEnhancedEcommercesegmentsforRemarketinginGoogleAnalytics#3UsingCohortAnalysis&Enhancedecommercetounderstandusersbehavior#4FixingDuplicate,Cancelled,Testorders&RefundsinGoogleAnalytics#5EnhancedEcommerceTrackingviaGoogleTagManager#6ImplementingEnhancedEcommerceTrackinginGoogleAnalytics(analytics.js)–Tutorial
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