SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Introduction to Google Analytics 
for web developers 
Rubén Martínez
Google Analytics reports incoming traffic to webs 
and apps 
This graph compares the count of visitors from Google organic search to a website in two 
periods of time. 
The story it is telling us is good news: the organic traffic markedly increased in a given 
month over the same period of the previous year (due to a previous investment in content 
and SEO). 
Introduction to Google Analytics -@RubenMartinezS
Google Analytics helps understand your visitors’ 
flows 
Traffic volume by 
channel e.g. 
sessions per 
campaign and 
geolocation 
Engagement 
• Depth 
• Density 
• Duplication 
Content 
• A/B testing 
• Path Analysis 
Introduction to Google Analytics -@RubenMartinezS
Google Analytics is: 
• A platform to track online and off-line activity of aggregated and anonymized 
visitors’ data 
• A behavioural reporting platform of activity of web visitors and end-users 
• A bread-and-butter tool for webmasters and marketing and business analysts 
• A (peculiar) dashboard interface and a well documented API 
Introduction to Google Analytics -@RubenMartinezS
2 Web Analytics platforms: GA and SiteCatalyst 
Introduction to Google Analytics -@RubenMartinezS 
Number of websites using Google 
Universal Analytics (left) vs. 
Omniture SiteCatalyst (below). 
Graphs with the same vertical 
scale and similar periods of time. 
Source: builtwith.com
Organization of the platform 
Developers can access Google Analytics via a front interface, client libraries and 
APIs. This is how each components and APIs are organized: 
Source: https://developers.google.com/analytics/devguides/platform/ 
Introduction to Google Analytics -@RubenMartinezS
Google Analytics is NOT: 
• A transactional CRM tool 
Visitors’ individual data is owned by Google Inc. 
The end user has access to anonymized data only. 
• A reporting tool of websites only 
It can be configured to track offline and online 
activity from multiple devices, including 
smartphones, kiosks, consoles, etc. 
• A parser of web server logs 
• A KPI-centric Business Intelligence platform 
Introduction to Google Analytics -@RubenMartinezS
Tracking code 
Sign up to Google Analytics. If are tracking a website on the admin panel, setup 
a property (URL). Then paste the code provided by Google (example below) on 
all the pages you want to track: 
<script> 
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 
ga('create', 'UA-2282690-1', 'paradigmatecnologico.com'); 
ga('send', 'pageview'); 
</script> 
When the browser loads this script, it interprets the document.write and triggers 
a sequence of events leading to send hits to Google’s server. 
Introduction to Google Analytics -@RubenMartinezS
Browsers sends hits to Google Analytics server 
Sequence of events: 
1. The client brower requests the javascript file 
2. The Google Analytics server responds with the analytics.js file 
3. The client fetches, loads and executes the javascript which dynamically creates an <img> 
element in the DOM 
4. A GET from the browser hits the GA’s server with a URL containing appended values of the 
browser and the computer. This is an image/gif request. Example: 
http://www.google-analytics. 
com/collect?v=1&_v=j20&a=806449001&t=pageview&_s=1&dl=http%3A%2F%2Fwww.paradigmatecnologico.com% 
2F&ul=en-us&de=UTF-8&sd=24- 
bit&sr=1920x1080&vp=1920x199&je=1&fl=13.0%20r0&_u=MAC~&cid=416165610.1399537988&tid=UA-2282690- 
1&z=2140666386 
5. The server reads the data in the image URL and stores the hit (e.g. pageview or event) for 
logging and processing 
Introduction to Google Analytics -@RubenMartinezS 
6. The server responds with a single-pixel gif
The 3 most important variables: t, cid and tid 
o t=pageview // Pageview hit type 
o cid=416165610.1399537988 // Anonymous 
Client ID 
o tid=UA-2282690-1 // Tracking Web property 
ID 
Introduction to Google Analytics -@RubenMartinezS
Visualization of tags and scripts 
Introduction to Google Analytics -@RubenMartinezS 
The analytics.js 
JavaScript library 
uses a single cookie. 
The cookie contains 
an anonymous 
identifier used to 
distinguish users.
analytics.js Google Analytics cookies 
By default, the analytics.js library sets 
cookies on the top level domain, excluding 
the leading dot, and sets the cookie path 
to the root level (/). 
The name of the cookies is _ga 
Note: The analytics.js library does not 
require setting cookies to transmit data to 
Google Analytics. 
Introduction to Google Analytics -@RubenMartinezS
What you CAN do with Google Analytics 
• Track activity BEFORE pushing a brand new website or mobile app public 
• Report activity on private areas (protected by a login and/or disallowed to 
crawling bots) 
• Link to Adwords (CPC), GDN (CPM) and FDA (retargeting) 
• Associate engagement data from different devices and multiple sessions (great 
for attribution) 
• Upload transactional data of own userIDs if anonymized (great for e-commerce) 
• Integrate your Google Analytics data with other business applications, e.g. via 
API 
• Report activity across domains (tagging is however tedious and impractical) 
Introduction to Google Analytics -@RubenMartinezS
What you CANNOT do with Google Analyics 
• Generate leads (post-click marketing). Google Analytics does not provide IP 
addresses or the name of the company visiting a website for instance – and you 
should not upload this information either 
• Upload personally identifiable information (see userIDs above) 
• Carry out experiments across multiple domains (cross domain reporting OK but not 
tests A/B) 
• Report –efficiently- inventory on e-commerce websites with SKUs 
Introduction to Google Analytics -@RubenMartinezS
Metrics and dimensions 
Dimensions are attributes of 
• Visitors 
• Sessions 
• Hits: page, event 
The values of dimensions are strings. 
Metrics are counts (average integer or currencies). 
Values of metrics are numbers. 
Each custom dimension and metrics has an associated 
index. 
There is a maximum of 20 custom metrics and 
dimensions 
Introduction to Google Analytics -@RubenMartinezS
Event hits 
Some user actions do not generate pageviews. 
- completion of individual form fields (“Send”) 
- external, mailto: and pdf links 
- video play or complete 
- AJAX, Flash, jQuery or HTML5 interactions 
You want to tag some HTML elements as events. Event tracking turns a normal 
<a href=“/documents/e-book.pdf”> 
into 
<a href=“/documents/e-book.pdf” 
onclick=”ga(‘send’,’event’,’link’,’pdf’)”> 
Introduction to Google Analytics -@RubenMartinezS
Metrics and dimensions 
For example, if your page is scripted in PHP, the actual author of the page will 
probably be stored in a PHP variable like $author. In your PHP template, you can 
use this author variable to pass the author value to the custom dimension 
ga('send', 'pageview', { 'dimension5': 
'<?=$author?>' }); 
Introduction to Google Analytics -@RubenMartinezS
Content Experiments based on a multi-armed bandit 
Introduction to Google Analytics -@RubenMartinezS 
approach
Google Analytics Universal is user-centric 
Advertisers cannot track users as individuals anymore due to the proliferation of 
smartphones. Cookies reside in desktop browsers. Cookies are not used by mobile apps and 
browsers such as Safari on iphones. 
The identification of users and their sessions takes place now at server level on Universal, 
not browser/cookie level. 
Cookies are still used but Google warns that their format might change without warning. 
Hence developers should not directly access the cookie analytics.js sets as it could lead to 
script errors and incorrect data. 
Instead, developers should use the get command to retrieve the clientId value when 
needed. Here's how to do this: 
ga(function(tracker) { var clientId = 
tracker.get('clientId'); }); 
Introduction to Google Analytics -@RubenMartinezS
clientId for cross-device attribution 
You can use a custom visitor ID based on customer email or ID in your database to merge 
smartphone / laptop / pc sessions into one cross-device session. You can track users who login 
to your website (authenticated users) by associating their clientID to their email. 
<?if ($isAuthenticatedUser):?> 
ga('create', 'UA-XXXX-Y', {'clientId': '<?=md5($email)?>' }); 
<?else:?> 
ga('create', 'UA-XXXX-Y'); 
<?endif;?> 
All users who sign in to your website will be tracked across all devices. 
GA uses cookie value + domain as a unique internal identifier. If two or more websites set up 
the same client ID value based on customer email, the data won't be corrupted, because they 
are using different domains (and different GA profile id). 
Introduction to Google Analytics -@RubenMartinezS
Link your acquisitions, engagement, and 
conversions 
In a typical e-commerce scenario, you generate unique User_IDs through the authentication 
passed to an account at sign-in. The User ID will allow you to track for instance transactions 
and activity on per customer basis. 
To enable this feature, add the following line to your tracking code to send User-ID data to 
Google Analytics. 
ga('create', 'UA-XXXX-Y', { 'userId': 'USER_ID' }); 
ga('send', 'pageview'); 
where USER_ID is a string and represents the stable and unique ID retrieved from your 
system. 
You can then send anonymized data based on User_IDs to Google Analytics. 
Introduction to Google Analytics -@RubenMartinezS
Thank 
you! 
If you enjoyed these slides or have 
suggestions to improve them, let us know! 
@rubenmartinezs

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (6)

Transformación Digital
Transformación DigitalTransformación Digital
Transformación Digital
 
¿Cómo vencer a los dragones digitales?
¿Cómo vencer a los dragones digitales?¿Cómo vencer a los dragones digitales?
¿Cómo vencer a los dragones digitales?
 
Gestion del tiempo y GTD
Gestion del tiempo y GTDGestion del tiempo y GTD
Gestion del tiempo y GTD
 
Apuntes de GTD (productividad)
Apuntes de GTD (productividad)Apuntes de GTD (productividad)
Apuntes de GTD (productividad)
 
Seminario Apache Solr
Seminario Apache SolrSeminario Apache Solr
Seminario Apache Solr
 
Cultura Digital Paradigma
Cultura Digital ParadigmaCultura Digital Paradigma
Cultura Digital Paradigma
 

Ähnlich wie Google Analytics Intro for Web Dev

Getting Started with AdWords API and Google Analytics
Getting Started with AdWords API and Google AnalyticsGetting Started with AdWords API and Google Analytics
Getting Started with AdWords API and Google Analyticsmarcwan
 
Google Analytics for Beginners - Training
Google Analytics for Beginners - TrainingGoogle Analytics for Beginners - Training
Google Analytics for Beginners - TrainingRuben Vezzoli
 
Google Analytics & UX
Google Analytics & UXGoogle Analytics & UX
Google Analytics & UXKatrin Mathis
 
Understanding Google Analytics: Who's Oggling My Company
Understanding Google Analytics: Who's Oggling My CompanyUnderstanding Google Analytics: Who's Oggling My Company
Understanding Google Analytics: Who's Oggling My CompanyKimberly Swetland
 
Google Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
Google Analytics with an Intro to Google Tag Manager for Austin WordPress MeetupGoogle Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
Google Analytics with an Intro to Google Tag Manager for Austin WordPress MeetupRich Plakas
 
Understanding Web Analytics and Google Analytics
Understanding Web Analytics and Google AnalyticsUnderstanding Web Analytics and Google Analytics
Understanding Web Analytics and Google AnalyticsPrathamesh Kulkarni
 
Score google analytics
Score   google analyticsScore   google analytics
Score google analyticsHotTopics114
 
Introduction to Google Analytics
Introduction to Google AnalyticsIntroduction to Google Analytics
Introduction to Google AnalyticsCemal Buyukgokcesu
 
Google Analytics 101 #SMAMI 2017
Google Analytics 101 #SMAMI 2017Google Analytics 101 #SMAMI 2017
Google Analytics 101 #SMAMI 2017Nicole Bullock
 
Introduction to web analytics and the Google analytics platform pdf
Introduction to web analytics and the Google analytics platform pdfIntroduction to web analytics and the Google analytics platform pdf
Introduction to web analytics and the Google analytics platform pdfMartin Bloomfield
 
Google Analytics for SEO Beginners
Google Analytics for SEO BeginnersGoogle Analytics for SEO Beginners
Google Analytics for SEO BeginnersAditya Todawal
 
Google Analytics Workshop 2013
Google Analytics Workshop 2013Google Analytics Workshop 2013
Google Analytics Workshop 2013Milad Safarzadeh
 
Google Analytics & Web Masters Tools - GBG Mumbai
Google Analytics & Web Masters Tools - GBG MumbaiGoogle Analytics & Web Masters Tools - GBG Mumbai
Google Analytics & Web Masters Tools - GBG MumbaiGBG Mumbai
 
Google analytics and google data studio
Google analytics and google data studioGoogle analytics and google data studio
Google analytics and google data studioBrian Pichman
 
Track Report & Optimize Your Web Creations
Track Report & Optimize Your Web CreationsTrack Report & Optimize Your Web Creations
Track Report & Optimize Your Web CreationsEmpirical Path
 
Introduction to Google Analytics
Introduction to Google AnalyticsIntroduction to Google Analytics
Introduction to Google AnalyticsManeesh Choudhary
 
Google Business Tools
Google Business ToolsGoogle Business Tools
Google Business Toolsredcomin
 

Ähnlich wie Google Analytics Intro for Web Dev (20)

Getting Started with AdWords API and Google Analytics
Getting Started with AdWords API and Google AnalyticsGetting Started with AdWords API and Google Analytics
Getting Started with AdWords API and Google Analytics
 
Google Analytics for Beginners - Training
Google Analytics for Beginners - TrainingGoogle Analytics for Beginners - Training
Google Analytics for Beginners - Training
 
Google Analytics & UX
Google Analytics & UXGoogle Analytics & UX
Google Analytics & UX
 
Understanding Google Analytics: Who's Oggling My Company
Understanding Google Analytics: Who's Oggling My CompanyUnderstanding Google Analytics: Who's Oggling My Company
Understanding Google Analytics: Who's Oggling My Company
 
Google Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
Google Analytics with an Intro to Google Tag Manager for Austin WordPress MeetupGoogle Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
Google Analytics with an Intro to Google Tag Manager for Austin WordPress Meetup
 
Understanding Web Analytics and Google Analytics
Understanding Web Analytics and Google AnalyticsUnderstanding Web Analytics and Google Analytics
Understanding Web Analytics and Google Analytics
 
Score google analytics
Score   google analyticsScore   google analytics
Score google analytics
 
Introduction to Google Analytics
Introduction to Google AnalyticsIntroduction to Google Analytics
Introduction to Google Analytics
 
Google Analytics 101 #SMAMI 2017
Google Analytics 101 #SMAMI 2017Google Analytics 101 #SMAMI 2017
Google Analytics 101 #SMAMI 2017
 
Introduction to web analytics and the Google analytics platform pdf
Introduction to web analytics and the Google analytics platform pdfIntroduction to web analytics and the Google analytics platform pdf
Introduction to web analytics and the Google analytics platform pdf
 
Google Analytics for SEO Beginners
Google Analytics for SEO BeginnersGoogle Analytics for SEO Beginners
Google Analytics for SEO Beginners
 
Google Analytics Workshop 2013
Google Analytics Workshop 2013Google Analytics Workshop 2013
Google Analytics Workshop 2013
 
Adobe part 1
Adobe part 1Adobe part 1
Adobe part 1
 
Google’s tridente
Google’s tridenteGoogle’s tridente
Google’s tridente
 
Google Analytics & Web Masters Tools - GBG Mumbai
Google Analytics & Web Masters Tools - GBG MumbaiGoogle Analytics & Web Masters Tools - GBG Mumbai
Google Analytics & Web Masters Tools - GBG Mumbai
 
Google analytics and google data studio
Google analytics and google data studioGoogle analytics and google data studio
Google analytics and google data studio
 
Track Report & Optimize Your Web Creations
Track Report & Optimize Your Web CreationsTrack Report & Optimize Your Web Creations
Track Report & Optimize Your Web Creations
 
Introduction to Google Analytics
Introduction to Google AnalyticsIntroduction to Google Analytics
Introduction to Google Analytics
 
Tracking across devices
Tracking across devices Tracking across devices
Tracking across devices
 
Google Business Tools
Google Business ToolsGoogle Business Tools
Google Business Tools
 

Mehr von Paradigma Digital

Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.Paradigma Digital
 
Java 8 time to join the future
Java 8  time to join the futureJava 8  time to join the future
Java 8 time to join the futureParadigma Digital
 
Programación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFluxProgramación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFluxParadigma Digital
 
Orquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace NetflixOrquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace NetflixParadigma Digital
 
Meetup microservicios: API Management
Meetup microservicios: API ManagementMeetup microservicios: API Management
Meetup microservicios: API ManagementParadigma Digital
 
Meetup de kubernetes, conceptos básicos.
Meetup  de kubernetes, conceptos básicos.Meetup  de kubernetes, conceptos básicos.
Meetup de kubernetes, conceptos básicos.Paradigma Digital
 
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptxDocker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptxParadigma Digital
 
Implementando microservicios
Implementando microserviciosImplementando microservicios
Implementando microserviciosParadigma Digital
 
Equipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma DigitalEquipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma DigitalParadigma Digital
 
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!Paradigma Digital
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octParadigma Digital
 
Programación Reactiva con RxJava
Programación Reactiva con RxJavaProgramación Reactiva con RxJava
Programación Reactiva con RxJavaParadigma Digital
 

Mehr von Paradigma Digital (20)

Ddd + ah + microservicios
Ddd + ah + microserviciosDdd + ah + microservicios
Ddd + ah + microservicios
 
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
Bots 3.0: Dejando atrás los bots conversacionales con Dialogflow.
 
Have you met Istio?
Have you met Istio?Have you met Istio?
Have you met Istio?
 
Linkerd a fondo
Linkerd a fondoLinkerd a fondo
Linkerd a fondo
 
Horneando apis
Horneando apisHorneando apis
Horneando apis
 
Java 8 time to join the future
Java 8  time to join the futureJava 8  time to join the future
Java 8 time to join the future
 
Programación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFluxProgramación Reactiva con Spring WebFlux
Programación Reactiva con Spring WebFlux
 
Orquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace NetflixOrquestando microservicios como lo hace Netflix
Orquestando microservicios como lo hace Netflix
 
Meetup microservicios: API Management
Meetup microservicios: API ManagementMeetup microservicios: API Management
Meetup microservicios: API Management
 
Meetup de kubernetes, conceptos básicos.
Meetup  de kubernetes, conceptos básicos.Meetup  de kubernetes, conceptos básicos.
Meetup de kubernetes, conceptos básicos.
 
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptxDocker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
Docker, kubernetes, openshift y openstack, para mi abuela. techfest 2017.pptx
 
Implementando microservicios
Implementando microserviciosImplementando microservicios
Implementando microservicios
 
Equipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma DigitalEquipo de Marketing de Paradigma Digital
Equipo de Marketing de Paradigma Digital
 
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
¿Cómo se despliega y autoescala Couchbase en Cloud? ¡Aprende de manera práctica!
 
Overview atlas (1)
Overview atlas (1)Overview atlas (1)
Overview atlas (1)
 
Manuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4octManuel Hurtado. Couchbase paradigma4oct
Manuel Hurtado. Couchbase paradigma4oct
 
Programación Reactiva con RxJava
Programación Reactiva con RxJavaProgramación Reactiva con RxJava
Programación Reactiva con RxJava
 
Python y Flink
Python y FlinkPython y Flink
Python y Flink
 
Kafka y python
Kafka y pythonKafka y python
Kafka y python
 
Introducción a Kubernetes
Introducción a KubernetesIntroducción a Kubernetes
Introducción a Kubernetes
 

Kürzlich hochgeladen

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 

Kürzlich hochgeladen (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"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...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 

Google Analytics Intro for Web Dev

  • 1. Introduction to Google Analytics for web developers Rubén Martínez
  • 2. Google Analytics reports incoming traffic to webs and apps This graph compares the count of visitors from Google organic search to a website in two periods of time. The story it is telling us is good news: the organic traffic markedly increased in a given month over the same period of the previous year (due to a previous investment in content and SEO). Introduction to Google Analytics -@RubenMartinezS
  • 3. Google Analytics helps understand your visitors’ flows Traffic volume by channel e.g. sessions per campaign and geolocation Engagement • Depth • Density • Duplication Content • A/B testing • Path Analysis Introduction to Google Analytics -@RubenMartinezS
  • 4. Google Analytics is: • A platform to track online and off-line activity of aggregated and anonymized visitors’ data • A behavioural reporting platform of activity of web visitors and end-users • A bread-and-butter tool for webmasters and marketing and business analysts • A (peculiar) dashboard interface and a well documented API Introduction to Google Analytics -@RubenMartinezS
  • 5. 2 Web Analytics platforms: GA and SiteCatalyst Introduction to Google Analytics -@RubenMartinezS Number of websites using Google Universal Analytics (left) vs. Omniture SiteCatalyst (below). Graphs with the same vertical scale and similar periods of time. Source: builtwith.com
  • 6. Organization of the platform Developers can access Google Analytics via a front interface, client libraries and APIs. This is how each components and APIs are organized: Source: https://developers.google.com/analytics/devguides/platform/ Introduction to Google Analytics -@RubenMartinezS
  • 7. Google Analytics is NOT: • A transactional CRM tool Visitors’ individual data is owned by Google Inc. The end user has access to anonymized data only. • A reporting tool of websites only It can be configured to track offline and online activity from multiple devices, including smartphones, kiosks, consoles, etc. • A parser of web server logs • A KPI-centric Business Intelligence platform Introduction to Google Analytics -@RubenMartinezS
  • 8. Tracking code Sign up to Google Analytics. If are tracking a website on the admin panel, setup a property (URL). Then paste the code provided by Google (example below) on all the pages you want to track: <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-2282690-1', 'paradigmatecnologico.com'); ga('send', 'pageview'); </script> When the browser loads this script, it interprets the document.write and triggers a sequence of events leading to send hits to Google’s server. Introduction to Google Analytics -@RubenMartinezS
  • 9. Browsers sends hits to Google Analytics server Sequence of events: 1. The client brower requests the javascript file 2. The Google Analytics server responds with the analytics.js file 3. The client fetches, loads and executes the javascript which dynamically creates an <img> element in the DOM 4. A GET from the browser hits the GA’s server with a URL containing appended values of the browser and the computer. This is an image/gif request. Example: http://www.google-analytics. com/collect?v=1&_v=j20&a=806449001&t=pageview&_s=1&dl=http%3A%2F%2Fwww.paradigmatecnologico.com% 2F&ul=en-us&de=UTF-8&sd=24- bit&sr=1920x1080&vp=1920x199&je=1&fl=13.0%20r0&_u=MAC~&cid=416165610.1399537988&tid=UA-2282690- 1&z=2140666386 5. The server reads the data in the image URL and stores the hit (e.g. pageview or event) for logging and processing Introduction to Google Analytics -@RubenMartinezS 6. The server responds with a single-pixel gif
  • 10. The 3 most important variables: t, cid and tid o t=pageview // Pageview hit type o cid=416165610.1399537988 // Anonymous Client ID o tid=UA-2282690-1 // Tracking Web property ID Introduction to Google Analytics -@RubenMartinezS
  • 11. Visualization of tags and scripts Introduction to Google Analytics -@RubenMartinezS The analytics.js JavaScript library uses a single cookie. The cookie contains an anonymous identifier used to distinguish users.
  • 12. analytics.js Google Analytics cookies By default, the analytics.js library sets cookies on the top level domain, excluding the leading dot, and sets the cookie path to the root level (/). The name of the cookies is _ga Note: The analytics.js library does not require setting cookies to transmit data to Google Analytics. Introduction to Google Analytics -@RubenMartinezS
  • 13. What you CAN do with Google Analytics • Track activity BEFORE pushing a brand new website or mobile app public • Report activity on private areas (protected by a login and/or disallowed to crawling bots) • Link to Adwords (CPC), GDN (CPM) and FDA (retargeting) • Associate engagement data from different devices and multiple sessions (great for attribution) • Upload transactional data of own userIDs if anonymized (great for e-commerce) • Integrate your Google Analytics data with other business applications, e.g. via API • Report activity across domains (tagging is however tedious and impractical) Introduction to Google Analytics -@RubenMartinezS
  • 14. What you CANNOT do with Google Analyics • Generate leads (post-click marketing). Google Analytics does not provide IP addresses or the name of the company visiting a website for instance – and you should not upload this information either • Upload personally identifiable information (see userIDs above) • Carry out experiments across multiple domains (cross domain reporting OK but not tests A/B) • Report –efficiently- inventory on e-commerce websites with SKUs Introduction to Google Analytics -@RubenMartinezS
  • 15. Metrics and dimensions Dimensions are attributes of • Visitors • Sessions • Hits: page, event The values of dimensions are strings. Metrics are counts (average integer or currencies). Values of metrics are numbers. Each custom dimension and metrics has an associated index. There is a maximum of 20 custom metrics and dimensions Introduction to Google Analytics -@RubenMartinezS
  • 16. Event hits Some user actions do not generate pageviews. - completion of individual form fields (“Send”) - external, mailto: and pdf links - video play or complete - AJAX, Flash, jQuery or HTML5 interactions You want to tag some HTML elements as events. Event tracking turns a normal <a href=“/documents/e-book.pdf”> into <a href=“/documents/e-book.pdf” onclick=”ga(‘send’,’event’,’link’,’pdf’)”> Introduction to Google Analytics -@RubenMartinezS
  • 17. Metrics and dimensions For example, if your page is scripted in PHP, the actual author of the page will probably be stored in a PHP variable like $author. In your PHP template, you can use this author variable to pass the author value to the custom dimension ga('send', 'pageview', { 'dimension5': '<?=$author?>' }); Introduction to Google Analytics -@RubenMartinezS
  • 18. Content Experiments based on a multi-armed bandit Introduction to Google Analytics -@RubenMartinezS approach
  • 19. Google Analytics Universal is user-centric Advertisers cannot track users as individuals anymore due to the proliferation of smartphones. Cookies reside in desktop browsers. Cookies are not used by mobile apps and browsers such as Safari on iphones. The identification of users and their sessions takes place now at server level on Universal, not browser/cookie level. Cookies are still used but Google warns that their format might change without warning. Hence developers should not directly access the cookie analytics.js sets as it could lead to script errors and incorrect data. Instead, developers should use the get command to retrieve the clientId value when needed. Here's how to do this: ga(function(tracker) { var clientId = tracker.get('clientId'); }); Introduction to Google Analytics -@RubenMartinezS
  • 20. clientId for cross-device attribution You can use a custom visitor ID based on customer email or ID in your database to merge smartphone / laptop / pc sessions into one cross-device session. You can track users who login to your website (authenticated users) by associating their clientID to their email. <?if ($isAuthenticatedUser):?> ga('create', 'UA-XXXX-Y', {'clientId': '<?=md5($email)?>' }); <?else:?> ga('create', 'UA-XXXX-Y'); <?endif;?> All users who sign in to your website will be tracked across all devices. GA uses cookie value + domain as a unique internal identifier. If two or more websites set up the same client ID value based on customer email, the data won't be corrupted, because they are using different domains (and different GA profile id). Introduction to Google Analytics -@RubenMartinezS
  • 21. Link your acquisitions, engagement, and conversions In a typical e-commerce scenario, you generate unique User_IDs through the authentication passed to an account at sign-in. The User ID will allow you to track for instance transactions and activity on per customer basis. To enable this feature, add the following line to your tracking code to send User-ID data to Google Analytics. ga('create', 'UA-XXXX-Y', { 'userId': 'USER_ID' }); ga('send', 'pageview'); where USER_ID is a string and represents the stable and unique ID retrieved from your system. You can then send anonymized data based on User_IDs to Google Analytics. Introduction to Google Analytics -@RubenMartinezS
  • 22. Thank you! If you enjoyed these slides or have suggestions to improve them, let us know! @rubenmartinezs