SlideShare a Scribd company logo
Crunching Cookies without
    Dropping Crumbs
       By Nikki Rae
       @analyticsgirl
Nikki Rae
• Managing Director Future Insight Analytics
  Ltd.
• Google Analytics Specialist
• First #brightonseo – 19th Feb 2010!!
• @analyticsgirl
Todays Session
•   What is a Cookie?
•   How can you tell if they are working properly?
•   What happens if they aren't working?
•   What is their role in cross domain tracking?
Why Do I Need to Know this?
– Many SEOs only view the Keyword report to
  look at
   • Visits to Keywords
   • Bounce Rate to Keywords
– How can I track keywords across sites?
– How can I make sure my tracking is
  working?
What is a Cookie?
• Cookies are used to help Google Analytics
  ‘remember’ what a user has done and how
  they have interacted with a website.
Ga.js Cookie Usage
• Which domain is being used?
   – Sub Domains?
   – Multiple Domains?
• Who is using the site?
• How many times have they visited the site?
• How did they get to the site?
• When did a visit start/end?
• Maintain visitor level custom variable
  information
Google Analytics Cookies
• 5 Main Cookies
  – _utma
  – _utmb
  – _utmc
  – _utmz
  – _utmv
Visitor Cookie
__utma       Expires 2 years from   Unique Site Visitor
             set/update
                                    1. If Cookie does not
                                       exist
                                         a. Must be first
                                             visit
                                         b. Cookie is set
                                    2. If cookie exists
                                         a. Must be
                                             return visit
                                         b. Cookie is
                                             updated
                                             every time
                                             data is sent
                                             to GA
Session Cookies
__utmb        Expires 30 mins from   Sessions/ Visits
              set/update
                                     1. If Cookie does not
                                        exist
                                          a. Must be a
                                              new
                                              session/visit
                                          b. Cookie is set
                                     2. If cookie exists
                                          a. Must be
                                              current visit
                                          b. Cookie is
                                              updated
                                              every time
                                              data is sent
                                              to GA
Session Cookies


_utmc        Expires End of    Not used in ga.js.
             Browser Session
Campaign Cookie
__utmz   Expires 6   Traffic Source
         months from
                     1. Source
         set/update
                     2. Medium
                     3. Campaign
                         Name
                     4. Campaign
                         Term

                      Cookie is
                      updated every
                      time data is
                      sent to GA
Custom Variable Cookie

  __utmv   2 years from   Visitor Level
           set/update     Custom Variable

                          1. Need to use
                             _setCustomVar
                             method

                           Cookie is updated
                          every time data is
                          sent to GA
Cookies Failing?
• Pages not tracked
• Traffic Sources/Mediums etc. incorrectly
  recorded e.g. PPC traffic showing as organic
• Cookies are device and browser based
  – One unique visitor per browser per device
  – Can misrepresent reality
Testing Tracking
• Download - https://chrome.google.com/webstore/detail/google-analytics-
  debugger/jnkmfdileelhofjcijamephohjechhna
Switch Debugger ON
• Switch it ON
Find Advanced Settings




• Click ‘Show Advanced Settings’
Click ‘Clear Browsing Data’




• Click ‘Clear Browsing Data’
Delete Cookies




• Delete Cookies from ‘beginning of time’
Go to your Site
• Go to your site via any medium
• Select CTRL-SHIFT-J
• This is the information that would be sent to Google Analytics
For Example…
• If you entered your site via a PPC Ad, and the
  following data appeared, you’d know it was
  not correctly tracked
• Most likely, not using auto-tagging or GA
  Manual Tagging
Gif Request Parameters
GA Debug.js
Viewing Cookies




• Back to ‘Advanced Settings’
Content Settings




• Then click ‘Content Settings’
All Cookies an Site Data




• Click ‘All Cookies and Site Data’
Google Analytics Cookies
Identifying Unique Visitors
_utma 209459845.1349019670.1365484756.1365484756.1365484756.1

1. Domain hash, unique for each domain
209459845.1349019670.1365484756.1365484756.1365484756.1

2. Unique Identifier
209459845.1349019670.1365484756.1365484756.1365484756.1

3. Timestamp for first time you visited the site
209459845.1349019670.1365484756.1365484756.1365484756.1

4. Timestamp for previous visit
209459845.1349019670.1365484756.1365484756.1365484756.1

5. Timestamp for start of current visit
209459845.1349019670.1365484756.1365484756.1365484756.1

6. Number of sessions
209459845.1349019670.1365484756.1365484756.1365484756.1
First Session
In last example, the Timestamp for
• 1st visit (1365484756)
• Previous Visit (1365484756)
• Current Visit (1365484756)

Are all the same as this is the first and only visit (number
of sessions=1)

The combination of Unique ID and timestamp of first visit
form a unique identifier that Google Analytics uses to
identify different visitors.
Session Identifiers
_utmb 209459845.5.10.1365484756
_utmc 209459845

1. Domain hash, unique for each domain
209459845.5.10.1365484756

2. Number of Pageviews in current session
209459845.5.10.1365484756

3. The 10 in the UTMB cookie starts at 10 on every site.
And each time you click on an outgoing link it will
count down until it reaches 0.
It’s part of some outgoing links tracking system in the ga.js
that never appeared in the GA interface (Andre Scholten)
209459845.5.10.1365484756

4. Timestamp for current session
209459845.5.10.1365484756
Campaign Identifiers
Campaign Identifiers
_utmz 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

1. Domain hash, unique for each domain
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

2. Timestamp when cookie was set
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

3. Session Number
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

4. Campaign Number – Number of different campaigns used to enter site
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

5. Campaign Source
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

6. Campaign Name
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

7. Campaign Medium
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)

8. Campaign Terms
209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)
Customisation
• _setDomainName – Sets the domain to which all
  cookies will be set.
• _setVisitorCookieTimeout – Sets the Google
  Analytics visitor cookie expiration in milliseconds.
• _setSessionCookieTimeout – Sets the new session
  cookie timeout in milliseconds.
• _setCampaignCookieTimeout – Sets the campaign
  tracking cookie expiration time in milliseconds.
First Party Cookies
• Can only be used by the website that sets the
  Cookies
• Can be overridden for sub domain and cross
  domain tracking
Cross Domain Tracking
• www.toystore.com sets the GA Cookies
• They want to be used by blog.toystore.com
• They want to be used by www.bookstore.com

                                 www.toystore.com




             blog.toystore.com                      www.bookstore.com
Cross Domain Tracking
• Force GA into seeing blog.toystore.com and
  www.bookstore.com as the same site as
  www.toystore.com to share cookies


                                  www.toystore.com




              blog.toystore.com                      www.bookstore.com
Sub Domain Tracking
• Out of the box, GA sees the below as two separate
  domains
• Use _gaq.push(['_setDomainName', 'toystore.com']);




          www.toystore.com    blog.toystore.com
Cross Domain Tracking
• Use _gaq.push(['_setDomainName', ‘toystore.com']);
_gaq.push(['_setAllowLinker', true]);
                              linker




           www.toystore.com            www.bookstore.com




• Use Linker Method e.g. <a href="http://www.bookstore.com"
    onclick="_gaq.push(['_link',
'http://www.bookstore.com']); return false;">Book Store</a>
Hostname Filter
•   Filter Type: Custom filter > Advanced
•   Field A: Hostname Extract A : (.*)
•   Field B: Request URI
•   Extract: (.*)
•   Output To: Request URI
•   Constructor: $A1$B1
Goal Reports etc.
• Be Careful!
  – Goals will also need hostname in as well as
    pagename e.g. www.bookstore.com/index.php
    rather than just index.php
Summary
• Cookies help to
  – Differentiate one user from another
  – Determine a relationship between sequential
    pages
  – Can only be used by the website that sets them
    unless you configure your tracking code
  – Do not collect any personal information
  – Can misrepresent real life (unique
    visitors, deletion, unacceptance)
The End
References
• http://devblog.springest.com/anatomy-of-
  google-analytics-cookies
• http://andrescholten.net/
• https://developers.google.com/analytics/devg
  uides/collection/analyticsjs/cookie-usage
• https://developers.google.com/analytics/devg
  uides/collection/gajs/gaTrackingSite
• http://bit.ly/GATrouble
Visits/Sessions Ending?
More than 30 minutes have elapsed between pageviews for a
single visitor.

At the end of a day.

When any traffic source value for the user changes. Traffic
source information
includes:utm_source, utm_medium, utm_term, utm_content,
utm_id, utm_campaign, and gclid.
As before, if any of these events occur, then the next
pageview from the user will be the start of a new session.

More Related Content

Viewers also liked

Seo - Search Engine Optimization seminar
Seo - Search Engine Optimization seminarSeo - Search Engine Optimization seminar
Seo - Search Engine Optimization seminar
cooljeba
 
Understanding the law on cookies
Understanding the law on cookiesUnderstanding the law on cookies
Understanding the law on cookies
MPS & BBI International Limited
 
Web Cookies
Web CookiesWeb Cookies
Web Cookiesapwebco
 
Role of Automation in Testing
Role of Automation in TestingRole of Automation in Testing
Role of Automation in Testing
Anand Bagmar
 
Google Analytics Basics
Google Analytics BasicsGoogle Analytics Basics
Google Analytics Basics
Amish Keshwani
 
Kony - End-to-End Proof of Technology
Kony - End-to-End Proof of TechnologyKony - End-to-End Proof of Technology
Kony - End-to-End Proof of TechnologyDipesh Mukerji
 
What Is SEO? A Guide to Search Engine Optimization
What Is SEO? A Guide to Search Engine OptimizationWhat Is SEO? A Guide to Search Engine Optimization
What Is SEO? A Guide to Search Engine Optimization
Will Marlow Agency
 
Why Scala Is Taking Over the Big Data World
Why Scala Is Taking Over the Big Data WorldWhy Scala Is Taking Over the Big Data World
Why Scala Is Taking Over the Big Data World
Dean Wampler
 
CQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDDCQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDD
Dennis Doomen
 
Google Analytics
Google AnalyticsGoogle Analytics
Google Analytics
Rohan Dighe
 
Introduction to SEO Presentation
Introduction to SEO PresentationIntroduction to SEO Presentation
Introduction to SEO Presentation
7thingsmedia
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...
Christopher Bradley
 
Basic SEO Presentation
Basic SEO PresentationBasic SEO Presentation
Basic SEO Presentation
Paul Kortman
 
SEO PPT
SEO PPTSEO PPT
SEO PPT
princebhola
 
Search Engine Optimization PPT
Search Engine Optimization PPT Search Engine Optimization PPT
Search Engine Optimization PPT
Kranthi Shaik
 
Introduction to SEO
Introduction to SEOIntroduction to SEO
Introduction to SEO
Rand Fishkin
 
The History of SEO
The History of SEOThe History of SEO
The History of SEO
HubSpot
 

Viewers also liked (17)

Seo - Search Engine Optimization seminar
Seo - Search Engine Optimization seminarSeo - Search Engine Optimization seminar
Seo - Search Engine Optimization seminar
 
Understanding the law on cookies
Understanding the law on cookiesUnderstanding the law on cookies
Understanding the law on cookies
 
Web Cookies
Web CookiesWeb Cookies
Web Cookies
 
Role of Automation in Testing
Role of Automation in TestingRole of Automation in Testing
Role of Automation in Testing
 
Google Analytics Basics
Google Analytics BasicsGoogle Analytics Basics
Google Analytics Basics
 
Kony - End-to-End Proof of Technology
Kony - End-to-End Proof of TechnologyKony - End-to-End Proof of Technology
Kony - End-to-End Proof of Technology
 
What Is SEO? A Guide to Search Engine Optimization
What Is SEO? A Guide to Search Engine OptimizationWhat Is SEO? A Guide to Search Engine Optimization
What Is SEO? A Guide to Search Engine Optimization
 
Why Scala Is Taking Over the Big Data World
Why Scala Is Taking Over the Big Data WorldWhy Scala Is Taking Over the Big Data World
Why Scala Is Taking Over the Big Data World
 
CQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDDCQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDD
 
Google Analytics
Google AnalyticsGoogle Analytics
Google Analytics
 
Introduction to SEO Presentation
Introduction to SEO PresentationIntroduction to SEO Presentation
Introduction to SEO Presentation
 
How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...How to identify the correct Master Data subject areas & tooling for your MDM...
How to identify the correct Master Data subject areas & tooling for your MDM...
 
Basic SEO Presentation
Basic SEO PresentationBasic SEO Presentation
Basic SEO Presentation
 
SEO PPT
SEO PPTSEO PPT
SEO PPT
 
Search Engine Optimization PPT
Search Engine Optimization PPT Search Engine Optimization PPT
Search Engine Optimization PPT
 
Introduction to SEO
Introduction to SEOIntroduction to SEO
Introduction to SEO
 
The History of SEO
The History of SEOThe History of SEO
The History of SEO
 

Recently uploaded

Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

Google Analytics Cookies

  • 1. Crunching Cookies without Dropping Crumbs By Nikki Rae @analyticsgirl
  • 2. Nikki Rae • Managing Director Future Insight Analytics Ltd. • Google Analytics Specialist • First #brightonseo – 19th Feb 2010!! • @analyticsgirl
  • 3. Todays Session • What is a Cookie? • How can you tell if they are working properly? • What happens if they aren't working? • What is their role in cross domain tracking?
  • 4. Why Do I Need to Know this? – Many SEOs only view the Keyword report to look at • Visits to Keywords • Bounce Rate to Keywords – How can I track keywords across sites? – How can I make sure my tracking is working?
  • 5. What is a Cookie? • Cookies are used to help Google Analytics ‘remember’ what a user has done and how they have interacted with a website.
  • 6. Ga.js Cookie Usage • Which domain is being used? – Sub Domains? – Multiple Domains? • Who is using the site? • How many times have they visited the site? • How did they get to the site? • When did a visit start/end? • Maintain visitor level custom variable information
  • 7. Google Analytics Cookies • 5 Main Cookies – _utma – _utmb – _utmc – _utmz – _utmv
  • 8. Visitor Cookie __utma Expires 2 years from Unique Site Visitor set/update 1. If Cookie does not exist a. Must be first visit b. Cookie is set 2. If cookie exists a. Must be return visit b. Cookie is updated every time data is sent to GA
  • 9. Session Cookies __utmb Expires 30 mins from Sessions/ Visits set/update 1. If Cookie does not exist a. Must be a new session/visit b. Cookie is set 2. If cookie exists a. Must be current visit b. Cookie is updated every time data is sent to GA
  • 10. Session Cookies _utmc Expires End of Not used in ga.js. Browser Session
  • 11. Campaign Cookie __utmz Expires 6 Traffic Source months from 1. Source set/update 2. Medium 3. Campaign Name 4. Campaign Term Cookie is updated every time data is sent to GA
  • 12. Custom Variable Cookie __utmv 2 years from Visitor Level set/update Custom Variable 1. Need to use _setCustomVar method Cookie is updated every time data is sent to GA
  • 13. Cookies Failing? • Pages not tracked • Traffic Sources/Mediums etc. incorrectly recorded e.g. PPC traffic showing as organic • Cookies are device and browser based – One unique visitor per browser per device – Can misrepresent reality
  • 14. Testing Tracking • Download - https://chrome.google.com/webstore/detail/google-analytics- debugger/jnkmfdileelhofjcijamephohjechhna
  • 15. Switch Debugger ON • Switch it ON
  • 16. Find Advanced Settings • Click ‘Show Advanced Settings’
  • 17. Click ‘Clear Browsing Data’ • Click ‘Clear Browsing Data’
  • 18. Delete Cookies • Delete Cookies from ‘beginning of time’
  • 19. Go to your Site • Go to your site via any medium • Select CTRL-SHIFT-J • This is the information that would be sent to Google Analytics
  • 20. For Example… • If you entered your site via a PPC Ad, and the following data appeared, you’d know it was not correctly tracked • Most likely, not using auto-tagging or GA Manual Tagging
  • 23. Viewing Cookies • Back to ‘Advanced Settings’
  • 24. Content Settings • Then click ‘Content Settings’
  • 25. All Cookies an Site Data • Click ‘All Cookies and Site Data’
  • 27. Identifying Unique Visitors _utma 209459845.1349019670.1365484756.1365484756.1365484756.1 1. Domain hash, unique for each domain 209459845.1349019670.1365484756.1365484756.1365484756.1 2. Unique Identifier 209459845.1349019670.1365484756.1365484756.1365484756.1 3. Timestamp for first time you visited the site 209459845.1349019670.1365484756.1365484756.1365484756.1 4. Timestamp for previous visit 209459845.1349019670.1365484756.1365484756.1365484756.1 5. Timestamp for start of current visit 209459845.1349019670.1365484756.1365484756.1365484756.1 6. Number of sessions 209459845.1349019670.1365484756.1365484756.1365484756.1
  • 28. First Session In last example, the Timestamp for • 1st visit (1365484756) • Previous Visit (1365484756) • Current Visit (1365484756) Are all the same as this is the first and only visit (number of sessions=1) The combination of Unique ID and timestamp of first visit form a unique identifier that Google Analytics uses to identify different visitors.
  • 29. Session Identifiers _utmb 209459845.5.10.1365484756 _utmc 209459845 1. Domain hash, unique for each domain 209459845.5.10.1365484756 2. Number of Pageviews in current session 209459845.5.10.1365484756 3. The 10 in the UTMB cookie starts at 10 on every site. And each time you click on an outgoing link it will count down until it reaches 0. It’s part of some outgoing links tracking system in the ga.js that never appeared in the GA interface (Andre Scholten) 209459845.5.10.1365484756 4. Timestamp for current session 209459845.5.10.1365484756
  • 31. Campaign Identifiers _utmz 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 1. Domain hash, unique for each domain 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 2. Timestamp when cookie was set 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 3. Session Number 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 4. Campaign Number – Number of different campaigns used to enter site 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 5. Campaign Source 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 6. Campaign Name 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 7. Campaign Medium 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided) 8. Campaign Terms 209459845.1365484756.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)
  • 32. Customisation • _setDomainName – Sets the domain to which all cookies will be set. • _setVisitorCookieTimeout – Sets the Google Analytics visitor cookie expiration in milliseconds. • _setSessionCookieTimeout – Sets the new session cookie timeout in milliseconds. • _setCampaignCookieTimeout – Sets the campaign tracking cookie expiration time in milliseconds.
  • 33. First Party Cookies • Can only be used by the website that sets the Cookies • Can be overridden for sub domain and cross domain tracking
  • 34. Cross Domain Tracking • www.toystore.com sets the GA Cookies • They want to be used by blog.toystore.com • They want to be used by www.bookstore.com www.toystore.com blog.toystore.com www.bookstore.com
  • 35. Cross Domain Tracking • Force GA into seeing blog.toystore.com and www.bookstore.com as the same site as www.toystore.com to share cookies www.toystore.com blog.toystore.com www.bookstore.com
  • 36. Sub Domain Tracking • Out of the box, GA sees the below as two separate domains • Use _gaq.push(['_setDomainName', 'toystore.com']); www.toystore.com blog.toystore.com
  • 37. Cross Domain Tracking • Use _gaq.push(['_setDomainName', ‘toystore.com']); _gaq.push(['_setAllowLinker', true]); linker www.toystore.com www.bookstore.com • Use Linker Method e.g. <a href="http://www.bookstore.com" onclick="_gaq.push(['_link', 'http://www.bookstore.com']); return false;">Book Store</a>
  • 38. Hostname Filter • Filter Type: Custom filter > Advanced • Field A: Hostname Extract A : (.*) • Field B: Request URI • Extract: (.*) • Output To: Request URI • Constructor: $A1$B1
  • 39. Goal Reports etc. • Be Careful! – Goals will also need hostname in as well as pagename e.g. www.bookstore.com/index.php rather than just index.php
  • 40. Summary • Cookies help to – Differentiate one user from another – Determine a relationship between sequential pages – Can only be used by the website that sets them unless you configure your tracking code – Do not collect any personal information – Can misrepresent real life (unique visitors, deletion, unacceptance)
  • 42. References • http://devblog.springest.com/anatomy-of- google-analytics-cookies • http://andrescholten.net/ • https://developers.google.com/analytics/devg uides/collection/analyticsjs/cookie-usage • https://developers.google.com/analytics/devg uides/collection/gajs/gaTrackingSite • http://bit.ly/GATrouble
  • 43. Visits/Sessions Ending? More than 30 minutes have elapsed between pageviews for a single visitor. At the end of a day. When any traffic source value for the user changes. Traffic source information includes:utm_source, utm_medium, utm_term, utm_content, utm_id, utm_campaign, and gclid. As before, if any of these events occur, then the next pageview from the user will be the start of a new session.