Unit 3: Web Metrics & Analytics



Web Metrics & Analytics

Web metrics and analytics help businesses and website owners understand user behavior, optimize performance, and make data-driven decisions. Below are some common web metrics and analytics concepts explained in detail.

Hits

A hit is a request made to a web server for a file. Each element of a webpage (e.g., images, videos, CSS files, scripts) generates a separate hit. Example: A webpage with 10 images, 2 stylesheets, and 1 script will generate 13 hits in a single visit. Hits do not accurately measure website traffic, as they include requests for all resources, not just page views.

Page Views

A page view is counted every time a user loads or reloads a webpage. Example: If a user visits Page A, then Page B, then refreshes Page B, the total page views = 3. Used to measure how often a webpage is accessed, indicating content popularity.

Visits (Sessions)

A visit (or session) is a period of activity by a user on a website. A session starts when a user lands on a website and ends when they leave or become inactive for a set time (usually 30 minutes of inactivity). Example: If a user browses 5 pages within 10 minutes, it counts as 1 session. Helps in tracking user engagement and overall traffic.

Unique Page Views

A unique page view counts the number of users who visit a specific page at least once during a session. Unlike page views, multiple visits to the same page within a session are counted as 1 unique page view. Example: If a user visits Page A three times in a session, total page views = 3, but unique page views = 

Used to analyze distinct visits per page

Bounce

A bounce occurs when a user visits a page and leaves without interacting further (e.g., clicking a link, visiting another page). Example: A user lands on a blog post and leaves without reading another post or clicking a CTA. Indicates whether users find the landing page relevant.

Bounce Rate & Its Improvement

Bounce rate is the percentage of visitors who leave after viewing only one page.

Formula: Bounce Rate=(Single-page visits​/Total visits)×100

Example: If 100 users visit a webpage and 70 leave without interaction, bounce rate = 70%.

Ways to Improve Bounce Rate:

✅ Improve page load speed.

✅ Provide clear navigation and internal linking.

✅ Use engaging content with clear CTAs.

✅ Optimize for mobile responsiveness.

Average Time on Site

This metric tracks the average duration users spend on a website.

Formula: Avg. Time on Site = Total time spent by all visitors/Total visits​

A higher average time suggests engaging content, while a lower time may indicate poor usability or irrelevant content.

Real-Time Report

  • A real-time report in analytics tools like Google Analytics provides live data on website activity.
  • Shows active users, pages they are viewing, traffic sources, and geographic locations.
  • Useful for monitoring campaign performance and tracking traffic spikes instantly.

Traffic Source Report

This report shows how visitors find a website. Traffic sources include:

  • Organic Search – Users come via search engines (Google, Bing).
  • Direct Traffic – Users enter the URL directly in the browser.
  • Referral Traffic – Users arrive via links from other websites.
  • Social Media – Visitors from platforms like Facebook, Instagram, LinkedIn.
  • Paid Search – Visitors from Google Ads or PPC campaigns.

Understanding traffic sources helps in refining marketing strategies.

Custom Campaigns

Custom campaigns track marketing efforts using UTM (Urchin Tracking Module) parameters. Example: A UTM-tagged URL in an email campaign:


https://example.com?utm_source=email&utm_medium=newsletter&utm_campaign=summer_sale

Allows businesses to analyze specific campaign performance in Google Analytics.

Content Report

  • A content report provides insights into how individual pages perform.
  • Metrics include page views, bounce rate, average time on page, and exit rate.
  • Helps identify high-performing content and areas needing improvement.

Google Analytics

A free web analytics tool by Google that tracks website traffic and user behavior.

Key Features:

✅ Real-time tracking
✅ Audience demographics & behavior analysis
✅ Traffic source reports
✅ Goal tracking (e.g., form submissions, sales)
✅ Conversion rate optimization

In Short, Understanding these web metrics helps businesses analyze performance, improve user experience, and enhance digital marketing strategies. Google Analytics remains a powerful tool for measuring and optimizing website traffic.

Key Performance Indicator (KPI)

Key Performance Indicators (KPIs) are measurable values that indicate how effectively an individual, team, or organization is achieving its objectives. KPIs vary across industries and departments, helping businesses track progress and make data-driven decisions.

Need for KPIs

KPIs are essential for:

✅ Performance Tracking – Measuring progress toward goals.
✅ Decision Making – Providing data for strategic decisions.
✅ Accountability – Ensuring teams meet their targets.
✅ Continuous Improvement – Identifying areas for optimization.

Example: A retail company tracks sales revenue as a KPI to assess the effectiveness of its marketing and sales strategies.

Characteristics of KPIs

A well-defined KPI should follow the SMART criteria:


Web Metrics & Analytics

Perspectives of KPIs

KPIs are viewed from different perspectives based on business objectives. The Balanced Scorecard framework categorizes KPIs into four perspectives:

A. Financial Perspective

Focuses on financial performance and profitability.

Example KPIs:

  • Revenue Growth Rate – Measures increase in sales over time.
  • Gross Profit Margin – Assesses overall profitability.
  • Return on Investment (ROI) – Evaluates profitability of investments.

B. Customer Perspective

Measures customer satisfaction and loyalty.

Example KPIs:

  • Net Promoter Score (NPS) – Tracks customer satisfaction.
  • Customer Retention Rate – Measures repeat customers.
  • Customer Acquisition Cost (CAC) – Evaluates cost of acquiring a new customer.

C. Internal Business Process Perspective

Tracks efficiency and effectiveness of operations.

✅ Example KPIs:

  • Order Fulfillment Time – Measures how quickly orders are processed.
  • Product Defect Rate – Tracks product quality.
  • Inventory Turnover – Assesses stock management efficiency.

D. Learning & Growth Perspective

Focuses on employee development and innovation.

✅ Example KPIs:

  • Employee Productivity – Measures output per employee.
  • Training Completion Rate – Tracks employee skill development.
  • Innovation Rate – Assesses new product development.

Uses of KPIs

KPIs are used across industries and departments for various purposes:

Web Metrics & Analytics

Example: A SaaS company uses Customer Lifetime Value (CLV) as a KPI to measure the long-term revenue a customer brings to the company.

In Short, KPIs help businesses monitor progress, improve strategies, and achieve goals. A well-defined KPI should be SMART, aligned with business objectives, and regularly evaluated.

Graphs and Matrices in Networks

Graphs and matrices are fundamental tools for understanding networks. They help analyze relationships between individuals, communities, and larger systems. Below, we explore key concepts related to networks, including basic measures, random graphs, network evolution, and social context.

Basic Measures for Individuals and Networks

Networks consist of nodes (vertices) representing entities and edges (links) representing relationships between them. Various measures help analyze these networks.

A. Measures for Individuals (Nodes)

These metrics describe the importance and influence of a node in a network.


Web Metrics & Analytics

B. Measures for Networks (Global Properties)

These metrics describe the overall structure of a network.

Web Metrics & Analytics

Random Graphs & Network Evolution

A. Random Graphs

  • A random graph is a network where edges are formed randomly between nodes, following probability rules.
  • Introduced by ErdÅ‘s and Rényi in 1959.
  • Used to study emergent properties of large networks.
Example: Consider a social media network where people randomly send friend requests. If connections form with probability p, the graph will have some clusters but remain largely disorganized.

B. Network Evolution

Networks evolve over time due to growth and preferential attachment.

Web Metrics & Analytics

Social Context

Networks are shaped by social affiliations and identities.

A. Affiliation Networks

  • These networks describe relationships between individuals and groups.
  • Represented as bipartite graphs (two types of nodes: people and groups).
  • Used in organizational structures, academic collaborations, and social circles.
Example: A university network where students (nodes) are connected to clubs, courses, or study groups.

B. Identity in Networks

  • Identity influences how individuals interact and form relationships.
  • Defined by demographics, interests, or professional background.
  • Homophily: Tendency to form connections with similar people.
  • Heterophily: Interaction between diverse individuals.

Example: LinkedIn professional network: Users connect with others based on industry, skills, and work experience.

In Short, 

  • Graphs and matrices provide a framework for analyzing individual behaviors and network structures.
  • Random graphs model probabilistic connections, while network evolution explains growth patterns.
  • Affiliation and identity impact social interactions and community formation.

Web Analytics Tools

Web analytics tools help businesses analyze website performance, user behavior, and optimization strategies. Here, we discuss four essential tools: A/B testing, online surveys, web crawling, and indexing, explaining their significance with examples.

A/B Testing

A/B testing (split testing) is a method of comparing two versions of a webpage, email, or advertisement to determine which performs better.

How It  Works:

  • Two Variants – Create Version A (control) and Version B (variant) with one key difference (e.g., button color, headline, CTA).
  • Traffic Split – Users are randomly shown either version.
  • Performance Measurement – Track key metrics like click-through rate (CTR), conversion rate, bounce rate to identify the better version.
Example: An e-commerce website tests two versions of a "Buy Now" button:
✅ Version A – Red button with "Buy Now" text.
✅ Version B – Green button with "Get Yours Today."
Result: If Version B gets 15% more clicks, it is implemented site-wide.

Benefits of A/B Testing:

✔ Optimizes conversions and engagement.
✔ Reduces risk by testing changes before full implementation.
✔ Data-driven decision-making.

Online Surveys

Online surveys collect user feedback to understand customer satisfaction, pain points, and website usability.

How It Works:

  • Questionnaire Design – Includes multiple-choice, rating scales, and open-ended questions.
  • User Targeting – Sent via email, pop-ups, or embedded on websites.
  • Data Analysis – Responses are analyzed to improve customer experience.
Example: A SaaS company sends a post-purchase survey asking:
✅ "How satisfied are you with our software?" (Rating scale: 1-5)
✅ "What features would you like us to improve?" (Open-ended)
Result: Insights help refine the product and enhance customer satisfaction.

Benefits of Online Surveys

✔ Direct feedback from users.
✔ Helps identify usability issues.
✔ Assists in market research and product improvement.

Web Crawling

Web crawling is the automated process of scanning and collecting data from webpages using bots (crawlers or spiders).

How It Works

  • Crawlers Start from a Seed URL – A search engine bot (e.g., Googlebot) begins indexing from known websites.
  • Following Links – Crawlers discover new pages by following internal and external links.
  • Content Extraction – HTML, metadata, and keywords are stored in a database.
Example: Google uses Googlebot to crawl websites, collecting title tags, descriptions, and page content for indexing.

Benefits of Web Crawling:

✔ Enables search engines to discover new pages.
✔ Helps businesses track competitors (e.g., price monitoring).
✔ Supports data-driven SEO strategies.

Indexing

Indexing is the process of storing and organizing crawled web data so that it can be quickly retrieved by search engines.

How It Works:

  • Crawled Data Processing – Search engines analyze keywords, metadata, and page relevance.
  • Database Storage – Relevant pages are added to an index for future search queries.
  • Search Query Matching – When a user searches, indexed pages are ranked based on relevance and SEO factors.
Example: A blog post on "Best SEO Strategies" is crawled and indexed by Google. When someone searches "SEO strategies 2025," the indexed blog appears in search results.

Benefits of Indexing

✔ Improves website discoverability on search engines.
✔ Enables faster retrieval of search results.
✔ Enhances SEO rankings through structured data.

Conclusion

  • A/B testing, online surveys, web crawling, and indexing play a crucial role in web analytics:
  • A/B testing optimizes conversions.
  • Surveys gather user feedback.
  • Web crawling collects and analyzes data.
  • Indexing organizes information for search engines.

Natural Language Processing (NLP) 

Micro-text refers to short textual content such as tweets, SMS, chat messages, product reviews, and social media comments. These texts often contain abbreviations, slang, emojis, and informal language, making them challenging to analyze. NLP techniques help process and extract meaningful insights from micro-text data.

Text Preprocessing Techniques

Before analyzing micro-text, preprocessing is necessary to clean and standardize the data.

Web Metrics & Analytics

Named Entity Recognition (NER)

Identifies and classifies specific entities such as names, locations, brands, or dates in micro-text.
Example:
Input: "Apple's new iPhone is amazing! Available in NY soon."
Output:
  • Brand: Apple
  • Product: iPhone
  • Location: NY

Sentiment Analysis

Detects the emotional tone of micro-text (positive, negative, neutral).
Example:
"This movie is awesome!" → Positive
"Worst customer service ever!" → Negative
Techniques Used:
✔ Lexicon-based Analysis: Uses sentiment word dictionaries.
✔ Machine Learning Models: Uses classifiers like SVM, Naïve Bayes.
✔ Deep Learning (LSTMs, Transformers): Captures contextual meaning.

Hashtag & Keyword Extraction

Extracts important words or hashtags to understand trending topics.
Example:
Input: "Can't wait for #AIConference2025 in SF!"
Output:
  • Hashtag: #AIConference2025
  • Location: SF

Part-of-Speech (POS) Tagging

Labels words as nouns, verbs, adjectives, etc. to understand sentence structure.
Example:
Input: "Amazing product! Works perfectly."
Output:
  • "Amazing" → Adjective
  • "product" → Noun
  • "Works" → Verb

Text Summarization

Generates short summaries from long micro-text conversations (e.g., customer chat logs).
Example: Chat log: "Hey, do you have this in stock?" "Yes, available!"
Summary: "Customer inquired about stock availability."

Spam & Fake Review Detection

Identifies spam messages and fake reviews in micro-text.
Example: Spam Detection: "Win $1000 now! Click this link!" → Spam
Fake Review Detection: Reviews with too many generic praises or copied content are flagged as fake.

Text Classification

Categorizes micro-text into predefined topics (e.g., customer complaints, product feedback).
Example: Tweet: "I love my new sneakers! Super comfy."
Category: Product Review
In Short, NLP techniques help analyze micro-text efficiently by handling informal language, abbreviations, and emojis. They enable businesses to perform sentiment analysis, entity recognition, spam detection, and topic classification for better decision-making.