Web Analytics and Information Retrieval (IR)
This unit covers:
- Web Analytics
- Metrics
- KPIs
- User Behaviour Analysis
- Information Retrieval (IR)
- Indexing
- Querying
- Ranking
- Web Data Sources
- Server Logs
- APIs
- Clickstreams
- Components of IR Systems
- Document Representation
- Retrieval Models
- Applications of IR
- Search Engines
- Digital Marketing
- User Behaviour Analysis
1. WEB ANALYTICS
Web Analytics is the process of collecting, measuring, analyzing, and reporting website data to understand user behavior and improve website performance.
Real-Life Example
An online shopping website wants to know:
- How many visitors visit daily?
- Which products are viewed most?
- Why customers leave without purchasing?
Web analytics helps answer these questions.
A. Metrics
Metrics are measurable quantities used to track website performance.
Common Web Analytics Metrics
| Metric | Meaning |
|---|---|
| Page Views | Number of pages viewed |
| Users | Number of unique visitors |
| Sessions | Number of visits |
| Bounce Rate | Percentage leaving after one page |
| Average Session Duration | Average time spent on website |
| Conversion Rate | Percentage completing desired action |
Example
Suppose a website receives:
- 1000 visitors
- 2000 page views
Average Pages per Visitor:
2000/1000=2
Each visitor viewed 2 pages on average.
B. KPIs (Key Performance Indicators)
KPIs are strategic metrics used to evaluate business goals.
Examples
| Business Goal | KPI |
|---|---|
| Increase Sales | Conversion Rate |
| Improve Engagement | Average Session Duration |
| Grow Audience | New Users |
| Reduce Exits | Bounce Rate |
Example
An e-commerce website goal:
Increase online sales by 20%.
Relevant KPI:
Conversion Rate
If: 1000 visitors and 50 purchases
Conversion Rate=50/1000×100 = 5%
C. User Behaviour Analysis
Study of how users interact with a website.
Questions Answered
- Which pages are visited most?
- Where do users leave?
- Which products attract attention?
- What path do users follow?
Example User Journey
Home Page
↓
Product Page
↓
Cart
↓
Checkout
↓
Purchase
This sequence helps understand customer behaviour.
Benefits
✔ Improve website design
✔ Increase conversions
✔ Personalize content
✔ Improve user experience
2. BASICS OF INFORMATION RETRIEVAL (IR)
Information Retrieval (IR) is the process of finding relevant information from a large collection of data.
Example
When a user searches:
"Best smartphone under ₹20,000"
Google retrieves relevant web pages.
IR Process
User Query
↓
Search System
↓
Document Matching
↓
Ranking
↓
Results Displayed
A. Indexing
Indexing is the process of organizing documents so they can be searched efficiently.
Library Example
Instead of searching every book manually, a library catalogue stores:
- Title
- Author
- Subject
Similarly, search engines create indexes.
Example
Document:
"Machine learning improves search engines."
Index:
| Term | Document |
|---|---|
| Machine | D1 |
| Learning | D1 |
| Search | D1 |
| Engines | D1 |
Advantages
- Faster search
- Efficient retrieval
- Reduced processing time
B. Querying
A query is the user's search request.
Examples
- "Data Science Books"
- "Weather in Mumbai"
- "Best laptop 2025"
Types of Queries
Informational
Example:
"What is Artificial Intelligence?"
Navigational
Example:
"Facebook Login"
Transactional
Example:
"Buy iPhone 16"
C. Ranking
Ranking determines the order of search results based on relevance.
Example
Query:
"Python Programming"
Result A:
Python Tutorial
Result B:
Python snake
Result A receives higher rank because it is more relevant.
Factors Affecting Ranking
- Keyword relevance
- Page quality
- Popularity
- User behaviour
- Freshness of content
3. WEB DATA SOURCES
Web analytics and IR systems collect data from multiple sources.
A. Server Logs
Files automatically generated by web servers recording user activities.
Sample Log Entry
192.168.1.10
12/06/2025
10:15 AM
GET /index.html
Information Collected
- IP Address
- Date & Time
- Requested Page
- Browser Information
Uses
- Traffic analysis
- Security monitoring
- User behaviour tracking
B. APIs (Application Programming Interfaces)
APIs allow systems to exchange data automatically.
Example
Weather Application
Weather App
↓
Weather API
↓
Weather Data
Real Example
A travel website uses weather APIs to show current weather for destinations.
Advantages
- Real-time data
- Automation
- Integration between systems
C. Clickstream Data
Clickstream is the sequence of clicks made by a user during a browsing session.
Example
Home
↓
Products
↓
Mobile Phones
↓
Samsung Galaxy
↓
Cart
↓
Checkout
Importance
- Understand navigation patterns
- Improve website layout
- Recommend products
4. COMPONENTS OF INFORMATION RETRIEVAL SYSTEMS
A. Document Representation
Converting documents into machine-understandable formats.
Example: Document
"Artificial Intelligence enables smart systems."
After processing:
| Term | Frequency |
|---|---|
| Artificial | 1 |
| Intelligence | 1 |
| Smart | 1 |
| Systems | 1 |
Techniques
- Tokenization
- Stop-word removal
- Stemming
- Vector representation
Example
Sentence:
"The computer is computing data."
After stemming:
computer
compute
data
B. Retrieval Models
Methods used to determine relevance between query and documents.
1. Boolean Model
Uses:
- AND
- OR
- NOT
Example:
Data AND Mining
Returns documents containing both words.
2. Vector Space Model
Represents documents as vectors.
Measures similarity using mathematical calculations.
Example: Query: "Machine Learning"
Documents with more matching terms receive higher scores.
3. Probabilistic Model
Calculates probability that a document is relevant.
Higher probability = Higher rank.
5. APPLICATIONS OF INFORMATION RETRIEVAL
A. Search Engines
Examples
- Bing
- Yahoo
Working
User Query
↓
Index Search
↓
Ranking
↓
Results
Example
Search:
"Digital Marketing Course"
Search engine returns the most relevant pages.
B. Digital Marketing
IR helps marketers:
- Improve SEO
- Analyse keywords
- Understand customer interests
- Optimize advertisements
Example
A company selling laptops identifies popular search terms:
- Best laptop for students
- Affordable laptops
The company optimizes content using these keywords.
C. User Behaviour Analysis
IR techniques help analyse:
- Search patterns
- Click patterns
- Purchase patterns
Example
An e-commerce website discovers:
Users searching:
"Wireless Earbuds"
often purchase:
"Phone Covers"
This information helps create product recommendations.
Classroom Activity
Activity 1: Metrics Calculation
Website Data:
- Users = 500
- Purchases = 25
Calculate Conversion Rate. 25/500×100 = 5%
Activity 2: Identify Query Type
| Query | Type |
|---|---|
| What is Cloud Computing? | Informational |
| Instagram Login | Navigational |
| Buy Smart TV Online | Transactional |
Activity 3: Clickstream Analysis
User Path:
Home
↓
Products
↓
Cart
↓
Exit
Question: Where is the user dropping off?
Answer: Cart Page
Quick Revision Notes
Web Analytics
- Measures website performance.
- Uses metrics and KPIs.
- Studies user behavior.
Metrics
- Page Views
- Sessions
- Users
- Bounce Rate
KPIs
- Goal-oriented performance indicators.
Information Retrieval
- Finds relevant information.
- Includes indexing, querying, ranking.
Web Data Sources
- Server Logs
- APIs
- Clickstreams
IR Components
- Document Representation
- Retrieval Models
Applications
- Search Engines
- Digital Marketing
- User Behaviour Analysis
Exam-Oriented Questions
Short Answer Questions
- Define Web Analytics.
- What is a KPI?
- Explain indexing in IR.
- What is clickstream data?
- Define retrieval model.
Long Answer Questions
- Explain metrics and KPIs with examples.
- Describe indexing, querying, and ranking in Information Retrieval.
- Explain various web data sources.
- Discuss components of an Information Retrieval System.
- Explain applications of Information Retrieval in digital marketing and search engines.
Short Answer Questions
1. Define Web Analytics.
Web Analytics is the process of collecting, measuring, analyzing, and reporting website data to understand user behavior and improve website performance. It helps organizations make data-driven decisions to enhance user experience and achieve business goals.
Example: An online shopping website analyzes visitor data to identify why customers leave without making purchases.
2. What is a KPI?
A Key Performance Indicator (KPI) is a measurable value used to evaluate how effectively an organization is achieving its objectives and goals.
Examples:
- Conversion Rate
- Bounce Rate
- Revenue Growth
- Customer Retention Rate
Example: If an e-commerce website aims to increase sales, its KPI may be the conversion rate.
3. Explain Indexing in Information Retrieval.
Indexing is the process of organizing and storing information from documents in a structured format so that relevant documents can be retrieved quickly when a user submits a query.
Instead of searching every document individually, the system searches the index.
Example:
Document:
"Machine Learning improves search engines."
Index:
| Term | Document |
|---|---|
| Machine | D1 |
| Learning | D1 |
| Search | D1 |
| Engines | D1 |
This allows faster searching.
4. What is Clickstream Data?
Clickstream data is the sequence of clicks and pages visited by a user during a browsing session on a website.
It records the path followed by users and helps analyze navigation behavior.
Example:
Home Page
↓
Products Page
↓
Mobile Phones
↓
Cart
↓
Checkout
Businesses use clickstream data to understand user preferences and improve website design.
5. Define Retrieval Model.
A retrieval model is a mathematical framework used in Information Retrieval systems to determine the relevance of documents to a user's query.
It helps rank documents according to how well they match the search request.
Examples:
- Boolean Model
- Vector Space Model
- Probabilistic Model
Long Answer Questions
1. Explain Metrics and KPIs with Examples.
Metrics
Metrics are measurable values used to monitor and evaluate website performance.
Common Metrics
| Metric | Description |
|---|---|
| Users | Number of visitors |
| Sessions | Number of visits |
| Page Views | Total pages viewed |
| Bounce Rate | Percentage leaving after one page |
| Session Duration | Time spent on site |
Example
A website receives:
- 1000 visitors
- 2500 page views
Average pages viewed per visitor: 2500/1000 = 2.5 pages
Each visitor viewed 2.5 pages on average.
KPIs
KPIs are important metrics directly linked to business objectives.
Examples
| Goal | KPI |
|---|---|
| Increase Sales | Conversion Rate |
| Improve Engagement | Session Duration |
| Increase Visitors | New Users |
| Reduce Exits | Bounce Rate |
Example
Website Visitors = 1000
Purchases = 50
Conversion Rate: (50/1000) x 100= 5%
Thus, the website's KPI (Conversion Rate) is 5%.
Difference Between Metrics and KPIs
| Metrics | KPIs |
|---|---|
| Measure activities | Measure goal achievement |
| General indicators | Strategic indicators |
| Many can exist | Few critical measures |
2. Describe Indexing, Querying, and Ranking in Information Retrieval.
Information Retrieval (IR) is the process of locating relevant information from a collection of documents based on a user's query.
A. Indexing
Indexing organizes documents into a searchable structure.
Example
Document:
"Data Mining extracts useful information."
Index:
| Term | Document |
|---|---|
| Data | D1 |
| Mining | D1 |
| Information | D1 |
Benefits:
- Fast search
- Reduced processing time
- Efficient retrieval
B. Querying
A query is the search request submitted by a user.
Examples
- "Machine Learning"
- "Best smartphone under ₹20,000"
- "Weather forecast"
Types of Queries
- Informational
- "What is AI?"
- Navigational
- "Facebook Login"
- Transactional
- "Buy Laptop Online"
C. Ranking
Ranking arranges search results according to relevance.
Example
Query:
"Python Programming"
Results:
- Python Tutorial
- Python Course
- Cooking Recipes
The first two documents rank higher because they are more relevant.
Factors Affecting Ranking
- Keyword matching
- Content quality
- Popularity
- User engagement
- Freshness of information
3. Explain Various Web Data Sources.
Web data sources provide information for analytics and Information Retrieval systems.
A. Server Logs
Server logs are files generated automatically by web servers that record user activities.
Information Stored
- IP address
- Date and time
- Requested page
- Browser information
Example
IP: 192.168.1.10
Date: 12-06-2025
Page: /home.html
Uses
- Traffic analysis
- Security monitoring
- User tracking
B. APIs (Application Programming Interfaces)
APIs enable communication and data exchange between applications.
Example
A weather application retrieves live weather information through a weather API.
Advantages
- Real-time data
- Automation
- Easy integration
C. Clickstream Data
Clickstream records the sequence of pages visited by users.
Example
Home
↓
Products
↓
Laptop
↓
Cart
↓
Checkout
Uses
- User behavior analysis
- Product recommendations
- Website optimization
Importance of Web Data Sources
- Improve decision-making
- Understand user behavior
- Enhance website performance
- Support business strategies
4. Discuss Components of an Information Retrieval System.
An Information Retrieval System consists of components that help store, organize, search, and retrieve relevant information.
A. Document Collection
A set of documents stored in the system.
Example: Web pages, PDFs, articles, books.
B. Document Representation
Documents are converted into machine-readable formats.
Steps
- Tokenization
- Stop-word Removal
- Stemming
Example
Sentence:
"The computer is computing data."
After processing:
computer
compute
data
C. Indexing Module
Creates indexes for quick searching.
Example
| Word | Document |
|---|---|
| AI | D1 |
| Data | D2 |
D. Query Processing
Processes user search requests.
Example
Query:
"Artificial Intelligence"
The system identifies important keywords and searches the index.
E. Retrieval Model
Determines relevance between query and documents.
Types
- Boolean Model
- Vector Space Model
- Probabilistic Model
F. Ranking Module
Ranks retrieved documents according to relevance.
Working of IR System
User Query
↓
Query Processing
↓
Index Search
↓
Retrieval Model
↓
Ranking
↓
Relevant Results
5. Explain Applications of Information Retrieval in Digital Marketing and Search Engines.
Information Retrieval techniques are widely used to locate, organize, and rank relevant information from large data collections.
A. Applications in Search Engines
Search engines use IR techniques to provide relevant search results.
Working
- Crawl web pages.
- Create indexes.
- Process user queries.
- Retrieve matching pages.
- Rank results.
Example
Search Query:
"Digital Marketing Course"
The search engine retrieves and ranks relevant web pages.
Benefits
- Fast information access
- Accurate search results
- Improved user experience
B. Applications in Digital Marketing
Digital marketers use IR techniques to understand customer interests and improve online visibility.
Uses
1. Search Engine Optimization (SEO)
Businesses optimize content using popular keywords.
Example:
A laptop company targets keywords such as:
- Best laptop for students
- Affordable laptops
2. Keyword Analysis
Marketers identify frequently searched terms.
Benefits:
- Better content creation
- Improved website traffic
3. Online Advertising
Advertisements are displayed based on user searches and interests.
Example:
A user searching for "running shoes" may see sports shoe advertisements.
C. Applications in User Behaviour Analysis
IR systems analyze:
- Search patterns
- Browsing history
- Clickstream data
- Purchase behavior
Example
Users searching for "Wireless Earbuds" frequently buy "Phone Covers."
The website recommends phone covers to similar users.
Conclusion
Information Retrieval plays a crucial role in:
- Search engines
- Digital marketing
- User behavior analysis
It helps organizations deliver relevant information, improve customer experiences, and make informed business decisions.