publ betaReference (MCP guide)
Open publ console

publ Reference

Migration map.

analytics_tools_get

Read the selected channel's five analytics IDs and a revision for analytics_tools_apply. This is one screen, channel.analytics-tools, with provider settings exposed together.

Access and input

Requires OWNER or DELEGATEE with MANAGE_ANALYTICS_TOOLS for the selected channel. Design, SEO or monetization permission alone is insufficient. The source-defined hosted selected-channel resource admits this tool only for its exact channelCode; an account resource does not.

The strict input accepts only channelCode: a string of 1–512 characters, excluding literal dot/double dot, slash, backslash, ASCII control characters and DEL. Select it through authorized channel discovery; do not substitute a numeric ID, URL or credentials.

{"channelCode":"selected-channel-code"}

The host must configure the selected CHANNEL_ENV and DNS service origins. The reader needs no recache service. Service URLs and credentials are host configuration, not tool inputs.

Inputs

This tool takes no input fields.

Results and revision

The workflow reads the custom record and connected-domain observation twice, compares them, then rechecks the channel and current operator/credential context. An existing record returns success / ANALYTICS_SETTINGS with initialized:true, settings, revision, recacheDomain and writesPerformed:false. Settings contains gaTrackingId (Google Analytics), gtmId (Google Tag Manager), fbPixelId (Meta Pixel), kaPixelId (Kakao Pixel) and nvPreLogId (Naver Premium Log). Stored strings, including blanks, are returned without normalization or invented defaults.

A transport-verified custom-record HTTP 404 returns action_required / ANALYTICS_INITIALIZATION_REQUIRED, initialized:false, a revision and requiredAction.kind explicit_apply. Reading does not create the record. A malformed or null HTTP 200 is ANALYTICS_RESPONSE_UNVERIFIED, not evidence of absence. The custom record must have a positive ID, the exact channel ID, timestamps and all five string fields.

recacheDomain is either an observed domainName/status or kind unverified with httpStatus:404. Analytics has no active-domain or paid-plan prerequisite: the writer can use the source channel-only recache path when DNS is unverified. A successfully observed domain supplies the header even when its status is not ACTIVATED. Malformed successful domain responses are rejected.

The revision includes the verified context, complete parsed custom record, timestamps and domain observation. It also protects unrelated and unknown JSON business settings. Only rotating top-level experimentals.id and experimentals.exp_id are excluded; nested fields with those names remain significant. The returned settings projection contains only the five analytics IDs, so do not compute a revision from that projection. Another custom-setting, domain or credential change can invalidate it.

ANALYTICS_CHANGED means the repeated observations differed; SCREEN_CONTEXT_CHANGED or authentication/context errors require resolving the selected context before continuing. A fresh revision uses the final verified context, including verified internal renewal. It does not authorize reusing an old revision after external credential replacement. Repeated reads are not an atomic snapshot.

Effects and limits

This read performs no initialization, save, recache, provider login, tracking request or task creation. verification.confirmed and storedSettingsVerified refer only to the existing stored observation. Provider ownership, event delivery, visitor execution and atomicity remain unverified.

When available, the single console destination opens the selected channel's /channels/{channelCode}/analytics-tools/home screen. Demo omits a live destination.