Skip to main content

Materials Reference (2025-10-20)

Complete reference for available materials in QA ZERO API version 2025-10-20.

Plugin Version Required

Minimum Plugin Version: 3.0.0.0+

Check your version: WordPress Admin → Plugins → QA Platform
Or call /guide endpoint to see plugin_version

Not compatible? See Compatibility Guide


Overview

This version provides two materials:

MaterialTypeSourceDescriptionPlugin Ver
allpvLogview_pv functionPage view data with visitor info3.0.0.0+
gscLogget_gsc_lp_query functionGoogle Search Console data3.0.0.0+

Source: Both materials are retrieved from file_functions.php


allpv Material

Page view data including visitor information, device details, and behavioral metrics.

Description

The allpv material provides comprehensive page view data extracted from the view_pv function. It includes identity information, page details, referral sources, UTM parameters, device/browser information, and timing metrics.

Source Function: file_functions.php::view_pv

Field Changes in Plugin 3.0.0.0

Removed Fields (not available in this version):

  • session_id - Session identifier
  • tracking_domain - Tracking domain
  • path_prefix - URL path prefix
  • utm_content - UTM content parameter
  • utm_term - UTM term parameter
  • version_id - Version history ID
  • ❌ All goal fields: is_goal_0 through is_goal_10, is_submit

Changed Fields:

  • 🔄 countrycountry_code (now ISO 3166-1 alpha-2 format)

Available Columns

Identity & Session

ColumnTypeDescriptionIndexed
pv_iduint64Unique page view identifier

| reader_id | uint64 | Visitor identifier (persistent) | ✓ |

Page Information

ColumnTypeDescriptionIndexed
page_iduint64Page identifier
urlstringFull page URLPartial*
titlestringPage title-

*Partial index: Exact match or parameter-free exact match only

Referral & UTM Parameters

ColumnTypeDescriptionIndexed
source_domainstringReferrer domain-
referrerstringFull referrer URL-
utm_sourcestringUTM source parameter-
utm_mediumstringUTM medium parameter-
utm_campaignstringUTM campaign parameter-

Device & Browser

ColumnTypeDescriptionIndexed
uastringUser Agent (partial)-
device_typestringDevice type: "dsk", "smp", "tab"-
osstringOperating system (Windows, iOS, Android, etc.)
browserstringBrowser (Chrome, Safari, Firefox, etc.)
languagestringUser language
country_codestringUser country code (ISO 3166-1 alpha-2)

Timing & Behavior

ColumnTypeDescriptionIndexed
access_timeint64Page view timestamp (ISO8601)
pvuint16Page number within session-
speed_msecuint16Page load time (milliseconds, 0-65535)-
browse_secuint16Browse time (seconds, 0-65535)-
is_lastboolExit flag (last page in session)-
is_newuserboolNew user flag-

Common Column Sets

Basic page info:

{
"keep": [
"allpv.url",
"allpv.title",
"allpv.access_time"
]
}

Traffic source analysis:

{
"keep": [
"allpv.url",
"allpv.source_domain",
"allpv.utm_source",
"allpv.utm_medium",
"allpv.utm_campaign"
]
}

Device analysis:

{
"keep": [
"allpv.url",
"allpv.device_type",
"allpv.os",
"allpv.browser"
]
}

User behavior:

{
"keep": [
"allpv.reader_id",
"allpv.pv",
"allpv.browse_sec",
"allpv.is_newuser",
"allpv.is_last"
]
}

Example Queries

Get recent page views:

{
"tracking_id": "abc123",
"materials": [{"name": "allpv"}],
"time": {
"start": "2025-10-01T00:00:00",
"end": "2025-10-20T00:00:00",
"tz": "Asia/Tokyo"
},
"make": {
"recent": {
"from": ["allpv"],
"keep": [
"allpv.url",
"allpv.title",
"allpv.access_time"
]
}
},
"result": {
"use": "recent",
"limit": 10
}
}

Mobile traffic:

{
"tracking_id": "abc123",
"materials": [{"name": "allpv"}],
"time": {
"start": "2025-10-01T00:00:00",
"end": "2025-10-20T00:00:00",
"tz": "Asia/Tokyo"
},
"make": {
"mobile": {
"from": ["allpv"],
"keep": [
"allpv.url",
"allpv.device_type",
"allpv.os",
"allpv.browser"
]
}
},
"result": {
"use": "mobile",
"limit": 100
}
}

New vs returning visitors:

{
"tracking_id": "abc123",
"materials": [{"name": "allpv"}],
"time": {
"start": "2025-10-01T00:00:00",
"end": "2025-10-20T00:00:00",
"tz": "Asia/Tokyo"
},
"make": {
"visitors": {
"from": ["allpv"],
"keep": [
"allpv.reader_id",
"allpv.is_newuser",
"allpv.access_time"
]
}
},
"result": {
"use": "visitors",
"limit": 500
}
}

gsc Material

Google Search Console data for SEO analysis.

Description

The gsc material provides search performance data from Google Search Console, including keywords, impressions, clicks, and ranking positions. Data is aggregated by page and keyword combination.

Source Function: file_functions.php::get_gsc_lp_query

Available Columns

ColumnTypeDescription
page_idintPage identifier
titlestringPage title
urlstringPage URL
search_typeintSearch type (web, image, video)
keywordstringSearch keyword/query
clicks_sumintTotal clicks for period
impressions_sumintTotal impressions for period
ctrfloatClick-through rate (clicks/impressions)
position_wavgfloatWeighted average position
first_positionfloatFirst position in period
latest_positionfloatLatest position in period
position_historystringDaily position history (CSV format)

Column Details

page_id:

  • Links to the same page_id in allpv material
  • Can be used for joining (in future versions)

search_type:

  • Numeric code for search type
  • Common values: web search, image search, video search

keyword:

  • The actual search query users entered
  • Exact match from Google Search Console

clicks_sum:

  • Total number of clicks from this keyword to this page
  • Aggregated over the time period

impressions_sum:

  • Total number of times the page appeared in search results
  • For this specific keyword

ctr:

  • Click-through rate: clicks_sum / impressions_sum
  • Calculated automatically
  • Range: 0.0 to 1.0 (0% to 100%)

position_wavg:

  • Weighted average ranking position
  • Lower is better (1.0 = top position)
  • Weighted by impressions

first_position:

  • Ranking position at the start of the period
  • Useful for tracking movement

latest_position:

  • Ranking position at the end of the period
  • Compare with first_position to see trends

position_history:

  • Daily position data in CSV format
  • Example: "2025-10-01:5.2,2025-10-02:4.8,2025-10-03:4.5"

Common Column Sets

Basic keyword performance:

{
"keep": [
"gsc.keyword",
"gsc.clicks_sum",
"gsc.impressions_sum",
"gsc.ctr"
]
}

Ranking analysis:

{
"keep": [
"gsc.keyword",
"gsc.url",
"gsc.position_wavg",
"gsc.first_position",
"gsc.latest_position"
]
}

Complete keyword data:

{
"keep": [
"gsc.keyword",
"gsc.url",
"gsc.title",
"gsc.clicks_sum",
"gsc.impressions_sum",
"gsc.ctr",
"gsc.position_wavg"
]
}

Example Queries

Top keywords by clicks:

{
"tracking_id": "abc123",
"materials": [{"name": "gsc"}],
"time": {
"start": "2025-10-01T00:00:00",
"end": "2025-10-20T00:00:00",
"tz": "Asia/Tokyo"
},
"make": {
"top_keywords": {
"from": ["gsc"],
"keep": [
"gsc.keyword",
"gsc.clicks_sum",
"gsc.impressions_sum",
"gsc.ctr"
]
}
},
"result": {
"use": "top_keywords",
"limit": 50
}
}

Ranking positions:

{
"tracking_id": "abc123",
"materials": [{"name": "gsc"}],
"time": {
"start": "2025-10-01T00:00:00",
"end": "2025-10-20T00:00:00",
"tz": "Asia/Tokyo"
},
"make": {
"rankings": {
"from": ["gsc"],
"keep": [
"gsc.keyword",
"gsc.url",
"gsc.position_wavg",
"gsc.first_position",
"gsc.latest_position"
]
}
},
"result": {
"use": "rankings",
"limit": 100
}
}

Page-level SEO performance:

{
"tracking_id": "abc123",
"materials": [{"name": "gsc"}],
"time": {
"start": "2025-10-01T00:00:00",
"end": "2025-10-20T00:00:00",
"tz": "Asia/Tokyo"
},
"make": {
"page_seo": {
"from": ["gsc"],
"keep": [
"gsc.url",
"gsc.title",
"gsc.keyword",
"gsc.clicks_sum"
]
}
},
"result": {
"use": "page_seo",
"limit": 200
}
}

Data Types Reference

TypeRangeDescriptionExample
uint80-255Small integergoal flags
uint160-65,535Medium integerbrowse_sec, speed_msec
uint320-4,294,967,295Large integerversion_id
uint640-18+ quintillionVery large integerpv_id, reader_id
int-2B to +2BSigned integerpage_id, search_type
int64Very large rangeLarge signed integeraccess_time (timestamp)
floatDecimalFloating point numberctr, position_wavg
stringVariableText dataurl, title, keyword
booltrue/falseBoolean flagis_newuser, is_last

Using Indexed Columns

Columns marked "Indexed: ✓" support faster queries in future versions when filtering becomes available.

Currently indexed columns:

allpv:

  • pv_id - Unique identifier
  • reader_id - Visitor tracking
  • page_id - Page reference
  • tracking_domain - Site filtering
  • url - Page URL (partial)
  • os - Operating system
  • browser - Browser type
  • language - User language
  • country - Geographic data
  • access_time - Time-based queries

Note: While indexing exists in the database, this version doesn't support filtering yet. Indexes will be utilized when the filter feature is added in future versions.


Future Enhancements

Planned for future versions:

Additional Materials:

  • clicks - Click event data
  • ec - E-commerce transactions
  • inner_search - Internal site search
  • page_detail - Extended page information

Enhanced Columns:

  • Behavioral metrics (scroll depth, dwell time)
  • Page type classification
  • Enhanced UTM tracking
  • Custom dimensions

Tips & Best Practices

1. Start with Essential Columns

Don't request all columns at once. Start with what you need:

// ✅ Good - only necessary columns
{
"keep": ["allpv.url", "allpv.title"]
}

// ❌ Excessive - too many columns
{
"keep": [
"allpv.pv_id", "allpv.session_id", "allpv.reader_id",
"allpv.page_id", "allpv.url", "allpv.title",
// ... 20 more columns
]
}

2. Use count_only to Check Data Volume

Before fetching large datasets:

{
"result": {
"use": "my_view",
"count_only": true
}
}

3. Verify Column Names

Check available columns using the materials endpoint:

curl -u "user:pass" \
"https://your-site.com/wp-json/qa-platform/materials?version=2025-10-20"

4. Understand Data Types

Choose appropriate columns for your analysis:

  • Use pv_id or session_id for counting
  • Use access_time for time-series analysis
  • Use url or title for content analysis
  • Use device_type/os/browser for device analysis

5. Plan for Future Joins

Even though joins aren't supported yet, keep in mind:

  • page_id links allpv and gsc
  • reader_id tracks visitors across sessions
  • These will be useful when join functionality is added

Common Use Cases

Use Case 1: Traffic Overview

Get basic traffic information:

{
"keep": [
"allpv.url",
"allpv.title",
"allpv.access_time",
"allpv.device_type"
]
}

Use Case 2: SEO Analysis

Analyze search performance:

{
"keep": [
"gsc.keyword",
"gsc.url",
"gsc.clicks_sum",
"gsc.position_wavg"
]
}

Use Case 3: Campaign Tracking

Track UTM campaigns:

{
"keep": [
"allpv.url",
"allpv.utm_source",
"allpv.utm_medium",
"allpv.utm_campaign",
"allpv.access_time"
]
}

Use Case 4: Device Analysis

Analyze device usage:

{
"keep": [
"allpv.device_type",
"allpv.os",
"allpv.browser",
"allpv.url"
]
}

Next Steps