SlideShare a Scribd company logo
Using Custom Variables
with Google Analytics
Adrian Vender
SEO Manager & Analytics Consultant

@adrianvender




                                 CardinalPath.com
Who Are We?




   CardinalPath.com
Who loves
Analytics?

             CardinalPath.com
How You See Analytics

Don’t love            Love




                         CardinalPath.com
Hipster dog says…




         CardinalPath.com
Dimensions




  CardinalPath.com
setCustomVar
      _setCustomVar(index, name, value, opt_scope)


  •   index—The slot for the custom variable. (range from: 1 – 5)
  •   name—Key (string)
  •   value—Value (string)
  •   opt_scope—Scope: 1 (visitor-level), 2 (session-level), or 3 (page-
      level). Default = 1

pageTracker._setCustomVar(
   5,                    //   This custom var is set to slot #5
   ”Added Item to Cart", //   The name acts as a category for the user activity
   "Yes",                //   This value of the custom variable
   2                     //   Sets the scope to session-level
   );




                                                                  CardinalPath.com
Understanding Scope
                   Hometown=Austin,TX

         Visitor

Visits




                              Pageviews




                                        CardinalPath.com
Slot/Scope Restrictions
                Duration                   When sharing a slot       Number allowed
                                           with other variables
Page‐level      A single pageview,         The last page‐level       For any web property, many unique page‐
                event, or transaction      variable to be called     level variables can be set and slots can be 
                call.                      on a page is the one      re‐used. Limited only by the number of hits 
                                           applied to that page.     in a given session.
                                                                     For any single page, you can set up to 5 
                                                                     simultaneous custom variables.
Session‐level   The current session of     The last session‐level    For any web property, you can create as 
                the visitor.               variable called in a      many distinct session‐level custom 
                                           session is the one        variables as can be defined with a 64‐byte 
                                           used for that session.    key‐value pair limit.
                                                                     For any given user session, you can set up 
                                                                     to 5 session‐level variables.
Visitor‐level   The current session and    The last value set for    For any web property, you can create up to 
                all future sessions for    a visitor is the one      five distinct visitor‐level variables.
                the life of the visitor    applied to the current 
                cookie.                    and future sessions.

                                  Need more help?
   http://cutroni.com/blog/2011/05/18/mastering‐google‐analytics‐custom‐variables/


                                                                                        CardinalPath.com
Sending Custom Variables
‘Set’ a custom variable with _setCustomVar(), ‘send’ using a
   tracking GIF request.
<script>
_gaq.push([‘_setCustomVar’,1,’userType’,’Member’,2]);
…
…
…
_gaq.push([‘_trackEvent’,’memberAction’,’login’]);
</script>


Tip: Send events instead of Page-level vars if possible
(you can still segment by events!)




                                                          CardinalPath.com
Character Limits
The sum of the name-value pair of a custom variable must not
  exceed 64 bytes.

Example 1: “userType”:”member”
8 + 6 = 14 bytes



Example 2: “Hometown”:”Phoenix, AZ”
8 + 11 = 19 bytes
(*spaces and special characters each use a byte too!)




                                                        CardinalPath.com
Custom Var Reports… meh




               CardinalPath.com
Advanced Segments. #win!




                CardinalPath.com
Members vs Non-members


  <script type="text/javascript">
  _gaq.push(['_setCustomVar',1,'Vi
  sitor_Type','Member',1]);
  </script>




                      CardinalPath.com
Membership Types

<script type="text/javascript">
_gaq.push(['_setCustomVar’,2,'Member_Level',’Silver',1]);
</script>

<script type="text/javascript">
_gaq.push(['_setCustomVar',2,'Member_Level','Gold',1]);
</script>

<script type="text/javascript">
_gaq.push(['_setCustomVar',2,'Member_Level',’Platinum',1]);
</script>




                                                 CardinalPath.com
Logged In?




<script type="text/javascript">
_gaq.push(['_setCustomVar',3,'Member_Status'
,'Logged_In',2]);
</script>


                                 CardinalPath.com
Demographics




    CardinalPath.com
<form
onsubmit="_gaq.push(['_setCustomVar',1,'Gender',this.gender.o
ptions
[this.gender.selectedIndex].value,3);">
<select name="gender">
<option value="Female">Female</option>
<option value="Male">Male</option>
</select>




                                                 CardinalPath.com
Coupon Code




   CardinalPath.com
Previous Purchase?




<script type="text/javascript">
_gaq.push(['_setCustomVar',3,'Member_Status'
,’purchased',2]);
</script>

                                     CardinalPath.com
Author: Jalen Rose   Topic: Sports




                                     Type: Blog

                                     Geo: USA




                                       CardinalPath.com
Google Analytics integration -
                  Multivariate




    //Begin GA‐GWO integration Code
    if(typeof(utmx) !== 'undefined') { 
       var comboNum=utmx('combination');
       comboVal="combo"+comboNum;
       pageTracker._setCustomVar(2,"combo",comboVal,2);
    }
    //End GA‐GWO integration Code




                                 CardinalPath.com
Google Analytics integration




                   CardinalPath.com
Google Analytics integration
                                   – MVT
• Advanced Segments




                                CardinalPath.com
Search intent and user demographics




                       CardinalPath.com
Retaining original search term




                   CardinalPath.com
Retaining original search term




                   CardinalPath.com
Facebook Demographics




Do NOT store Personal Identifiable Information (PII)!


                                                        CardinalPath.com
Facebook Demographics




http://goo.gl/BlCMD


                         CardinalPath.com
Segmentation magic




         CardinalPath.com
CardinalPath.com
Shout outs


         CardinalPath.com
Thank you!
   @adrianvender




                   CardinalPath.com

More Related Content

Similar to Using Custom Variables in Google Analytics

Aspnet 4 new features
Aspnet 4 new featuresAspnet 4 new features
Aspnet 4 new features
Erkan BALABAN
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
Eric Steele
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status Codes
DeeptiJava
 
Benefits of Google Tag Manager
Benefits of Google Tag ManagerBenefits of Google Tag Manager
Benefits of Google Tag Manager
Phil Pearce
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
Exove
 
State management 1
State management 1State management 1
State management 1singhadarsh
 
Orbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case StudyOrbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case Study
Mark Meeker
 
Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables
Arunkumar Sundaram
 
Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...
Andreas Bovens
 
Java scipt
Java sciptJava scipt
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5Tieturi Oy
 
Plugins unplugged
Plugins unpluggedPlugins unplugged
Plugins unplugged
Christian Rokitta
 
JavaScript Basics with baby steps
JavaScript Basics with baby stepsJavaScript Basics with baby steps
JavaScript Basics with baby steps
Muhammad khurram khan
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
Tomasz Dziuda
 
Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)
Woonsan Ko
 
Frontend grote projecten
Frontend grote projectenFrontend grote projecten
Frontend grote projecten
Edwin Martin
 
Implementing Google Analytics in WordPress
Implementing Google Analytics in WordPressImplementing Google Analytics in WordPress
Implementing Google Analytics in WordPress
Julie Kosbab
 
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Chris Alfano
 

Similar to Using Custom Variables in Google Analytics (20)

Aspnet 4 new features
Aspnet 4 new featuresAspnet 4 new features
Aspnet 4 new features
 
Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status Codes
 
Benefits of Google Tag Manager
Benefits of Google Tag ManagerBenefits of Google Tag Manager
Benefits of Google Tag Manager
 
WordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a FrameworkWordPress Café: Using WordPress as a Framework
WordPress Café: Using WordPress as a Framework
 
State management 1
State management 1State management 1
State management 1
 
Orbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case StudyOrbitz and Spring Webflow Case Study
Orbitz and Spring Webflow Case Study
 
Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables Learn Adobe analytics basics - Traffic variables
Learn Adobe analytics basics - Traffic variables
 
Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...Responsive design: techniques and tricks to prepare your websites for the mul...
Responsive design: techniques and tricks to prepare your websites for the mul...
 
Java scipt
Java sciptJava scipt
Java scipt
 
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5TechDays 2013 Jari Kallonen: What's New WebForms 4.5
TechDays 2013 Jari Kallonen: What's New WebForms 4.5
 
Plugins unplugged
Plugins unpluggedPlugins unplugged
Plugins unplugged
 
JavaScript Basics with baby steps
JavaScript Basics with baby stepsJavaScript Basics with baby steps
JavaScript Basics with baby steps
 
WordCamp Praga 2015
WordCamp Praga 2015WordCamp Praga 2015
WordCamp Praga 2015
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
Relevance trilogy may dream be with you! (dec17)
Relevance trilogy  may dream be with you! (dec17)Relevance trilogy  may dream be with you! (dec17)
Relevance trilogy may dream be with you! (dec17)
 
Frontend grote projecten
Frontend grote projectenFrontend grote projecten
Frontend grote projecten
 
Implementing Google Analytics in WordPress
Implementing Google Analytics in WordPressImplementing Google Analytics in WordPress
Implementing Google Analytics in WordPress
 
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
 
Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011Jarv.us Showcase — SenchaCon 2011
Jarv.us Showcase — SenchaCon 2011
 

Recently uploaded

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
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
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
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
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
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
 
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
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
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
 
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
 

Recently uploaded (20)

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
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...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
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
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
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...
 
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
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
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...
 
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
 

Using Custom Variables in Google Analytics