How to Start Tracking Pageviews and Events in 5 Minutes

Quick-start guide to implementing web analytics for your business website with minimal technical effort

Analytics Implementation

How to Start Tracking Pageviews and Events in 5 Minutes

Getting meaningful analytics data doesn't have to be complicated. This guide will have you tracking website visits and important user actions in just five minutes, with no complex configuration required.

What You'll Accomplish

By following this guide, you'll:

  • Install our tracking script on your website
  • Begin capturing pageviews automatically
  • Set up basic event tracking for important user interactions
  • View your first data in a real-time dashboard

Prerequisites

  • Administrator access to your website
  • Ability to edit your website's HTML or access to your CMS
  • A free or paid account on our platform (sign up here if needed)

Step 1: Create Your Website in Our Dashboard (1 minute)

  1. Log in to your dashboard at app.yourcompany.com
  2. Click + Add Website in the top right corner
  3. Enter your website's details:
    • Name: A label for your own reference (e.g., "Company Blog")
    • Domain: Your website's domain (e.g., example.com)
  4. Click Create Website

You'll receive a unique Site ID that looks like abc-123-xyz.

Step 2: Add the Tracking Script (2 minutes)

Option A: Direct Installation

Add the following script to the <head> section of your website:

<script data-site="YOUR-SITE-ID" src="https://cdn.yourcompany.com/tracker.js" defer></script>

Replace YOUR-SITE-ID with the Site ID you received in Step 1.

Option B: WordPress

  1. Install our WordPress plugin from the WordPress Plugin Directory
  2. Navigate to the plugin settings
  3. Enter your Site ID
  4. Save changes

Option C: Shopify

  1. Go to your Shopify admin panel
  2. Navigate to Online StoreThemes
  3. Click ActionsEdit code
  4. Open the theme.liquid file
  5. Paste the tracking script in the <head> section
  6. Save changes

We have one-click integrations for:

Step 3: Verify Installation (1 minute)

  1. Open your website in a new browser tab
  2. Navigate to a few pages
  3. Return to your analytics dashboard
  4. Click on your website
  5. You should see your visit appear in the real-time view

If nothing appears within 1-2 minutes, check our troubleshooting guide.

Step 4: Set Up Basic Event Tracking (1 minute)

Our script automatically tracks pageviews, but you can easily track specific user actions like button clicks, form submissions, and more.

Track Button Clicks

Add the data-analytics attribute to any element you want to track:

<button data-analytics="signup-button">Sign Up</button>

Track Form Submissions

Add the data-analytics-form attribute to your form:

<form data-analytics-form="contact-form">
  <!-- Form fields here -->
</form>

Track Custom Events with JavaScript

For more complex interactions, use our JavaScript API:

// Track any user action
analytics.trackEvent('video-played', {
  videoTitle: 'Product Demo',
  videoDuration: '2:30'
});

Viewing Your Data

Your dashboard now shows:

  • Real-time visitors: Who's on your site right now
  • Pageviews: Which pages are most popular
  • Referrers: Where your traffic is coming from
  • Devices: What devices your visitors are using
  • Events: User interactions with tracked elements

Next Steps

Now that you have basic tracking in place, consider these enhancements:

Need More Help?

Privacy Considerations

Our analytics platform is designed with privacy in mind:

  • No cookies required
  • No personal data collection
  • Compliant with GDPR, CCPA, and other privacy regulations
  • Respects Do Not Track settings

For more detailed privacy information, see our Privacy Guide.

Written by