Using Custom Variables in Google Analytics
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
1,908
On Slideshare
1,908
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
14
Comments
1
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Using Custom Variableswith Google AnalyticsAdrian VenderSEO Manager & Analytics Consultant@adrianvender CardinalPath.com
  • 2. Who Are We? CardinalPath.com
  • 3. Who lovesAnalytics? CardinalPath.com
  • 4. How You See AnalyticsDon’t love Love CardinalPath.com
  • 5. Hipster dog says… CardinalPath.com
  • 6. Dimensions CardinalPath.com
  • 7. 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 = 1pageTracker._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
  • 8. Understanding Scope Hometown=Austin,TX VisitorVisits Pageviews CardinalPath.com
  • 9. Slot/Scope Restrictions Duration When sharing a slot  Number allowed with other variablesPage‐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
  • 10. 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
  • 11. Character LimitsThe sum of the name-value pair of a custom variable must not exceed 64 bytes.Example 1: “userType”:”member”8 + 6 = 14 bytesExample 2: “Hometown”:”Phoenix, AZ”8 + 11 = 19 bytes(*spaces and special characters each use a byte too!) CardinalPath.com
  • 12. Custom Var Reports… meh CardinalPath.com
  • 13. Advanced Segments. #win! CardinalPath.com
  • 14. Members vs Non-members <script type="text/javascript"> _gaq.push([_setCustomVar,1,Vi sitor_Type,Member,1]); </script> CardinalPath.com
  • 15. 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
  • 16. Logged In?<script type="text/javascript">_gaq.push([_setCustomVar,3,Member_Status,Logged_In,2]);</script> CardinalPath.com
  • 17. Demographics CardinalPath.com
  • 18. <formonsubmit="_gaq.push([_setCustomVar,1,Gender,this.gender.options[this.gender.selectedIndex].value,3);"><select name="gender"><option value="Female">Female</option><option value="Male">Male</option></select> CardinalPath.com
  • 19. Coupon Code CardinalPath.com
  • 20. Previous Purchase?<script type="text/javascript">_gaq.push([_setCustomVar,3,Member_Status,’purchased,2]);</script> CardinalPath.com
  • 21. Author: Jalen Rose Topic: Sports Type: Blog Geo: USA CardinalPath.com
  • 22. 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
  • 23. Google Analytics integration CardinalPath.com
  • 24. Google Analytics integration – MVT• Advanced Segments CardinalPath.com
  • 25. Search intent and user demographics CardinalPath.com
  • 26. Retaining original search term CardinalPath.com
  • 27. Retaining original search term CardinalPath.com
  • 28. Facebook DemographicsDo NOT store Personal Identifiable Information (PII)! CardinalPath.com
  • 29. Facebook Demographicshttp://goo.gl/BlCMD CardinalPath.com
  • 30. Segmentation magic CardinalPath.com
  • 31. CardinalPath.com
  • 32. Shout outs CardinalPath.com
  • 33. Thank you! @adrianvender CardinalPath.com