Lighthouse Analytics Documentation – Complete Setup & Feature Guide

Documentation: General Settings | Event Settings

How to Install and Configure Lighthouse Analytics for WordPress

Analytics is a module in Lighthouse. It is on by default, and you can switch it off or on from the Modules screen.

There are some options that need to be manually set, and there are some sections that require further explanation.

Table of Contents

Open Lighthouse, then Analytics, then Settings.

Display Features

  • Number of top referrers to show on Dashboard: This setting allows you to choose how many of the top referring websites or sources (like search engines or social media sites) will be shown on the Lighthouse Analytics Overview. The default is 10, but you can change it by entering a different number.
    DEFAULT IS 10.

Analytics Features

  • Collect data about logged-in users: If this is checked, the plugin will track and include data about users who are logged into your website. This can be useful for sites with a membership system or where logged-in users are common.
    DEFAULT IS OFF.

Overview

  • Days in Overview Graph: This option lets you choose how many days’ worth of data will be shown in the Lighthouse Analytics Overview Graph, which gives a quick snapshot of your site’s traffic trends.
    DEFAULT IS 90.
  • Months in Overview Graph: Similar to the above, this setting determines how many months’ worth of data will be shown in the Lighthouse Analytics Overview Graph. Set it to 12 months if you want a general image of how your website is performing, or 24 months if you are looking for long-term improvements and evolution.
    DEFAULT IS 3 MONTHS.
  • Days in Traffic Graph: This controls how many days’ worth of data will be shown in the Lighthouse Analytics Traffic Graph.
    DEFAULT IS 90 (3 MONTHS).

Data Retention

  • Automatically delete visits older than: This setting determines how long the plugin will keep visitor data. After the specified time period, older data will be automatically deleted. This helps in managing storage space and ensuring that only relevant, recent data is kept. Make sure you match this value with the Overview values above.
    DEFAULT IS 2 YEARS.

Sample Privacy Policy for Lighthouse Analytics

Use the text below if you need to add or amend your existing Privacy Policy, when using the Lighthouse Analytics plugin.

Note that any privacy policy will need to be verified and approved by a legal entity attached to your company or business. The sample below is not legally binding.

Privacy Policy for Website Analytics

Thank you for visiting our website. This privacy policy outlines how we collect and handle your information when you interact with our analytics tools. We prioritize the security and privacy of your data and want to be transparent about the information we collect and how it is used.

Information Collected:

  1. Anonymized IP Address: We collect anonymized IP addresses to analyze trends, administer the site, and gather demographic information. These IP addresses are processed in a way that ensures the removal of any personally identifiable information.
  2. URL and Post ID: We collect the URL and post ID of the pages you visit to provide valuable insights into user engagement and content popularity.
  3. Referrer (Last Page Only): We capture the referrer information to understand how users navigate to our site. We only collect the referrer of the last page visited to maintain user privacy.

Cookies:

We want to emphasize that we do not use cookies. We believe in minimizing the collection of personal data, and our approach is centered around user privacy.

How We Use Your Information:

The information we collect is used for statistical analysis, to improve our website’s functionality, and to enhance the overall user experience. None of the collected data is shared with third parties, and all measures are taken to ensure the anonymity of the information.

Your Consent:

By using our website, you consent to the terms outlined in this privacy policy. If you do not agree with these terms, please refrain from using our analytics tools.

Updates to Privacy Policy:

This privacy policy may be updated from time to time, and any changes will be reflected on this page. We encourage you to review this policy periodically to stay informed about how we are protecting your information.

If you have any questions or concerns about our privacy practices, please contact us at [your contact information].

Thank you for visiting our website!

Events Tracking – Quick Start Guide

Get started with Lighthouse Analytics Events in 5 minutes!


Step 1: Verify Installation

  1. Log into WordPress admin
  2. Go to Lighthouse, then Analytics
  3. Click the Events tab
  4. You should see the Events dashboard (may show “No data” initially)

Success! If you see the Events tab and dashboard, you’re ready to track events!


Step 2: Test Event Tracking

Option A: Browser Console (Quickest)

  1. Open any page on your WordPress site
  2. Press F12 to open Developer Tools
  3. Go to the Console tab
  4. Type this command and press Enter:
wpaa('send', 'event', {
    eventCategory: 'Test',
    eventAction: 'Console Test',
    eventLabel: 'My First Event'
});
  1. Go to Lighthouse, then Analytics, then Events
  2. You should see your event in the “Recent Events” table!

Option B: Test Page (Interactive)

  1. Upload events-test.html to your site
  2. Visit the page in your browser
  3. Click any button to track events
  4. View results in Lighthouse, then Analytics, then Events

Step 3: Track Your First Real Event

Example: Track Button Clicks

Add this to your theme or page:

<button id="signup-btn">Sign Up Now</button>

<script>
document.getElementById('signup-btn').addEventListener('click', function() {
    wpaa('send', 'event', {
        eventCategory: 'Button',
        eventAction: 'Click',
        eventLabel: 'Signup CTA'
    });
});
</script>

Example: Track Form Submissions

<form id="contact-form">
    <!-- your form fields -->
    <button type="submit">Submit</button>
</form>

<script>
document.getElementById('contact-form').addEventListener('submit', function(e) {
    wpaa('send', 'event', {
        eventCategory: 'Form',
        eventAction: 'Submit',
        eventLabel: 'Contact Form'
    });
});
</script>

Step 4: View Your Data

  1. Go to Lighthouse, then Analytics, then Events
  2. View:
  • Summary Stats – Total events, today, this month
  • Timeline Chart – Events over last 30 days
  • By Type Chart – Most tracked event types
  • By Category Chart – Event distribution
  • Recent Events Table – Last 50 events with details

Step 5: Learn More

Common Event Types

// User Actions
wpaa('send', 'register');
wpaa('send', 'login');
wpaa('send', 'logout');

// Content Interactions
wpaa('send', 'download');
wpaa('send', 'signup');

// Custom Events
wpaa('send', 'event', {
    eventCategory: 'Category Name',
    eventAction: 'Action Name',
    eventLabel: 'Optional Label',
    eventValue: 123  // Optional numeric value
});

Event Parameters

ParameterRequiredTypeExample
eventCategoryNoString‘Video’, ‘Button’, ‘Form’
eventActionNoString‘Play’, ‘Click’, ‘Submit’
eventLabelNoString‘Homepage CTA’, ‘Contact Form’
eventValueNoInteger100, 4999 (price in cents)

Quick Tips

Best Practices:

  • Use consistent category names
  • Provide descriptive labels
  • Track meaningful interactions
  • Test in console first

Avoid:

  • Track personal data
  • Use random category names
  • Track every click
  • Forget to test

Troubleshooting

Events Not Showing?

Check 1: Is wpaa() function available?

// In browser console
typeof wpaa
// Should return: "function"

Check 2: Any JavaScript errors?

  • Open browser console (F12)
  • Look for red error messages

Check 3: Is the Analytics module on?

  • Open Lighthouse, then Modules
  • Confirm Analytics is on

Check 4: Cache issues?

  • Clear browser cache
  • Clear WordPress cache (if using caching plugin)

Real-World Examples

Track Video Plays

document.getElementById('my-video').addEventListener('play', function() {
    wpaa('send', 'event', {
        eventCategory: 'Video',
        eventAction: 'Play',
        eventLabel: this.src
    });
});

Track Scroll Depth

let tracked25 = false;
window.addEventListener('scroll', function() {
    const scrollPercent = (window.scrollY / (document.documentElement.scrollHeight - window.innerHeight)) * 100;

    if (scrollPercent > 25 && !tracked25) {
        tracked25 = true;
        wpaa('send', 'event', {
            eventCategory: 'Engagement',
            eventAction: 'Scroll',
            eventLabel: '25%'
        });
    }
});

Track E-commerce

// Product purchase
wpaa('send', 'event', {
    eventCategory: 'Ecommerce',
    eventAction: 'Purchase',
    eventLabel: 'Order #12345',
    eventValue: 9999  // $99.99 in cents
});

Important Notes:

  • Event data respects your data retention settings
  • Privacy-first and GDPR-friendly by design
  • Works seamlessly alongside pageview tracking