SlideShare a Scribd company logo
1 of 37
Download to read offline
Improving e-commerce
                             analytics with
                           Universal Analytics
                              Matt Clarke @techpad
                                  techpad.co.uk




Sunday, 17 February 13
I love Google Analytics,
                but as an e-commerce
                director, I encounter
                questions every day
                that it can’t answer.
                                     @techpad
Sunday, 17 February 13
What’s the conversion
                rate for product X?


                                   @techpad
Sunday, 17 February 13
What’s the conversion
                rate for product X?
                 You can’t easily determine the conversion rate
                 for products, categories or brands to monitor
                 trends or optimise them.You might be able to
                 do it externally with API hacks, but it’s not easy...
                                                              @techpad
Sunday, 17 February 13
How much stock of
                brand Y did we sell?


                                       @techpad
Sunday, 17 February 13
How much stock of
                brand Y did we sell?
                 Oddly, brand isn’t a standard dimension. Reporting
                 on brand performance requires manual custom
                 reports or dashboards.

                                                          @techpad
Sunday, 17 February 13
How profitable is that
                Adwords campaign?


                                    @techpad
Sunday, 17 February 13
How profitable is that
                Adwords campaign?
                Google Analytics doesn’t consider Cost Of Goods
                Sold (COGS), so to calculate profit, you need to do
                it all externally. There’s no cost import option for
                product costs yet.
                                                          @techpad
Sunday, 17 February 13
What’s the average
                margin for that
                category?

                                     @techpad
Sunday, 17 February 13
What’s the average
                margin for that
                category?
                 Similarly, because there are no cost data for product
                 costs, you can’t easily monitor margin trends...

                                                           @techpad
Sunday, 17 February 13
When we increase the
                price of product X,
                what proportion of
                customers buy, defect
                or switch brands?

                                   @techpad
Sunday, 17 February 13
When we increase the
                price of product X,
                what proportion of
                customers buy, defect
                or switch brands?
                Price Elasticity of Demand analysis would be nice, as
                would metrics on latency to indicate which of the
                customers we acquired are still customers.
                                                          @techpad
Sunday, 17 February 13
Google could fix some
                    of this for us now...
                    • If you could import product cost data, you
                         could see product profit and margin, and
                         the actual ROI/profitability of ads.
                    • If you could connect Google Merchant
                         Center data to GA you could get product
                         conversion rate, brand performance data
                         and new variables to use as custom
                         segments. (You can do it with the API.)

                                                             @techpad
Sunday, 17 February 13
That’s unlikely. But Universal
                    Analytics might help...
                 • You can create custom dimensions for
                         product, brand, manufacturer and supplier
                         to improve reports and aid analysis.
                    • You can create custom metrics for product
                         cost, profit, margin and shipping costs.
                    • It’s in beta and not everything works
                         properly (or at all) yet. It has limitations, but
                         it’s still a big step forward.

                                                                   @techpad
Sunday, 17 February 13
Here’s how I’ve used it



                                     @techpad
Sunday, 17 February 13
Measurement Protocol and
                         Universal Analytics
                   • I opted to use a combination of the client-
                         side Universal Analytics (analytics.js) and
                         the server-side Measurement Protocol.
                    • Using Measurement Protocol allows me to
                         bypass the event limits of Universal
                         Analytics and to send data (such as profit
                         and product cost) that I don’t want to
                         appear in the client-side JavaScript code.

                                                                 @techpad
Sunday, 17 February 13
Server-side data layer
                    • To ease data access, I created a server-side
                         data layer containing data objects for page,
                         product, customer and transaction.
                    • I push data to the client-side code from the
                         (private) server-side data layer.
                    • If I later decide to move to Google Tag
                         Manager, or even switch analytics vendors,
                         it’s a relatively easy task.

                                                                @techpad
Sunday, 17 February 13
How it looks...
                                               Web analytics
                         Database               extension




             Page object            Customer object           Order object        Product object




                                                                        Measurement
                                                 Data layer
                                                                       Protocol and UA




                                                                                         @techpad
Sunday, 17 February 13
How it works
                                  Web analytics
              Data layer                          Page type?
                                   extension




                                                  Order page    E-commerce tracking,
           Product page            Other page
                                                                plus product, supplier,
                                                                manufacturer custom
                                                                dimensions. Plus...


                                                                Sensitive stuff I don’t
                                                                want to be visible in the
       The usual, plus product,     Universal     Measurement   client-side source code,
       supplier, manufacturer       Analytics      Protocol     ie. profit and margin.
       custom dimensions to
       connect at order page...
                                                                 @techpad
Sunday, 17 February 13
Universal Analytics


                                           @techpad
Sunday, 17 February 13
The basics of UA
                    • Uses analytics.js instead of ga.js and
                         replaces all the old GA cookies with _ga.
                    • Has a totally new syntax, but all the good
                         stuff remains - including events.
                    • Custom dimensions and metrics replace
                         the old custom variables.
                    • Will support user ID (but doesn’t yet).
                                                               @techpad
Sunday, 17 February 13
How I’ve used it
                    • On the product page, I’m firing custom
                         dimensions for: product, brand,
                         manufacturer, supplier, author and product
                         cohort.
                    • I’m hoping to connect these with data fired
                         on the payment complete page (attached to
                         transaction/item) to allow me to get data
                         on stuff bog standard GA can’t measure.

                                                               @techpad
Sunday, 17 February 13
An overview of custom
                           dimensions and metrics
                    • First, define your custom dimension/metric
                         in the Google Analytics UI.
                    • Send your CD/CM with another data type,
                         such as a pageview or an event.
                    • ga(‘send’,‘pageview’,{dimension1:‘Apple iPad
                         3’});
                    • You can combine several together.
                                                            @techpad
Sunday, 17 February 13
Measurement Protocol


                                     @techpad
Sunday, 17 February 13
The basics of MP
                    • A server-side way of sending GA data (like
                         PHP-GA), based on a simple URL system.
                         You send a payload to an HTTP endpoint.
                    • Sending data with an HTTP POST returns a
                         200 OK. (Sadly, even if it’s malformed...)
                    • There’s currently no client library, so you’ll
                         need to code your own. However, this is
                         quite straightforward with PHP and Curl.

                                                                 @techpad
Sunday, 17 February 13
How I’m using it
                    • Used on payment page to send data I want
                         to hide from anyone viewing the source.
                    • I want to supplement the e-commerce
                         tracking with extra custom dimensions and
                         metrics, such as product, brand, supplier,
                         manufacturer, profit and margin. *
                    • I’m joining these to UA dimensions fired on
                         the product pages attached to pageviews.

                                                              @techpad
Sunday, 17 February 13
What do I send?
                    • Latency - days since last purchase (CM)
                    • Customer cohort (event)
                    • Days as customer (event)
                    • Lifetime spend (event)
                    • Carrier (CD)
                    • Newsletter preferences (CD)
                                                           @techpad
Sunday, 17 February 13
What do I send?
                    • Product (CD)
                    • Brand (CD)
                    • Manufacturer (CD)
                    • Supplier (CD)
                    • Product author (CD)
                    • Product cohort (CD)
                                            @techpad
Sunday, 17 February 13
What do I send?
                    • Product cost (CM)
                    • Product margin (CM)
                    • Product profit (CM)
                    • Shipping cost (CM)
                    • However, the CMs and CDs attached to
                         the item and transaction don’t work yet.

                                                               @techpad
Sunday, 17 February 13
Using Measurement
                         Protocol alongside
                         Universal Analytics


                                           @techpad
Sunday, 17 February 13
Using Measurement Protocol
                       with Universal Analytics
                    • Measurement Protocol and UA use a
                         visitor ID called the client ID (or cid).
                    • This isn’t to be confused with the user ID.
                         (That doesn’t exist yet.)
                    • If you want to use Measurement Protocol
                         and UA together, you need to use the same
                         client ID. Otherwise GA won’t connect the
                         data to a given visitor.

                                                                     @techpad
Sunday, 17 February 13
32-bit IDs vs UUID v4

                    • Universal Analytics (ga.js) cookies use the
                         old-style 32-bit UUIDs for compatibility
                         with the current version of GA.
                    • The docs (and GA team) recommend using
                         UUID v4 for client ID, but (undocumented)
                         it can also support 32-bit IDs.
                    • If you want to use both together, you need
                         to use the _ga 32-bit ID, not UUID v4.

                                                               @techpad
Sunday, 17 February 13
Obtaining the 32-bit ID

                    • Parse the new _ga cookie to obtain a given
                         visitor’s 32-bit ID to send with MP data.
                    • Example: 1.2.123456789.9876543219876
                    • Extract the last two items from the cookie
                         and use that as your 32-bit ID.
                    • I’ve written some cookie parsing code. Get
                         a copy from here: http://goo.gl/HgCew

                                                                 @techpad
Sunday, 17 February 13
To round up...


                                          @techpad
Sunday, 17 February 13
Measurement Protocol and
                 Universal Analytics are amazing
                    • They open up new possibilities for tracking.
                    • They should help improve analysis.
                    • They’re better integrated than CVs.
                    • You get 20 CDs and 20 CMs.
                    • The new user ID (when supported) should
                         make even more cool stuff viable.

                                                             @techpad
Sunday, 17 February 13
But there are a few issues...

                    • You can’t send custom dimensions and
                         metrics with either a transaction or a
                         transaction item yet. However, the GA team
                         is planning to add support, which is great.
                    • At the moment, custom metrics can’t
                         include a decimal point. Why? (Consider
                         rounding and multiplying, extracting in API,
                         then dividing to get the original value.)

                                                                @techpad
Sunday, 17 February 13
Tips
                    • Using a data layer means you can use data
                         in Measurement Protocol and Universal
                         Analytics easily and keeps things tidier.
                    • Use Measurement Protocol to send stuff
                         you don’t want visible in the JS code.
                    • Parse the 32-bit ID from the _ga cookie
                         and use it as the Measurement Protocol
                         client ID, if using both together.

                                                                  @techpad
Sunday, 17 February 13

More Related Content

Viewers also liked

Nix for etl using scripting to automate data cleaning & transformation
Nix for etl using scripting to automate data cleaning & transformationNix for etl using scripting to automate data cleaning & transformation
Nix for etl using scripting to automate data cleaning & transformationLynchpin Analytics Consultancy
 
Measurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
Measurecamp 6 session: Effective Customer Feedback & Measurement FrameworksMeasurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
Measurecamp 6 session: Effective Customer Feedback & Measurement FrameworksSean Burton
 
Breaking down the barriers to the use of digital analytics
Breaking down the barriers to the use of digital analyticsBreaking down the barriers to the use of digital analytics
Breaking down the barriers to the use of digital analyticsPeter O'Neill
 
User-Centric Analytics (MeasureCamp Talk)
User-Centric Analytics (MeasureCamp Talk)User-Centric Analytics (MeasureCamp Talk)
User-Centric Analytics (MeasureCamp Talk)Taste Medio
 
Superweek 2015 traffic attribution
Superweek 2015 traffic attributionSuperweek 2015 traffic attribution
Superweek 2015 traffic attributionJacob Kildebogaard
 
MeasureCamp Paris - est ce bientôt la fin du métier de web analyste ?
MeasureCamp Paris -  est ce bientôt la fin du métier de web analyste ?MeasureCamp Paris -  est ce bientôt la fin du métier de web analyste ?
MeasureCamp Paris - est ce bientôt la fin du métier de web analyste ?Nicolas Malo
 
A/B Testing Pitfalls - MeasureCamp London 2015
A/B Testing Pitfalls - MeasureCamp London 2015A/B Testing Pitfalls - MeasureCamp London 2015
A/B Testing Pitfalls - MeasureCamp London 2015Michal Parizek
 
Customer Lifetime Value
Customer Lifetime ValueCustomer Lifetime Value
Customer Lifetime Valuepavel jašek
 
31 Ways To Destroy Your Google Analytics Implementation
31 Ways To Destroy Your Google Analytics Implementation31 Ways To Destroy Your Google Analytics Implementation
31 Ways To Destroy Your Google Analytics ImplementationCharles Meaden
 

Viewers also liked (10)

Nix for etl using scripting to automate data cleaning & transformation
Nix for etl using scripting to automate data cleaning & transformationNix for etl using scripting to automate data cleaning & transformation
Nix for etl using scripting to automate data cleaning & transformation
 
Measurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
Measurecamp 6 session: Effective Customer Feedback & Measurement FrameworksMeasurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
Measurecamp 6 session: Effective Customer Feedback & Measurement Frameworks
 
Measure camp pres 5 cro myths
Measure camp pres   5 cro mythsMeasure camp pres   5 cro myths
Measure camp pres 5 cro myths
 
Breaking down the barriers to the use of digital analytics
Breaking down the barriers to the use of digital analyticsBreaking down the barriers to the use of digital analytics
Breaking down the barriers to the use of digital analytics
 
User-Centric Analytics (MeasureCamp Talk)
User-Centric Analytics (MeasureCamp Talk)User-Centric Analytics (MeasureCamp Talk)
User-Centric Analytics (MeasureCamp Talk)
 
Superweek 2015 traffic attribution
Superweek 2015 traffic attributionSuperweek 2015 traffic attribution
Superweek 2015 traffic attribution
 
MeasureCamp Paris - est ce bientôt la fin du métier de web analyste ?
MeasureCamp Paris -  est ce bientôt la fin du métier de web analyste ?MeasureCamp Paris -  est ce bientôt la fin du métier de web analyste ?
MeasureCamp Paris - est ce bientôt la fin du métier de web analyste ?
 
A/B Testing Pitfalls - MeasureCamp London 2015
A/B Testing Pitfalls - MeasureCamp London 2015A/B Testing Pitfalls - MeasureCamp London 2015
A/B Testing Pitfalls - MeasureCamp London 2015
 
Customer Lifetime Value
Customer Lifetime ValueCustomer Lifetime Value
Customer Lifetime Value
 
31 Ways To Destroy Your Google Analytics Implementation
31 Ways To Destroy Your Google Analytics Implementation31 Ways To Destroy Your Google Analytics Implementation
31 Ways To Destroy Your Google Analytics Implementation
 

Similar to Measurecamp - Improving e commerce tracking with universal analytics

Voxxed Days Cluj - Powering interactive data analysis with Google BigQuery
Voxxed Days Cluj - Powering interactive data analysis with Google BigQueryVoxxed Days Cluj - Powering interactive data analysis with Google BigQuery
Voxxed Days Cluj - Powering interactive data analysis with Google BigQueryMárton Kodok
 
Google Analytics location data visualised with CARTO & BigQuery
Google Analytics location data visualised with CARTO & BigQueryGoogle Analytics location data visualised with CARTO & BigQuery
Google Analytics location data visualised with CARTO & BigQueryCARTO
 
DevTalks Keynote Powering interactive data analysis with Google BigQuery
DevTalks Keynote Powering interactive data analysis with Google BigQueryDevTalks Keynote Powering interactive data analysis with Google BigQuery
DevTalks Keynote Powering interactive data analysis with Google BigQueryMárton Kodok
 
https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...
https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...
https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...Neo4j
 
Using Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation SystemUsing Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation SystemVMware Tanzu
 
The ABCs of Treating Data as Product
The ABCs of Treating Data as ProductThe ABCs of Treating Data as Product
The ABCs of Treating Data as ProductDATAVERSITY
 
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQueryGDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQueryMárton Kodok
 
How to train your product owner
How to train your product ownerHow to train your product owner
How to train your product ownerDavid Murgatroyd
 
seven steps to dataops @ dataops.rocks conference Oct 2019
seven steps to dataops @ dataops.rocks conference Oct 2019seven steps to dataops @ dataops.rocks conference Oct 2019
seven steps to dataops @ dataops.rocks conference Oct 2019DataKitchen
 
Building Data Products with BigQuery for PPC and SEO (SMX 2022)
Building Data Products with BigQuery for PPC and SEO (SMX 2022)Building Data Products with BigQuery for PPC and SEO (SMX 2022)
Building Data Products with BigQuery for PPC and SEO (SMX 2022)Christopher Gutknecht
 
How to Build Enterprise AI Products by fmr Google Product Leader
How to Build Enterprise AI Products by fmr Google Product LeaderHow to Build Enterprise AI Products by fmr Google Product Leader
How to Build Enterprise AI Products by fmr Google Product LeaderProduct School
 
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce Websites
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce WebsitesBrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce Websites
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce WebsitesDan Taylor
 
Four Key Considerations for your Big Data Analytics Strategy
Four Key Considerations for your Big Data Analytics StrategyFour Key Considerations for your Big Data Analytics Strategy
Four Key Considerations for your Big Data Analytics StrategyArcadia Data
 
Making advanced analytics accessible to more companies
Making advanced analytics accessible to more companiesMaking advanced analytics accessible to more companies
Making advanced analytics accessible to more companiesMárton Kodok
 
Group 3 slide presentation
Group 3 slide presentationGroup 3 slide presentation
Group 3 slide presentationMichael Young
 
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS WorldSuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS WorldSimo Ahava
 
Predictive Analytics - Big Data Warehousing Meetup
Predictive Analytics - Big Data Warehousing MeetupPredictive Analytics - Big Data Warehousing Meetup
Predictive Analytics - Big Data Warehousing MeetupCaserta
 
Jewelry has been a really unstructuredsomewhat chaotic with resp.docx
Jewelry has been a really unstructuredsomewhat chaotic with resp.docxJewelry has been a really unstructuredsomewhat chaotic with resp.docx
Jewelry has been a really unstructuredsomewhat chaotic with resp.docxvrickens
 
E-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.comE-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.comMongoDB
 
Being data driven - our data journey
Being data driven - our data journeyBeing data driven - our data journey
Being data driven - our data journeyIstván Rechner
 

Similar to Measurecamp - Improving e commerce tracking with universal analytics (20)

Voxxed Days Cluj - Powering interactive data analysis with Google BigQuery
Voxxed Days Cluj - Powering interactive data analysis with Google BigQueryVoxxed Days Cluj - Powering interactive data analysis with Google BigQuery
Voxxed Days Cluj - Powering interactive data analysis with Google BigQuery
 
Google Analytics location data visualised with CARTO & BigQuery
Google Analytics location data visualised with CARTO & BigQueryGoogle Analytics location data visualised with CARTO & BigQuery
Google Analytics location data visualised with CARTO & BigQuery
 
DevTalks Keynote Powering interactive data analysis with Google BigQuery
DevTalks Keynote Powering interactive data analysis with Google BigQueryDevTalks Keynote Powering interactive data analysis with Google BigQuery
DevTalks Keynote Powering interactive data analysis with Google BigQuery
 
https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...
https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...
https://www.slideshare.net/neo4j/a-fusion-of-machine-learning-and-graph-analy...
 
Using Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation SystemUsing Data Science to Build an End-to-End Recommendation System
Using Data Science to Build an End-to-End Recommendation System
 
The ABCs of Treating Data as Product
The ABCs of Treating Data as ProductThe ABCs of Treating Data as Product
The ABCs of Treating Data as Product
 
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQueryGDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
GDG DevFest Ukraine - Powering Interactive Data Analysis with Google BigQuery
 
How to train your product owner
How to train your product ownerHow to train your product owner
How to train your product owner
 
seven steps to dataops @ dataops.rocks conference Oct 2019
seven steps to dataops @ dataops.rocks conference Oct 2019seven steps to dataops @ dataops.rocks conference Oct 2019
seven steps to dataops @ dataops.rocks conference Oct 2019
 
Building Data Products with BigQuery for PPC and SEO (SMX 2022)
Building Data Products with BigQuery for PPC and SEO (SMX 2022)Building Data Products with BigQuery for PPC and SEO (SMX 2022)
Building Data Products with BigQuery for PPC and SEO (SMX 2022)
 
How to Build Enterprise AI Products by fmr Google Product Leader
How to Build Enterprise AI Products by fmr Google Product LeaderHow to Build Enterprise AI Products by fmr Google Product Leader
How to Build Enterprise AI Products by fmr Google Product Leader
 
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce Websites
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce WebsitesBrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce Websites
BrightonSEO October 2022 - Dan Taylor SEO - Indexing Ecommerce Websites
 
Four Key Considerations for your Big Data Analytics Strategy
Four Key Considerations for your Big Data Analytics StrategyFour Key Considerations for your Big Data Analytics Strategy
Four Key Considerations for your Big Data Analytics Strategy
 
Making advanced analytics accessible to more companies
Making advanced analytics accessible to more companiesMaking advanced analytics accessible to more companies
Making advanced analytics accessible to more companies
 
Group 3 slide presentation
Group 3 slide presentationGroup 3 slide presentation
Group 3 slide presentation
 
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS WorldSuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
SuperWeek 2016 - Garbage In Garbage Out: Data Quality in a TMS World
 
Predictive Analytics - Big Data Warehousing Meetup
Predictive Analytics - Big Data Warehousing MeetupPredictive Analytics - Big Data Warehousing Meetup
Predictive Analytics - Big Data Warehousing Meetup
 
Jewelry has been a really unstructuredsomewhat chaotic with resp.docx
Jewelry has been a really unstructuredsomewhat chaotic with resp.docxJewelry has been a really unstructuredsomewhat chaotic with resp.docx
Jewelry has been a really unstructuredsomewhat chaotic with resp.docx
 
E-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.comE-Commerce and MongoDB at Backcountry.com
E-Commerce and MongoDB at Backcountry.com
 
Being data driven - our data journey
Being data driven - our data journeyBeing data driven - our data journey
Being data driven - our data journey
 

Recently uploaded

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Measurecamp - Improving e commerce tracking with universal analytics

  • 1. Improving e-commerce analytics with Universal Analytics Matt Clarke @techpad techpad.co.uk Sunday, 17 February 13
  • 2. I love Google Analytics, but as an e-commerce director, I encounter questions every day that it can’t answer. @techpad Sunday, 17 February 13
  • 3. What’s the conversion rate for product X? @techpad Sunday, 17 February 13
  • 4. What’s the conversion rate for product X? You can’t easily determine the conversion rate for products, categories or brands to monitor trends or optimise them.You might be able to do it externally with API hacks, but it’s not easy... @techpad Sunday, 17 February 13
  • 5. How much stock of brand Y did we sell? @techpad Sunday, 17 February 13
  • 6. How much stock of brand Y did we sell? Oddly, brand isn’t a standard dimension. Reporting on brand performance requires manual custom reports or dashboards. @techpad Sunday, 17 February 13
  • 7. How profitable is that Adwords campaign? @techpad Sunday, 17 February 13
  • 8. How profitable is that Adwords campaign? Google Analytics doesn’t consider Cost Of Goods Sold (COGS), so to calculate profit, you need to do it all externally. There’s no cost import option for product costs yet. @techpad Sunday, 17 February 13
  • 9. What’s the average margin for that category? @techpad Sunday, 17 February 13
  • 10. What’s the average margin for that category? Similarly, because there are no cost data for product costs, you can’t easily monitor margin trends... @techpad Sunday, 17 February 13
  • 11. When we increase the price of product X, what proportion of customers buy, defect or switch brands? @techpad Sunday, 17 February 13
  • 12. When we increase the price of product X, what proportion of customers buy, defect or switch brands? Price Elasticity of Demand analysis would be nice, as would metrics on latency to indicate which of the customers we acquired are still customers. @techpad Sunday, 17 February 13
  • 13. Google could fix some of this for us now... • If you could import product cost data, you could see product profit and margin, and the actual ROI/profitability of ads. • If you could connect Google Merchant Center data to GA you could get product conversion rate, brand performance data and new variables to use as custom segments. (You can do it with the API.) @techpad Sunday, 17 February 13
  • 14. That’s unlikely. But Universal Analytics might help... • You can create custom dimensions for product, brand, manufacturer and supplier to improve reports and aid analysis. • You can create custom metrics for product cost, profit, margin and shipping costs. • It’s in beta and not everything works properly (or at all) yet. It has limitations, but it’s still a big step forward. @techpad Sunday, 17 February 13
  • 15. Here’s how I’ve used it @techpad Sunday, 17 February 13
  • 16. Measurement Protocol and Universal Analytics • I opted to use a combination of the client- side Universal Analytics (analytics.js) and the server-side Measurement Protocol. • Using Measurement Protocol allows me to bypass the event limits of Universal Analytics and to send data (such as profit and product cost) that I don’t want to appear in the client-side JavaScript code. @techpad Sunday, 17 February 13
  • 17. Server-side data layer • To ease data access, I created a server-side data layer containing data objects for page, product, customer and transaction. • I push data to the client-side code from the (private) server-side data layer. • If I later decide to move to Google Tag Manager, or even switch analytics vendors, it’s a relatively easy task. @techpad Sunday, 17 February 13
  • 18. How it looks... Web analytics Database extension Page object Customer object Order object Product object Measurement Data layer Protocol and UA @techpad Sunday, 17 February 13
  • 19. How it works Web analytics Data layer Page type? extension Order page E-commerce tracking, Product page Other page plus product, supplier, manufacturer custom dimensions. Plus... Sensitive stuff I don’t want to be visible in the The usual, plus product, Universal Measurement client-side source code, supplier, manufacturer Analytics Protocol ie. profit and margin. custom dimensions to connect at order page... @techpad Sunday, 17 February 13
  • 20. Universal Analytics @techpad Sunday, 17 February 13
  • 21. The basics of UA • Uses analytics.js instead of ga.js and replaces all the old GA cookies with _ga. • Has a totally new syntax, but all the good stuff remains - including events. • Custom dimensions and metrics replace the old custom variables. • Will support user ID (but doesn’t yet). @techpad Sunday, 17 February 13
  • 22. How I’ve used it • On the product page, I’m firing custom dimensions for: product, brand, manufacturer, supplier, author and product cohort. • I’m hoping to connect these with data fired on the payment complete page (attached to transaction/item) to allow me to get data on stuff bog standard GA can’t measure. @techpad Sunday, 17 February 13
  • 23. An overview of custom dimensions and metrics • First, define your custom dimension/metric in the Google Analytics UI. • Send your CD/CM with another data type, such as a pageview or an event. • ga(‘send’,‘pageview’,{dimension1:‘Apple iPad 3’}); • You can combine several together. @techpad Sunday, 17 February 13
  • 24. Measurement Protocol @techpad Sunday, 17 February 13
  • 25. The basics of MP • A server-side way of sending GA data (like PHP-GA), based on a simple URL system. You send a payload to an HTTP endpoint. • Sending data with an HTTP POST returns a 200 OK. (Sadly, even if it’s malformed...) • There’s currently no client library, so you’ll need to code your own. However, this is quite straightforward with PHP and Curl. @techpad Sunday, 17 February 13
  • 26. How I’m using it • Used on payment page to send data I want to hide from anyone viewing the source. • I want to supplement the e-commerce tracking with extra custom dimensions and metrics, such as product, brand, supplier, manufacturer, profit and margin. * • I’m joining these to UA dimensions fired on the product pages attached to pageviews. @techpad Sunday, 17 February 13
  • 27. What do I send? • Latency - days since last purchase (CM) • Customer cohort (event) • Days as customer (event) • Lifetime spend (event) • Carrier (CD) • Newsletter preferences (CD) @techpad Sunday, 17 February 13
  • 28. What do I send? • Product (CD) • Brand (CD) • Manufacturer (CD) • Supplier (CD) • Product author (CD) • Product cohort (CD) @techpad Sunday, 17 February 13
  • 29. What do I send? • Product cost (CM) • Product margin (CM) • Product profit (CM) • Shipping cost (CM) • However, the CMs and CDs attached to the item and transaction don’t work yet. @techpad Sunday, 17 February 13
  • 30. Using Measurement Protocol alongside Universal Analytics @techpad Sunday, 17 February 13
  • 31. Using Measurement Protocol with Universal Analytics • Measurement Protocol and UA use a visitor ID called the client ID (or cid). • This isn’t to be confused with the user ID. (That doesn’t exist yet.) • If you want to use Measurement Protocol and UA together, you need to use the same client ID. Otherwise GA won’t connect the data to a given visitor. @techpad Sunday, 17 February 13
  • 32. 32-bit IDs vs UUID v4 • Universal Analytics (ga.js) cookies use the old-style 32-bit UUIDs for compatibility with the current version of GA. • The docs (and GA team) recommend using UUID v4 for client ID, but (undocumented) it can also support 32-bit IDs. • If you want to use both together, you need to use the _ga 32-bit ID, not UUID v4. @techpad Sunday, 17 February 13
  • 33. Obtaining the 32-bit ID • Parse the new _ga cookie to obtain a given visitor’s 32-bit ID to send with MP data. • Example: 1.2.123456789.9876543219876 • Extract the last two items from the cookie and use that as your 32-bit ID. • I’ve written some cookie parsing code. Get a copy from here: http://goo.gl/HgCew @techpad Sunday, 17 February 13
  • 34. To round up... @techpad Sunday, 17 February 13
  • 35. Measurement Protocol and Universal Analytics are amazing • They open up new possibilities for tracking. • They should help improve analysis. • They’re better integrated than CVs. • You get 20 CDs and 20 CMs. • The new user ID (when supported) should make even more cool stuff viable. @techpad Sunday, 17 February 13
  • 36. But there are a few issues... • You can’t send custom dimensions and metrics with either a transaction or a transaction item yet. However, the GA team is planning to add support, which is great. • At the moment, custom metrics can’t include a decimal point. Why? (Consider rounding and multiplying, extracting in API, then dividing to get the original value.) @techpad Sunday, 17 February 13
  • 37. Tips • Using a data layer means you can use data in Measurement Protocol and Universal Analytics easily and keeps things tidier. • Use Measurement Protocol to send stuff you don’t want visible in the JS code. • Parse the 32-bit ID from the _ga cookie and use it as the Measurement Protocol client ID, if using both together. @techpad Sunday, 17 February 13