using custom variables in google analytics

33
CardinalPath.com Using Custom Variables with Google Analytics Adrian Vender SEO Manager & Analytics Consultant @adrianvender

Upload: adrian-vender

Post on 26-Jan-2015

108 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Using Custom Variables in Google Analytics

CardinalPath.com

Using Custom Variables with Google Analytics

Adrian VenderSEO Manager & Analytics Consultant

@adrianvender

Page 2: Using Custom Variables in Google Analytics

CardinalPath.com

Who Are We?

Page 3: Using Custom Variables in Google Analytics

CardinalPath.com

Who lovesAnalytics?

Page 4: Using Custom Variables in Google Analytics

CardinalPath.com

How You See Analytics

Don’t love Love

Page 5: Using Custom Variables in Google Analytics

CardinalPath.com

Hipster dog says…

Page 6: Using Custom Variables in Google Analytics

CardinalPath.com

Dimensions

Page 7: Using Custom Variables in Google Analytics

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 );

Page 8: Using Custom Variables in Google Analytics

CardinalPath.com

Understanding Scope

Visitor

Visits

Pageviews

Hometown=Austin,TX

Page 9: Using Custom Variables in Google Analytics

CardinalPath.com

Slot/Scope RestrictionsDuration When sharing a slot 

with other variablesNumber allowed

Page‐level A single pageview, event, or transaction call.

The last page‐level variable to be called on a page is the one applied to that page.

For any web property, many unique page‐level variables can be set and slots can be re‐used. Limited only by the number of hits in a given session.For any single page, you can set up to 5 simultaneous custom variables.

Session‐level The current session of the visitor.

The last session‐level variable called in a session is the one used for that session.

For any web property, you can create as many distinct session‐level custom variables as can be defined with a 64‐byte key‐value pair limit.For any given user session, you can set up to 5 session‐level variables.

Visitor‐level The current session and all future sessions for the life of the visitor cookie.

The last value set for a visitor is the one applied to the current and future sessions.

For any web property, you can create up to five distinct visitor‐level variables.

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

Page 10: Using Custom Variables in Google Analytics

CardinalPath.com

Sending Custom Variables‘Set’ a custom variable with _setCustomVar(), ‘send’ using a

tracking GIF request.

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

<script>_gaq.push([‘_setCustomVar’,1,’userType’,’Member’,2]);………_gaq.push([‘_trackEvent’,’memberAction’,’login’]);</script>

Page 11: Using Custom Variables in Google Analytics

CardinalPath.com

Character LimitsThe 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!)

Page 12: Using Custom Variables in Google Analytics

CardinalPath.com

Custom Var Reports… meh

Page 13: Using Custom Variables in Google Analytics

CardinalPath.com

Advanced Segments. #win!

Page 14: Using Custom Variables in Google Analytics

CardinalPath.com

Members vs Non-members

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

Page 15: Using Custom Variables in Google Analytics

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>

Page 16: Using Custom Variables in Google Analytics

CardinalPath.com

Logged In?

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

Page 17: Using Custom Variables in Google Analytics

CardinalPath.com

Demographics

Page 18: Using Custom Variables in Google Analytics

CardinalPath.com

<form onsubmit="_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>

Page 19: Using Custom Variables in Google Analytics

CardinalPath.com

Coupon Code

Page 20: Using Custom Variables in Google Analytics

CardinalPath.com

Previous Purchase?

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

Page 21: Using Custom Variables in Google Analytics

CardinalPath.com

Author: Jalen Rose Topic: Sports

Type: Blog

Geo: USA

Page 22: Using Custom Variables in Google Analytics

CardinalPath.com

Google Analytics integration -Multivariate

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

}//End GA‐GWO integration Code

Page 23: Using Custom Variables in Google Analytics

CardinalPath.com

Google Analytics integration

Page 24: Using Custom Variables in Google Analytics

CardinalPath.com

Google Analytics integration – MVT

• Advanced Segments

Page 25: Using Custom Variables in Google Analytics

CardinalPath.com

Search intent and user demographics

Page 26: Using Custom Variables in Google Analytics

CardinalPath.com

Retaining original search term

Page 27: Using Custom Variables in Google Analytics

CardinalPath.com

Retaining original search term

Page 28: Using Custom Variables in Google Analytics

CardinalPath.com

Facebook Demographics

Do NOT store Personal Identifiable Information (PII)!

Page 29: Using Custom Variables in Google Analytics

CardinalPath.com

Facebook Demographics

http://goo.gl/BlCMD

Page 30: Using Custom Variables in Google Analytics

CardinalPath.com

Segmentation magic

Page 31: Using Custom Variables in Google Analytics

CardinalPath.com

Page 32: Using Custom Variables in Google Analytics

CardinalPath.com

Shout outs

Page 33: Using Custom Variables in Google Analytics

CardinalPath.com

Thank you!@adrianvender