跳到内容

Designed2Use GA Views

v2.0.1

Designed 2 Use · 2026年6月26日 上架

Display Google Analytics 4 pageview counts on posts and pages. Recent posts fetch fast; older posts refresh in the background.

正在使用
10 以下
评分
暂无
累计下载
354
最近更新
2026年9月17日
需要 WordPress 6.0+已测试到 7.1.5PHP 7.4+

截图

The settings page under Settings -> GA Views.
The settings page under Settings -> GA Views.
A pageview count rendered on a post.
A pageview count rendered on a post.

Designed2Use GA Views shows the Google Analytics 4 pageview total for a post or page using a simple shortcode. It is built so a visitor’s page load is never held up by the slow Google API.

How it fetches counts (hybrid model)

  • A cached value is shown whenever one is fresh.
  • On a cache miss for a recent post (published within your live-fetch window), the count is fetched live with a short, fail-fast timeout over a narrow date range (the post’s publish date to today) — fast because the query window is small.
  • On a cache miss for an older post, a background job is queued and the last stored value is shown immediately. The slow, history-heavy query runs off the request path.
  • Administrators can force a live refresh of the page they are viewing with ?d2ugav_refresh=1.

Features

  • [d2ugav_pageview] shortcode, or automatic display appended to post content / Echo Knowledge Base header.
  • Settings page for credentials, property ID, live-fetch window, cache duration, label, metric, event name, and post types.
  • Optional per-post “legacy baseline” to add historical (e.g. Universal Analytics) views to the live GA4 count.
  • Lightweight: talks to the GA4 Data API directly over REST with a self-signed service-account token — no bundled multi-megabyte SDK.

Google Analytics is a third-party service governed by Google’s own terms; see https://policies.google.com/privacy and https://marketingplatform.google.com/about/analytics/terms/us/ .

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums