+ All Categories
Home > Education > An introduction-to-google-analytics-1198701588721690-4

An introduction-to-google-analytics-1198701588721690-4

Date post: 21-Aug-2015
Category:
Upload: jerry-wijaya
View: 1,385 times
Download: 0 times
Share this document with a friend
83
Google Analytics Joris Roebben ([email protected] ) Tom Michiels ([email protected] ) www.queromedia.com
Transcript

Google Analytics

Joris Roebben ([email protected])Tom Michiels ([email protected])

www.queromedia.com

1. Introduction

What is Google Analytics?

urchin.js

GA.js

2004

2005

2007

Conventions

• GA = Google Analytics• GATC = Google Analytics Tracking

Code

Google Analytics advantages

• Free• Sufficiant possibilities for most

companies• Easy to implement• Easy to use• Easy to understand

Google Analytics disadvantages

• URL and title based• No data history• Privacy ?• JavaScript and cookies• Only visitors, no crawlers or bots

2. Google Analytics interface

• Dashboard• Add / remove

elements• Personalized

Calendar

Reporting

• XML• PDF• CSV• TSV

• Send now• Schedule

3. Setup Google Analytics

• Create Google Account

• Free• No spam• Gmail = OK

Best practice for GA accounts

• Create GA account on [email protected]

• Add [email protected] as administrator

• Add [email protected] as reviewer

• Advantage: structure

Sign up

• Login• Create GA account

Get the GATC

• Google Analytics Tracking Code• Old vs. New one• urchin.js vs. GA.js

urchin.js

• Old code• Can still be used

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-123456-1";urchinTracker();</script></body></html>

GA.js

• New code• New features not yet available

<script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write("\<script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );</script><script type="text/javascript">var pageTracker = _gat._getTracker("UA-123456-1");pageTracker._initData();pageTracker._trackPaginaweergave();</script></body></html>

Host your own GATC

• Possible• Not advised

<script src="http://www.mydomain.com/mytrackingcode.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-123456-1";urchinTracker();</script>

Check your installation

• Put code just before </body>• Loads pages faster• No problem if GA offline

Easy implementation

• All HTML-files: lot of work• Dynamic site: look for footer

inclusion• CMS: look for templates

• Put GATC on ALL pages !!!• Correct data = essential

Access manager

• Give access to GA account• Must be Google account• Administrator or View Reports only

Add user

4. Adding AdWords to Google Analytics

• Use GA in AdWords interface• AdWords reports in GA

Step 1: check GATC

• Make sure every page on website is tagged with GATC

Step 2: Login to Google AdWords

• www.google.com/adwords as Administrator

Step 3: Tab Analytics

• Click on the tab Analytics

Step 4: Link to existing GA account

Step 5: Account preferences

• Make sure auto-tagging is on !

5. Profiles and Filters

• Are the real strength of GA• Segment data• Deep analysis• Depending on needs• Start collecting data when created

Best practices

• Profile with ALL data• Testing profile

Data needed for profile

• Website URL• Profile Name• Time Zone• Default Page• Exclude parameters• E-commerce

website• Search

GATC for different profiles

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-123456-1";urchinTracker();</script>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-123456-2";urchinTracker();</script>

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-654321-1";urchinTracker();</script>

Filters

• Applied to profile• Change data (forever!)• Segmentation• Business rules• 2 sorts: predefined and

custom• Test profile

How do filters work?

3 components• Filter Type• Filter Fields• Filter PatternFilter data before

submitting it to GA DB

Multiple filters

• No problem• Multiple filters applied to data• Data output filter 1 is input filter 2• Be careful !!!• Wrong conclusions

Filterfields

• 37 fields• Field = pageview attribute• Regular fields and user defined fields• Regular: request URI, hostname, referral,

page title, browser, IP address,...• User defined: campaign name, source,

campaign term, e-commerce variables,...

Possible values for Filterfields

• Check GA reports !!!• Lists not yet available

Filter Patterns

• Pattern is applied to filterfield• If ok, data registered• If not ok, data neglected• Build patterns using RegEx• RegEx = set of characters,

representative for bigger set of data

Filter Type

• 10 different types• 3 predefined• 7 custom

5.1 Exclude all traffic from a domain

5.2 Exclude all traffic from an IP address

IP ranges with RegEx !!!

5.3 Include only traffic to a subdirectory

5.4 Include / Exclude filter (1)

5.4 Include / Exclude filter (2)

5.4 Include / Exclude filter (3)

5.5 Search and replace filter (1)

5.5 Search and replace filter (2)

• No RegEx !!!• Changes data !!!

5.6 Uppercase / Lowercase filter

5.7 Lookup table filter

• Not available in GA• Only old Urchin customers• ~Search and replace filter• Text file

5.8 Advanced filters

• Change data fields• By combining elements• 2 filter fields: Field A and Field B• Extract field = Constructor• RegEx !!!

Examples of advanced filters (1)

Examples of advanced filters (2)

6. Custom segmentation

• Segment data• _utmv cookie• JavaScript function _utmSetVar()• On pages tagged with GATC• Applied to HTML attributes as

onLoad(), onChange(), onSubmit()• Only 1 cookie per visitor (website)

Custom segmentation example

Custom segmentation code

• Everyone = visitor (“not set”)• When registered = member• When completed buy = customer• Report: Visitors > User defined

<body onLoad=”javascript:_utmSetVar(‘member’);”>

<body onLoad=”javascript:_utmSetVar(‘customer’);”>

User Defined Values

RegEx

Regular expressions are used to match or capture portions of a field using wildcards and metacharacters. They are often used for text manipulation tasks.

Most of the filters included in Google Analytics use these expressions to match the data and perform an action when a match is achieved. For instance, an exclude

filter is designed to exclude the hit if the regular expression in the filter matches the data contained in the field specified by the filter.

Regular expressions are text strings that contain characters, numbers, and wildcards. Note that these wildcard characters can be used literally by escaping

them with a backslash '\'. For example, when entering www.google.com, escape the periods with a backslash: www\.google\.com

RegEx

. match any single character* match zero or more of the previous items+ match one or more of the previous items? match zero or one of the previous items() remember contents of parenthesis as item[] match one item in this list- create a range in a list| or^ match to the beginning of the field$ match to the end of the field\ escape any of the above

More: http://en.wikipedia.org/wiki/Regex

7. Goals

• Conversions ?• Conversion rate• Reports• Success of site• “Thank you” page• Max. 4 per profile• Contact – buy – download - register

Setting up goals

Goals howto

• Match type• Goal value• Choose good name• Unique “thank you” page per conversion• Keep track of filters

Goals visualisation (1)

Goals visualisation (2)

Funnels

• Extension of goals• Predefined steps• Track conversion process• Required steps ?

Funnel visualisation

8. E-commerce tracking

• Not accounting• Use it to find trends• No absolute figures !!!

Implementing E-commerce tracking

• Activate E-commerce tracking in profile

• Add code below GATC• Extra reports• Data from transaction needs to be

transfered to GA• 1 Transaction• Multiple items• urchin.js vs. GA.js

E-commerce for urchin.js

<form style="display:none;" name="utmform"><textarea id="utmtrans">UTM:T|[order-id]|[affiliation]|[total]|[tax]|[shipping]|[city]|[state]|[country]UTM:I|[order-id]|[sku/code]|[productname]|[category]|[price]|[quantity]UTM:I|[order-id]|[sku/code]|[productname]|[category]|[price]|[quantity]</textarea></form>

E-commerce for GA.js<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script><script type="text/javascript"> var pageTracker = _gat._getTracker("UA-XXXXX-1"); pageTracker._initData(); pageTracker._addTrans( "1234", // Order ID "partner", // Affiliation "2500.25", // Total "200.25", // Tax "3", // Shipping "Brussels", // City "Brabant", // State "Belgium" // Country ); pageTracker._addItem( "1234", // Order ID "MTB25", // SKU "Mountainbike", // Product Name "Off-road", // Category "1500", // Price "1" // Quantity ); pageTracker._addItem( "1234", // Order ID "MTB44", // SKU "Mountainbike", // Product Name "Cross", // Category "1000.25", // Price "1" // Quantity ); pageTracker._trackTrans();</script>

Complete process

E-commerce reports

E-commerce reports

E-commerce reports

E-commerce reports

9. Tips & Tricks: Site Search

Tips & Tricks: Event tracking

• Downloads, clicks, ...• Urchintracker() generates pageview• Pageviews in reports• Naming !

<a href="http://www.webiste.com/pdf/document1.pdf" onClick="javascript:urchinTracker('/pdf/document1');">

Tips & Tricks: Multi-domain tracking

• Website on multiple domains• Most often used for external checkout• Transfer content of first party cookies

to other domain• urchin.js vs. GA.js

Multi-domain tracking urchin.js (1)

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct="UA-xxxx-x"; _udn="none"; _ulink=1; urchinTracker(); </script>

• Change GATC

Multi-domain tracking urchin.js (2)

• Change cross-domain links<a href="https://www.secondsite.com/?login=parameters">Log in Now</a>

<script type="text/javascript"> document.write('<a href="javascript:__utmLinker(\' https://www.secondsite.com/?login=parameters\');">Log in Now</a>'); </script> <noscript> <a href=" https://www.secondsite.com/?login=parameters ">Log in Now</a> </noscript>

Multi-domain tracking GA.js (1)

• Change GATC

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? " https://ssl." : "http://www."); document.write("\<script src='" + gaJsHost + "google-analytics.com/ga.js ' type='text/javascript'>\<\/script>" ); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-12345-1"); pageTracker._setDomainName("none"); pageTracker._setAllowLinker(true); pageTracker._initData(); pageTracker._trackPaginaweergave(); </script>

Multi-domain tracking GA.js (2)

• Change cross-domain links<a href="https://www.secondsite.com/?login=parameters">Log in Now</a>

<script type="text/javascript"> document.write(‘<a href="javascript:pageTracker._link(\'https://www.secondsite.com/?login=parameters\');">Log in Now</a>'' );</script><noscript> <a href="https://www.secondsite.com/?login=parameters">Log in Now</a> </noscript>

Tips & Tricks: Tracking outbound links

• Creating pageviews• Using UrchinTracker()• Pageviews in reports• Naming !

<a href="http://www.otherdomain.com" onClick="javascript:urchinTracker('/outbound/otherdomain');">

Tips & Tricks: Tagging inbound links

http://www.website.com/pagina.html

http://www.website.com/pagina.html?utm_source=partner&utm_medium=banner&utm_campaign=nl&utm_term=zoekwoord

• Adjust cookies• ~Google AdWords auto-tagging• Not all parameters are required

10. Conclusion

11. Roundup

1. Create a Google Analytics account.2. Analyze the website.3. Create and Configure profiles.

a) Create filters.b) Create goals and funnels.c) Create recommended profiles.

4. Edit the tracking code.5. Modify the web site.6. Add the tracking code to web site pages.7. Tag marketing campaigns.8. Enable e-commerce transaction tracking.9. Implement custom segmentation.10. Configure other administrative features.

a) User accounts and report access.b) Automated email report delivery.

12. Q & A


Recommended