Linux 软件免费装

EMIANO Analytics Ranking

开发者 littycojp
更新时间 2026年11月7日 23:34
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

analytics google analytics popular posts ranking ga4

下载

1.0.0 1.1.0

详情介绍:

EMIANO Analytics Ranking shows your most viewed posts, using the page view data that Google Analytics 4 (GA4) has already collected for your site. It does not count views on your server, so it adds no tracking code and no database writes on page views. The plugin connects to GA4 with a Google Cloud service account. It retrieves page views in the background on a schedule, matches each page path to a post on your site, and stores the ranking. Visitors only see the stored ranking, so displaying it does not call Google. Features Shortcode [emiano_ranking period="1w" post_type="post"] Category rankings are selected from the overall ranking, so categories with few posts may show fewer than ten posts. If a period that is not selected on the settings screen is specified, the shortcode shows the same output as when there is no data. If a category slug does not exist, the shortcode shows the same output as when there is no data. For developers About GA4 data GA4 usually needs 2 to 6 hours before recent page views are available through its API, and the numbers can change for 24 to 48 hours after that. The most recent views therefore appear in the ranking after a delay.

安装:

  1. Install and activate the plugin.
  2. In Google Cloud, create or choose a project and enable both the "Google Analytics Data API" and the "Google Analytics Admin API".
  3. In the same project, create a service account. No Google Cloud role is needed. Open the service account, go to Keys, choose Add key > Create new key > JSON, and download the key file.
  4. In Google Analytics, open Admin > Property access management for your GA4 property and add the service account email address with the Viewer role.
  5. In Google Analytics, open Admin > Property details and copy the numeric property ID. Do not use the measurement ID that starts with "G-".
  6. In WordPress, open Settings > Analytics Ranking. Enter the property ID, paste the contents of the key file, choose the periods, and save.
  7. Use "Test connection" to check the settings.
  8. Add the "Analytics Ranking" block or the [emiano_ranking] shortcode to a post, page, or widget area.
If another EMIANO plugin is active, the settings screen is under the EMIANO menu instead of Settings.

常见问题:

Do I need to add a tracking code?

No. The plugin uses the data that your GA4 property already collects. GA4 itself must be installed on your site separately.

Why does the ranking not show my latest views?

GA4 makes recent data available through its API after a delay of usually 2 to 6 hours, and the plugin retrieves data on a schedule. See "About GA4 data" above.

Why is the ranking empty?

Check the retrieval status on the settings screen. Rankings appear after the first successful retrieval. The plugin uses WP-Cron, which runs when your site receives visits. Also check that the ranking's period is selected on the settings screen. If WP-Cron is disabled (DISABLE_WP_CRON) or loopback requests are blocked, call wp-cron.php from your server's cron or use ALTERNATE_WP_CRON.

The settings screen says "Check the property ID, and make sure the service account is added…"

Google returns the same error when the property ID is wrong and when the service account has no access to the property. Check both.

How is the service account key stored?

The key is saved in your site's database, in the emiano_ar_settings option, which is not autoloaded and is not exposed through the REST API. It is never displayed again after saving; the settings screen shows only the service account email address. Leave the key field empty to keep the saved key. Use a service account that only has the Viewer role on the GA4 property.

Does it work with the Plain permalink structure?

Yes. With Plain permalinks, the plugin asks GA4 for the page path including the query string (for example /?p=123) and matches it to the post.

Are private or password-protected posts shown?

Private posts, drafts, scheduled posts, and trashed posts are never shown. A post that is made private after retrieval is hidden immediately. Password-protected posts are shown with their protected title, in the same way as WordPress post lists.

What is removed when I delete the plugin?

The settings (including the service account key), the stored rankings, the retrieval status, the cached access token and time zone, and the scheduled events.

更新日志:

1.1.0 1.0.0