=== VidLog ===
Contributors: zzraz
Donate link: https://www.paypal.com/donate/?hosted_button_id=4SMV5H3BFFJKQ
Tags: video stats, analytics, page views, export, logs
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.0
Stable tag: 2.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track self-hosted video plays and page views inside WordPress with instant logging, watched time tracking, CSV exports, and clean monthly logs.

== Description ==

**Video stats**

NEW: VidLog now tracks how long visitors watch your videos, giving you deeper insight beyond simple play counts.

**VidLog** gives you immediate insight into how your self-hosted videos are being watched, directly inside your WordPress dashboard.

The moment a visitor presses PLAY, VidLog records the view and stores key details such as:

- Date and time
- IP address
- Country/City
- Page slug
- Video file
- Referrer source
- Pages viewed
- Watched time (minutes viewed per session)

If you use self-hosted video files like `.mp4`, `.webm`, `.mov`, `.m4v`, `.avi`, or `.m3u8`, VidLog helps you understand what people are watching, where they are coming from, and which videos perform best. The plugin also logs instant visits on your site pages, logging the same metadata.

**Page stats**

**VidLog** also instantly logs what pages visitors view on your site. The log contains the same metadata as video views. It counts all page visits, not only unique visits.

**Why site owners use VidLog**

- Instant logging the moment a visitor presses PLAY
- Instant logging the moment a page is visited
- Watched time tracking for self-hosted videos
- Clean monthly video and page logs inside WordPress
- CSV exports for reporting and backup
- Referrer tracking to see where visitors came from
- Lightweight setup with no external analytics dashboard required
- Simple dashboard for reviewing logs directly in WordPress

**Perfect for**

- Filmmakers and video creators
- Membership sites
- Online courses and educators
- Video tutorials
- Agencies managing client video content
- Any WordPress site using self-hosted videos

> **Important:** VidLog tracks self-hosted video files. It does not track YouTube or Vimeo embeds.

== External services ==

The link to upgrade to pro opens a new tab with a link to the plugin's website.

== Video Tutorial ==

Need help getting started? Watch the full VidLog setup tutorial here:

https://www.youtube.com/watch?v=6O_DzQ3838I

Watch on YouTube:

[https://www.youtube.com/watch?v=6O_DzQ3838I](https://www.youtube.com/watch?v=6O_DzQ3838I)

== Features ==

VidLog includes instant video play logging, page view logging, watched time tracking, CSV exports, monthly log storage, and clean logs directly inside WordPress.

For a full feature list and more details about **VidLog PRO**, visit:

[https://theappmill.com/vidlog/index.html](https://theappmill.com/vidlog/index.html)

== VidLog PRO ==

Want deeper insights? **VidLog PRO** adds an **Advanced Stats** area for both Video plays and Page views, right inside WordPress with:

- Top 10 videos chart
- Top 10 countries chart
- Top 10 referrers chart
- Complete analytics lists below each chart
- Faster insight into which content performs best
- A clearer overview of viewer behavior across your video library

If you want more than raw logs and CSV exports, VidLog PRO gives you a more visual analytics experience directly in your WordPress dashboard.

== Included Analytics ==

VidLog helps you answer questions like:

- Which videos are being watched the most?
- Which countries send the most viewers?
- Which referrers drive the most plays?
- Which pages are being visited the most?
- Which month had the most activity?
- Which exact files and slugs were viewed?
- How long are visitors watching videos?

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it through the WordPress Plugins screen.
2. Activate **VidLog** from the Plugins menu.
3. Open **VidLog** in your WordPress dashboard.
4. Add self-hosted videos to your pages or posts.
5. When a visitor presses PLAY or visits a page, the log is recorded automatically.

Watch the setup tutorial:

https://www.youtube.com/watch?v=6O_DzQ3838I

Watch on YouTube:

[https://www.youtube.com/watch?v=6O_DzQ3838I](https://www.youtube.com/watch?v=6O_DzQ3838I)

== Frequently Asked Questions ==

= Does VidLog work with YouTube or Vimeo embeds? =

No. VidLog is built for **self-hosted video files** inside WordPress.

= Does VidLog slow down my website? =

No. Logging is lightweight and designed to happen immediately when a visitor starts playback or visits a page.

= Can I export my logs? =

Yes. You can export monthly logs as CSV files directly from the plugin dashboard.

= What kind of videos can it track? =

VidLog works with common self-hosted formats such as `.mp4`, `.webm`, `.mov`, `.m4v`, `.avi`, and `.m3u8`. It logs unique video plays and can also track watched time during playback sessions.

= What kind of pages can it track? =

VidLog works with all pages on your website. It logs every page visit directly inside WordPress, including repeat visits to the same page, so you can review monthly activity and export the data when needed.

= Where do I see the stats? =

Inside your WordPress admin area under **VidLog**, where you can view video and page logs and export CSV files. **Advanced Stats** with top 10 charts and deeper analytics are available in **VidLog PRO**.

== Screenshots ==

1. VidLog dashboard with logged video views
2. VidLog dashboard with logged page views
3. Monthly log management with CSV export and bulk actions
4. Advanced stats page with top 10 charts and complete analytics lists in VidLog PRO

== External Services ==

This plugin uses the following external service to enrich log data with geolocation information:

- **ip-api.com** - `http://ip-api.com/json/`
- Purpose: resolves IP addresses into country data for analytics logs
- Data sent: the visitor IP address
- Service privacy policy: [https://ip-api.com/docs/legal](https://ip-api.com/docs/legal)

This plugin also displays country flag images using:

- **flagcdn.com** - `https://flagcdn.com/`
- Purpose: displays a small country flag icon next to log entries in the dashboard
- Data sent: no personal data is sent by the plugin; the browser loads the flag image file directly
- Service privacy policy: [https://flagcdn.com/privacy/](https://flagcdn.com/privacy/)

This plugin also includes a link in the plugin UI to:

- **The AppMill** - [https://theappmill.com/vidlog/index.html](https://theappmill.com/vidlog/index.html)
- Purpose: product and plugin information only
- No visitor log data is sent to this site by the plugin

== Changelog ==

= 2.2.1 =

- Design changes
- Added link to website for more information

= 2.2.0 =

- Modernized plugin header metadata and asset versioning
- Improved admin screen styling for log filters, actions, and tables
- Fixed PHP 7 compatibility by removing PHP 8-only function usage
- Fixed admin pagination nonce handling
- Scoped upgrade page styles so they only load on the VidLog upgrade page
- Added a tutorial 

= 2.1.0 =

- Added "Watched" tracking for self-hosted videos
- Added watched time logging in minutes per playback session
- Improved video analytics by tracking play-pause-play behavior
- Fixed CSV issue causing empty rows
- Added automatic cleanup of malformed CSV rows
- Improved CSV stability and data consistency

= 2.0.0 =

- Added Page Views tracking to the free version
- Added the Page Views admin screen with CSV export and log management
- Added city data to video and page view logs
- Improved CSV download handling for Video Views

= 1.0.0 =

- Initial public release of VidLog
- Instant logging for self-hosted video plays
- Instant logging for page views
- CSV export for monthly logs
- PRO version available with advanced stats charts and deeper analytics

== Credits ==

Developed by The AppMill.
