Choose which visits are counted

Open OptinFlare โ€บ Statistics โ€บ Settings, or click Tracking settings on the Statistics screen. Changes apply to new visits: statistics already recorded donโ€™t change.

Recording

  • Record form statistics: counts the impressions, views and submissions of your forms. When off, nothing new is recorded and existing statistics are kept.
  • Count impressions and views once per browsing session: by default, a form is counted on every page view. Counting it once per session gives figures closer to the number of visitors, and changes comparisons with earlier periods.

Excluded visitors

  • Exclude all logged-in users: visits and submissions of anyone logged in to the site are not counted.
  • Exclude these roles: leave out only the roles you check, such as Administrator or Editor.
  • Exclude bots and crawlers: search engines, link previews, SEO and AI crawlers, performance tests and monitoring services are recognized by their user agent. Only their impressions and views are left out: spam submissions stay counted as blocked.

Excluded visitors still see and use your forms as usual. Below the settings, a message tells you whether your own visits are counted.

Excluded IP addresses

Enter one address per line, for example your office or your developers. IPv4 and IPv6 addresses and CIDR ranges, such as 203.0.113.0/24, are accepted. Add my IP address adds the address you are using. Behind a proxy or a CDN, check that OptinFlare reads the real visitor address: see Behind a proxy or CDN.

For developers

  • optinflare_track_statistics_event: filter. Return false to skip an impression, a view or a submission.
  • optinflare_statistics_excluded_roles, optinflare_statistics_excluded_ips and optinflare_statistics_bot_patterns: filters on the excluded roles, IP addresses and bot user agents.
  • optinflare_statistics_enabled: filter that turns recording on or off, for example on a staging site.
  • optinflare_statistics_event_excluded: action run for each event that is not counted, with its reason.
  • OPTINFLARE_DISABLE_STATISTICS: set this constant to true in wp-config.php to stop recording on the site.
  • optinflare:track: browser event on document. Call event.preventDefault() to skip an impression or a view.

Last update