Unit 3: Introduction to web analytics

3.1 Data Collection, Weblogs & Page Tagging, Key Metrics

Data Collection

Web analytics begins with data collection. Understanding how users interact with your website is crucial for making informed business decisions. Data collection involves gathering information about user behavior, technical details of their devices, and how they navigate through your site. The two primary methods for collecting web analytics data are weblogs and page tagging.

Weblogs

Weblogs, or server logs, are files automatically created and maintained by a web server. Every time a user requests a file (like an HTML page, image, or stylesheet) from the server, an entry is added to the log file.

  • Advantages: They are stored locally on the server, ensuring data privacy. They capture all requests, including those from search engine bots and users with JavaScript disabled.
  • Disadvantages: They can be large and complex to parse. Caching (either by the browser or a proxy server) can result in missed pageviews because the request doesn't reach the origin server.

Page Tagging

Page tagging involves adding a small piece of JavaScript code (the "tag") to every page of a website. When a user visits the page, the browser executes the script, which collects data and sends it to a third-party analytics server (like Google Analytics).

  • Advantages: Highly accurate for tracking user behavior, including client-side interactions (like video plays or button clicks) that don't involve the server. It easily handles caching issues since the script runs in the browser.
  • Disadvantages: Requires JavaScript to be enabled in the user's browser. If a user blocks tracking scripts, their data will not be collected.

Key Metrics

Metrics are quantitative measurements of data. In web analytics, understanding key metrics helps evaluate website performance.

  • Unique Visitors: The number of distinct individuals who visit a website during a specific reporting period. If the same person visits the site multiple times, they are counted as one unique visitor.
  • Pageviews: The total number of pages viewed. Repeated views of a single page are counted.
  • Pages/Visit (Pages per Session): The average number of pages viewed during a single visit or session. Repeated views of a single page are included in this count. It indicates how engaging the site is.
  • Avg Visit Duration (Average Session Duration): The average amount of time users spend on the site during a single visit. It helps measure user engagement.
  • Bounce Rate: The percentage of single-page visits (i.e., visits in which the person left your site from the entrance page without interacting with the page). A high bounce rate may indicate that the landing page is not relevant to the user.
  • New Visits: An estimate of the percentage of first-time visits. It highlights how well the website is attracting new audiences.

3.2 Types of Web Analytics Tools

Web analytics tools are categorized based on their primary focus and the insights they provide.

Content Analytics Tools

These tools focus on how users interact with content. They help identify which articles, videos, or pages are most popular and how far users scroll or read. Examples include Chartbeat and Parse.ly.

Customer Analytics Tools

Customer analytics focuses on understanding the customer journey, segmentation, and lifetime value. These tools integrate data from multiple touchpoints to build a complete profile of the customer. Examples include Kissmetrics and Mixpanel.

Usability (UX) Analytics Tools

These tools help understand how users visually interact with a website. They provide features like heatmaps, session recordings, and click tracking to identify usability issues and optimize the user interface. Examples include Hotjar and Crazy Egg.

A/B and Multivariate Testing Tools

Testing tools allow marketers to compare different versions of a webpage to see which performs better. A/B testing compares two versions, while multivariate testing compares multiple variables simultaneously. Examples include Optimizely and VWO.

SEO Analytics Tools

SEO tools focus on organic search performance. They track keyword rankings, backlink profiles, and on-page optimization to improve visibility in search engine results. Examples include Ahrefs, SEMrush, and Google Search Console.

General Enterprise Analytics Tools

Comprehensive platforms that offer a wide range of analytics features suitable for large organizations. They often integrate with other marketing systems and provide advanced reporting capabilities. Examples include Adobe Analytics and Google Analytics 360.

Open-Source Web Analytics Tools

These are analytics platforms where the source code is freely available. They offer organizations control over their data privacy and the ability to customize the tool. Examples include Matomo (formerly Piwik) and Plausible.

Product Analytics Tools

Product analytics focuses on how users interact with a digital product (like a SaaS application or mobile app). They track specific user actions (events) to understand feature adoption and user retention. Examples include Amplitude and Pendo.

3.3 Setting up Goals and Conversion Rate, Goal Reports in Google Analytics (GA4)

Goals and Conversion Rate

A goal represents a completed activity, called a conversion, that contributes to the success of your business. Examples include making a purchase, submitting a lead generation form, or signing up for a newsletter. The conversion rate is the percentage of total visitors who complete a goal. It is calculated as: (Conversions / Total Visitors) * 100.

Goal Reports in Google Analytics 4 (GA4)

In GA4, the concept of "Goals" from Universal Analytics has been replaced by "Conversion Events." Any event collected by GA4 can be marked as a conversion.

  • Setting up Conversions: In the GA4 interface, navigate to the "Admin" section and select "Events". You can mark existing events as conversions by toggling the switch next to the event name. For specific goals, you can create new custom events based on certain parameters (e.g., creating an event when page_location equals a "thank-you" page URL) and then mark that new event as a conversion.
  • Reporting: To view conversion reports in GA4, go to the "Reports" workspace, select "Engagement," and then "Conversions." This report provides detailed data on how many times each conversion event was triggered, the number of users who completed them, and the total revenue associated with them.

3.4 Multi-Touch Attribution Models: Linear, Time Decay

Attribution models are rules or sets of rules that determine how credit for a conversion is assigned to different touchpoints in the conversion path. A user might click an ad, receive an email, and then search organically before finally making a purchase. Multi-touch models distribute the credit among these various touchpoints.

Linear Attribution Model

The Linear model gives equal credit to every touchpoint in the conversion path.

  • Example: If a user finds your site via a social media ad, returns a week later through an email newsletter, and finally converts after an organic search, each of the three touchpoints receives 33.3% of the credit.
  • Pros: It provides a balanced view and acknowledges that every interaction played a role in the conversion.
  • Cons: It may overvalue less impactful touchpoints and undervalue crucial ones that truly drove the decision.

Time Decay Attribution Model

The Time Decay model gives more credit to the touchpoints that are closest in time to the conversion.

  • Example: In a path consisting of Social Media -> Email -> Organic Search -> Conversion, Organic Search gets the most credit, Email gets less, and Social Media gets the least.
  • Pros: It appropriately rewards the interactions that finally persuaded the user to convert, making it highly effective for short sales cycles or promotional campaigns.
  • Cons: It undervalues the top-of-funnel touchpoints that initially introduced the user to the brand.

3.5 Google Tag Manager

Google Tag Manager (GTM) is a free tag management system that allows you to manage and deploy marketing tags (snippets of code or tracking pixels) on your website or mobile app without having to modify the code directly.

Key Components of GTM

  • Tags: Snippets of JavaScript or tracking pixels sent from a third-party tool (e.g., Google Analytics tracking code, Meta Pixel).
  • Triggers: Rules that govern when a tag should fire or be executed. A trigger listens for certain events, such as a page load, a button click, or a form submission.
  • Variables: Placeholders for values that change, such as a product price, a URL, or a form ID. Variables are used in both triggers and tags to define conditions and pass data.

Benefits of Using GTM

  • Agility: Marketers can add, edit, or remove tags quickly without relying on developers to change the website's source code.
  • Version Control: GTM keeps a history of all changes, allowing you to easily roll back to a previous version if something goes wrong.
  • Testing and Debugging: The built-in preview mode lets you test your tags on your site before publishing them to ensure they fire correctly.
  • Centralized Management: All tags are managed in one interface, reducing the risk of code clutter and conflicts on the website.