Skip to main content

Google Publisher Tag Migrate to Setconfig

v1.0.0New

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install google-cloud-skills-google-publisher-tag-migrate-to-setconfig

What this does: Migrates web publisher JavaScript and TypeScript code from deprecated Google Publisher Tag (GPT) setter and getter methods on googletag.pubads() and googletag.Slot to setConfig() and getConfig(). Use when auditing, updating, or refactoring GPT or googletag code in web scripts, ad wrappers, or frontend components to replace deprecated configuration APIs (such as setTargeting, clearTargeting, updateTargetingFromMap, collapseEmptyDivs, setCollapseEmptyDiv, enableSingleRequest, disableInitialLoad, enableLazyLoad, setSafeFrameConfig, setForceSafeFrame, setCategoryExclusion, clearCategoryExclusions, setVideoContent, setLocation, setCookieOptions, setRequestNonPersonalizedAds, or getTargeting). Don't use for non-GPT ad server integrations.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/google-cloud-skills-google-publisher-tag-migrate-to-setconfig/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

Migrate Google Publisher Tag configuration to setConfig and getConfig

Replace deprecated Google Publisher Tag (GPT) setters and getters on
googletag.pubads() and googletag.Slot with setConfig() and getConfig()
without changing ad request behavior. This skill is the complete reference for
GPT setConfig and getConfig mappings and validation rules, so you don't
need to search the web.

Workflow

Batch edits per file and validate once at the end.

  • 1. Update TypeScript types in TypeScript projects. Update
    @types/google-publisher-tag to the latest release in package.json, and
    update local googletag or Slot interfaces to declare setConfig and
    getConfig. Run a package-manager install only if node_modules already
    exists, because sandboxed environments are often offline.
  • 2. Inventory GPT calls in a single pass. Read named files directly.
    For a directory, search for googletag to find entry points, then follow
    where Slot and PubAdsService objects are passed. Sort what you find into
    deprecated setters and getters, existing setConfig calls whose keys must
    be preserved, privacy and removed APIs, and
    APIs to keep unchanged.
  • 3. Migrate page-level setters. Use the
    page-level setters and
    privacy and removed APIs tables with the
    migration rules.
  • 4. Migrate slot-level setters. Use the
    slot-level setters table with the
    migration rules.
  • 5. Migrate getters and feature checks. Use the
    page-level getters and
    slot-level getters tables. Remove legacy fallback
    branches and change feature checks to test for getConfig.
  • 6. Validate.
    • If node_modules exists, run the project's existing checks. For
      standalone files without a test suite, run node --check {file_path}
      and review your diff instead of writing ad-hoc test scripts.
    • When browser or E2E tests run live gpt.js, read the console output.
      Invalid setConfig and getConfig properties don't throw. GPT logs a
      warning and ignores them.
    • If a check fails or logs GPT console warnings, fix the code and run it
      again.

Migration rules

Page settings: one call on googletag

Page-level setConfig and getConfig exist only on googletag.
PubAdsService has no setConfig, so googletag.pubads().setConfig() throws a
TypeError, including through an alias such as
const pubadsService = googletag.pubads().

  • Merge page settings from the same googletag.cmd.push callback or function
    into one googletag.setConfig() call before googletag.enableServices(),
    even when other calls such as defineSlot sit between them.
  • Don't merge across separate <script> tags, or across cmd.push blocks
    split by async header-bidding calls. They run at different times.
  • Replace detached method references too, such as
    const clear = pubads.clearTargeting or
    labels.forEach(pubads.setCategoryExclusion).
// Before
googletag.cmd.push(() => {
  const pubads = googletag.pubads();
  pubads.enableSingleRequest();
  googletag.defineSlot('/1234/banner', [728, 90], 'banner')
      ?.addService(pubads);
  pubads.collapseEmptyDivs();
  ['politics', 'gambling'].forEach(pubads.setCategoryExclusion);
  googletag.enableServices();
});

// After
googletag.cmd.push(() => {
  googletag.setConfig({
    singleRequest: true,
    collapseDiv: 'ON_NO_FILL',
    categoryExclusion: ['politics', 'gambling'],
  });
  googletag.defineSlot('/1234/banner', [728, 90], 'banner')
      ?.addService(googletag.pubads());
  googletag.enableServices();
});

Merging and clearing collections

Separate setConfig calls update collection settings instead of replacing them:

SettingSeparate callsClear one entryClear everything
targeting, adsenseAttributesMerge keys{ [key]: null }null
categoryExclusionAppend unique non-empty labels; [] is a no-opNot supportednull
  • Merge adjacent setCategoryExclusion calls or loops into one array.
  • When legacy code clears and then re-adds, clear with null in its own call
    first. Otherwise stale keys and labels survive. This applies to
    clearTargeting() followed by setTargeting() or
    updateTargetingFromMap(), and to clearCategoryExclusions() followed by
    setCategoryExclusion().
// Before
slot.clearTargeting();
slot.updateTargetingFromMap({ pos: 'top', section: 'news' });
slot.clearCategoryExclusions();
labels.forEach((label) => slot.setCategoryExclusion(label));

// After
slot.setConfig({ targeting: null });
slot.setConfig({ targeting: { pos: 'top', section: 'news' } });
slot.setConfig({ categoryExclusion: null });
if (labels.length > 0) {
  slot.setConfig({ categoryExclusion: labels });
}

SafeFrame and video ads

Merge related legacy calls on the same page or slot into one sub-object.

  • setForceSafeFrame() and setSafeFrameConfig() become one safeFrame
    object. Drop useUniqueDomain, which GPT ignores. Drop sandbox: false,
    because sandbox accepts only true or null.
  • enableVideoAds() and setVideoContent() become one videoAds object.
    Always include enableVideoAds: true, even for a standalone
    setVideoContent() call, because VideoAdsConfig requires it.
// Before
pubads.setForceSafeFrame(true);
pubads.setSafeFrameConfig({
  allowOverlayExpansion: false,
  useUniqueDomain: true,
  sandbox: false,
});
pubads.setVideoContent('content-id', 'cms-id');

// After
googletag.setConfig({
  safeFrame: { forceSafeFrame: true, allowOverlayExpansion: false },
  videoAds: {
    enableVideoAds: true,
    videoContentId: 'content-id',
    videoCmsId: 'cms-id',
  },
});

Collapsing empty divs

The legacy boolean means different things at page and slot level:

  • Page-level collapseEmptyDivs(false) still collapses on no fill, so it maps
    to 'ON_NO_FILL', never 'DISABLED'.
  • Slot-level setCollapseEmptyDiv(false) turns collapsing off, so it maps to
    'DISABLED'.

The setter tables list every form. When a slot call is conditional, keep the
condition and don't add an else branch that sets 'DISABLED'. The slot then
inherits the page setting:

// Before
if (collapseBeforeFetch) slot.setCollapseEmptyDiv(true, true);

// After: no 'DISABLED' fallback branch
if (collapseBeforeFetch) slot.setConfig({ collapseDiv: 'BEFORE_FETCH' });

Lazy loading

setConfig rejects top-level properties set to undefined, and legacy
lazy-load configs used -1 to mean "unset".

  • In wrappers where config may be undefined, default it to {}.
  • In wrappers where config is null, keep it null to clear the lazy-load
    setting.
  • Replace -1 with null in fetchMarginPercent, renderMarginPercent, and
    mobileScaling directly at call sites instead of adding a runtime helper.
// Before
googletag.pubads().enableLazyLoad({
  fetchMarginPercent: 300,
  renderMarginPercent: -1,
});
googletag.pubads().enableLazyLoad(config);

// After
googletag.setConfig({
  lazyLoad: {
    fetchMarginPercent: 300,
    renderMarginPercent: null,
  },
});
googletag.setConfig({ lazyLoad: config === undefined ? {} : config });

Dynamic targeting

setConfig validates targeting as
Record<string, string | string[] | null> | null. It rejects empty or
whitespace keys, undefined, numbers, booleans, and nested arrays.

null also changes meaning. Legacy setTargeting(key, null) was ignored, but
{ [key]: null } deletes the key, and String(null) sends 'null'.

When slot.updateTargetingFromMap(map) receives a map that already holds valid
string, string[], or null values, pass it straight to
slot.setConfig({ targeting: map }). Don't wrap it in a sanitizer. Maps that
the caller builds and controls fit this case, such as header-bidding targeting
maps and { [key]: null } maps that reset keys on purpose.

// Before
slot.updateTargetingFromMap(bidTargeting);
slot.updateTargetingFromMap({ pos: null, section: null });

// After
slot.setConfig({ targeting: bidTargeting });
slot.setConfig({ targeting: { pos: null, section: null } });

Sanitize only when the source can hold numbers, booleans, undefined, or
nested arrays. That usually means setTargeting() calls with variable keys or
values, including loops over Object.entries or Object.keys. Build a clean
object instead of passing the source through:

// Before
for (const [key, value] of Object.entries(params)) {
  googletag.pubads().setTargeting(key, value);
}

// After
const targeting: Record<string, string | string[]> = {};
for (const [key, value] of Object.entries(params)) {
  if (!key.trim() || value == null) continue; // Skip, don't delete.
  if (Array.isArray(value)) {
    const values = value.flat(Infinity).filter((v) => v != null).map(String);
    if (values.length > 0) targeting[key] = values;
  } else {
    targeting[key] = String(value);
  }
}
if (Object.keys(targeting).length > 0) {
  googletag.setConfig({ targeting });
}

To clean an untyped updateTargetingFromMap map, use the same loop, but copy
explicit null values through unchanged instead of skipping them. That way,
intentional resets still delete their keys.

Reading settings with getConfig

  • googletag.getConfig() supports adsenseAttributes, disableInitialLoad,
    and targeting. slot.getConfig() supports adsenseAttributes,
    categoryExclusion, and targeting. Every other setting is write-only.
  • getConfig() returns a deeply frozen object keyed by setting name, never a
    flat map, so don't mutate it. getConfig('targeting') returns
    { targeting: { ... } }, which replaces loops over getTargetingKeys()
    and getTargeting(key).
  • Legacy getTargeting(key) always returned string[], or [] when unset.
    getConfig('targeting').targeting?.[key] is typed as
    string | string[] | null | undefined, so normalize it before calling array
    methods such as .includes(), .map(), or .length:
function toArray(value: string | string[] | null | undefined): string[] {
  if (Array.isArray(value)) return value;
  return value == null ? [] : [value];
}

const sections = toArray(slot.getConfig('targeting').targeting?.['section']);

Slot null checks and existing config

  • defineSlot() and defineOutOfPageSlot() return Slot | null. Check the
    slot before calling slot.setConfig().
  • Keep the keys of existing setConfig() calls when merging in new settings.
  • Rename deprecated adYield to threadYield if it appears in
    googletag.setConfig().

Page-level mapping

Use these tables to replace deprecated googletag.pubads() setters and getters
with googletag.setConfig() and googletag.getConfig().

googletag.setConfig(config: googletag.config.PageSettingsConfig): void;
googletag.getConfig(keys: string | string[]): Readonly<
  Pick<
    googletag.config.PageSettingsConfig,
    'adsenseAttributes' | 'disableInitialLoad' | 'targeting'
  >
>;

Page-level setters

FeatureLegacy googletag.pubads() callReplacement
AdSense attributesset(key, value)googletag.setConfig({ adsenseAttributes: { [key]: value } })
Category exclusion (add)setCategoryExclusion(label)googletag.setConfig({ categoryExclusion: [label] })
Category exclusion (clear)clearCategoryExclusions()googletag.setConfig({ categoryExclusion: null })
CenteringsetCentering(isCentered)googletag.setConfig({ centering: isCentered })
Collapse empty divs (on no fill)collapseEmptyDivs() or collapseEmptyDivs(false)googletag.setConfig({ collapseDiv: 'ON_NO_FILL' })
Collapse empty divs (before fetch)collapseEmptyDivs(true)googletag.setConfig({ collapseDiv: 'BEFORE_FETCH' })
Initial loaddisableInitialLoad()googletag.setConfig({ disableInitialLoad: true })
Single Request ArchitectureenableSingleRequest()googletag.setConfig({ singleRequest: true })
Lazy loading (defaults)enableLazyLoad()googletag.setConfig({ lazyLoad: {} })
Lazy loading (custom)enableLazyLoad(config)googletag.setConfig({ lazyLoad: config === undefined ? {} : config })
Geographic locationsetLocation(address)googletag.setConfig({ location: address })
SafeFrame (force)setForceSafeFrame(force)googletag.setConfig({ safeFrame: { forceSafeFrame: force } })
SafeFrame (config)setSafeFrameConfig(config)googletag.setConfig({ safeFrame: config })
Targeting (set)setTargeting(key, value)googletag.setConfig({ targeting: { [key]: value } })
Targeting (clear one key)clearTargeting(key)googletag.setConfig({ targeting: { [key]: null } })
Targeting (clear all)clearTargeting()googletag.setConfig({ targeting: null })
Video ads (enable)enableVideoAds()googletag.setConfig({ videoAds: { enableVideoAds: true } })
Video ads (content)setVideoContent(contentId, cmsId)googletag.setConfig({ videoAds: { enableVideoAds: true, videoContentId: contentId, videoCmsId: cmsId } })

Page-level getters

toArray() is defined in
Reading settings with getConfig.

Legacy googletag.pubads() callReplacement
get(key)googletag.getConfig('adsenseAttributes').adsenseAttributes?.[key] ?? null
getAttributeKeys()Object.keys(googletag.getConfig('adsenseAttributes').adsenseAttributes ?? {})
isInitialLoadDisabled()Boolean(googletag.getConfig('disableInitialLoad').disableInitialLoad)
getTargeting(key)toArray(googletag.getConfig('targeting').targeting?.[key])
getTargetingKeys()Object.keys(googletag.getConfig('targeting').targeting ?? {})

Slot-level mapping

Use these tables to replace deprecated googletag.Slot setters and getters with
slot.setConfig() and slot.getConfig().

slot.setConfig(config: googletag.config.SlotSettingsConfig): googletag.Slot;
slot.getConfig(keys: string | string[]): Readonly<
  Pick<
    googletag.config.SlotSettingsConfig,
    'adsenseAttributes' | 'categoryExclusion' | 'targeting'
  >
>;

Slot-level setters

FeatureLegacy Slot callReplacement
AdSense attributesslot.set(key, value)slot.setConfig({ adsenseAttributes: { [key]: value } })
Category exclusion (add)slot.setCategoryExclusion(label)slot.setConfig({ categoryExclusion: [label] })
Category exclusion (clear)slot.clearCategoryExclusions()slot.setConfig({ categoryExclusion: null })
Click URL (non-SRA only)slot.setClickUrl(url)slot.setConfig({ clickUrl: url })
Collapse empty div (disabled)slot.setCollapseEmptyDiv(false) or slot.setCollapseEmptyDiv(false, true)slot.setConfig({ collapseDiv: 'DISABLED' })
Collapse empty div (on no fill)slot.setCollapseEmptyDiv(true) or slot.setCollapseEmptyDiv(true, false)slot.setConfig({ collapseDiv: 'ON_NO_FILL' })
Collapse empty div (before fetch)slot.setCollapseEmptyDiv(true, true)slot.setConfig({ collapseDiv: 'BEFORE_FETCH' })
SafeFrame (force)slot.setForceSafeFrame(force)slot.setConfig({ safeFrame: { forceSafeFrame: force } })
SafeFrame (config)slot.setSafeFrameConfig(config)slot.setConfig({ safeFrame: config })
Targeting (set)slot.setTargeting(key, value)slot.setConfig({ targeting: { [key]: value } })
Targeting (bulk map)slot.updateTargetingFromMap(map)slot.setConfig({ targeting: map })
Targeting (clear one key)slot.clearTargeting(key)slot.setConfig({ targeting: { [key]: null } })
Targeting (clear all)slot.clearTargeting()slot.setConfig({ targeting: null })

Slot-level getters

Legacy Slot callReplacement
slot.get(key)slot.getConfig('adsenseAttributes').adsenseAttributes?.[key] ?? null
slot.getAttributeKeys()Object.keys(slot.getConfig('adsenseAttributes').adsenseAttributes ?? {})
slot.getCategoryExclusions()slot.getConfig('categoryExclusion').categoryExclusion ?? []
slot.getTargeting(key)toArray(slot.getConfig('targeting').targeting?.[key])
slot.getTargetingKeys()Object.keys(slot.getConfig('targeting').targeting ?? {})
slot.getTargetingMap()slot.getConfig('targeting').targeting ?? {}

Privacy and removed APIs

Move legacy privacy setters to googletag.pubads().setPrivacySettings(), never
to setConfig(). Delete calls that GPT has removed.

Legacy googletag.pubads() callReplacement
setRequestNonPersonalizedAds(0 | 1)googletag.pubads().setPrivacySettings({ nonPersonalizedAds: true | false })
setTagForChildDirectedTreatment(0 | 1)googletag.pubads().setPrivacySettings({ childDirectedTreatment: true | false })
clearTagForChildDirectedTreatment()googletag.pubads().setPrivacySettings({ childDirectedTreatment: null })
setTagForUnderAgeOfConsent(0 | 1 | -1)googletag.pubads().setPrivacySettings({ underAgeOfConsent: true | false | null })
setCookieOptions(options)Removed from GPT. Delete the call without setting cookieOptions in setConfig or setPrivacySettings.
setLocation(latitude, longitude, radius?)Removed from GPT. Delete the call. location accepts only an address string, such as '10001,US', or null.

Numeric flags map 1 to true, 0 to false, and -1 or a missing value to
null. nonPersonalizedAds accepts only a boolean, so use Boolean(value).
For wrappers that forward a numeric flag:

function toPrivacyFlag(value) {
  if (value === 1) return true;
  if (value === 0) return false;
  return null; // -1 or omitted
}

// Before: googletag.pubads().setTagForUnderAgeOfConsent(value);
googletag.pubads().setPrivacySettings({
  underAgeOfConsent: toPrivacyFlag(value),
});

APIs to keep unchanged

Migrate only the deprecated methods listed in the mapping tables above. Leave
all other GPT and third-party calls unchanged, especially these common
look-alikes:

  • googletag.pubads().setPrivacySettings(...): Keep on googletag.pubads().
    googletag.setConfig({ privacyTreatments }) doesn't replace it.
  • googletag.pubads().setPublisherProvidedId(ppid): Keep on
    googletag.pubads(). Don't move it to googletag.setConfig().
  • googletag.setAdIframeTitle(title): Keep on googletag.
  • Third-party header bidding and non-GPT helpers: Leave calls such as
    pbjs.setConfig() and apstag.fetchBids() untouched, even when called
    through an alias.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
gke-manifest-generationGenerates and updates secure, production-ready Kubernetes YAML manifests optimized for GKE Autopilot and GKE Standard clusters. Use when creating or modifying GKE deployment manifests, configuring container security contexts, setting CPU/memory resource limits, defining readiness/liveness/startup probes, mounting secrets and volumes, configuring GKE Gateway API routes, targeting Spot VMs, or deploying AI model inference workloads (vLLM, TGI, Gemma). Don't use for live cluster operations, pod troubleshooting (use gke-workload-troubleshooting), or cluster infrastructure provisioning (use gke-cluster-creation).2 installsgoogle-analytics-admin-api-basicsManages Google Analytics account and property settings, enables the Analytics Admin API via the Cloud CLI, lists accounts and properties, and manages data streams, custom dimensions, conversion events, and integrations. Use when you need to programmatically configure Google Analytics accounts, provision properties, manage data retention, configure Measurement Protocol secrets, or manage Firebase and Google Ads links.1 installsgoogle-cloud-waf-cost-optimizationEvaluates Google Cloud workloads for cost efficiency and FinOps alignment using the Google Cloud Well-Architected Framework Cost Optimization pillar. Use when the user asks to analyze Google Cloud spend, reduce cloud bills, rightsize resources (for example, Compute, GKE, Storage, Databases), evaluate discount options (for example, CUDs, SUDs, Spot VMs), or eliminate idle capacity. Do not use for standalone product pricing lookups or non-cost architecture design.1 installsassured-workloads-basicsProvisions, inspects, updates, and deletes Google Cloud Assured Workloads V1 compliant folders, CMEK settings, Sovereign Controls by Partners, and service usage restrictions. Use when creating, listing, describing, updating, or deleting an Assured Workloads workload for any compliance regime or data boundary (FedRAMP, DoD IL2/IL4/IL5, ITAR, CJIS, Healthcare, Sovereign Controls by Partners, or Regional Data Boundaries). Don't use for brownfield assessments or custom frameworks (use assuredworkloads-environment-assessor or assuredworkloads-frameworks-*), or non-compliant folders.1 installsgoogle-cloud-solution-rag-enterprise-search-gke-sqldbDiscovers requirements, and generates architectural, design, and deployment guidance for a retrieval-augmented generation (RAG)-capable enterprise search system in Google Cloud. Use when users need a vector-enabled SQL database as the store and index for the embedding vectors, an open model and open-source inferencing framework, and Kubernetes containers to host all the application components. DON'T use this skill for fully-managed RAG, or SaaS search services, or when a non-SQL vector database is required.1 installsfirebase-basicsProvides foundational Firebase CLI setup, CLI installation, version checks (`firebase-tools@latest --version`), CLI login (including --no-localhost), project creation, project selection (`firebase use`), and app config file downloads (`google-services.json`, `GoogleService-Info.plist`). Use ONLY for CLI login, project creation/switching, or downloading app config files. Don't use for Firebase Hosting deploy, Firestore, Auth, App Hosting, Data Connect, Crashlytics, or Remote Config.1 installs

More from Google Cloud Skills

View source →
google-ads-api-mcp-setupGuides developers through downloading, configuring, and installing the official open-source Google Ads MCP Server. Use this skill when a user wants to connect their AI assistant (such as Gemini, Claude Code, or Cursor) to their Google Ads account to query campaigns or retrieve reporting metrics using natural language.4 installsspanner-basicsAssists in provisioning instances and databases, designing performant schemas, and querying data in Cloud Spanner on Google Cloud. Use when designing primary keys, writing SQL queries or client library code, or diagnosing performance issues.4 installsgke-workload-securityAudits, configures, and hardens workload-level security controls for Google Kubernetes Engine (GKE) applications and namespaces. Covers running security audits (`audit_cluster.sh`), enforcing Network Policies (default-deny and Dataplane V2 logging), isolating high-risk pods inside GKE Sandbox (`gVisor`), enforcing Pod Security Standards (`restricted` labeling) and pod securityContext, and mounting Secret Manager secrets via CSI (`SecretProviderClass`). Use when auditing workload security posture, isolating namespaces, applying pod security standards, or configuring network policies and secret volume mounts. Don't use for Workload Identity (use gke-workload-identity), cluster-wide control plane security, RBAC hardening, Binary Authorization, Shielded Nodes, or enabling platform-level GKE add-ons (use gke-platform-security instead).3 installsgke-upgradesPlans, executes, and validates Google Kubernetes Engine (GKE) cluster upgrades and maintenance operations for both Standard and Autopilot clusters. Produces upgrade plans, pre/post-upgrade checklists, maintenance runbooks with gcloud commands, release channel strategy, and troubleshooting guides. Handles node pool upgrade strategies (surge, blue-green), version compatibility, PDB management, and workload-specific concerns (stateful, GPU, operators). Use this skill whenever the user mentions GKE upgrades, Kubernetes version bumps, node pool maintenance, GKE patching, cluster version management, release channel selection, maintenance windows, surge upgrades, stuck upgrades, or any GKE lifecycle management task — even casual mentions like "we need to upgrade our clusters" or "plan our next GKE maintenance" or "our upgrade is stuck." Don't use for GKE cluster creation, application onboarding, general networking/routing setup, or security policy configurations (use gke-basics or relevant GK2 installsgoogle-cloud-recipe-networking-observabilityInvestigates Google Cloud networking issues by analyzing logs, metrics, and diagnostics. Use when investigating VPC Flow Logs, NAT, firewall, or threat logs, querying latency and throughput metrics, or running Connectivity Tests for path diagnostics.2 installsmigrate-to-rustClones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure/fix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust architectures, or optimizing Rust ports with LLVM PGO. Don't use for unrelated non-Rust refactoring or single-line syntax questions.2 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.653 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.553 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.365 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.266 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.185 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions149 installs

Frequently asked questions about google-publisher-tag-migrate-to-setconfig

What does the google-publisher-tag-migrate-to-setconfig skill do?

Migrates web publisher JavaScript and TypeScript code from deprecated Google Publisher Tag (GPT) setter and getter methods on googletag.pubads() and googletag.Slot to setConfig() and getConfig(). Use when auditing, updating, or refactoring GPT or googletag code in web scripts, ad wrappers, or frontend components to replace deprecated configuration APIs (such as setTargeting, clearTargeting, updateTargetingFromMap, collapseEmptyDivs, setCollapseEmptyDiv, enableSingleRequest, disableInitialLoad, enableLazyLoad, setSafeFrameConfig, setForceSafeFrame, setCategoryExclusion, clearCategoryExclusions, setVideoContent, setLocation, setCookieOptions, setRequestNonPersonalizedAds, or getTargeting). Don't use for non-GPT ad server integrations. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the google-publisher-tag-migrate-to-setconfig skill?

Run `npx @skills-hub-ai/cli install google-cloud-skills-google-publisher-tag-migrate-to-setconfig` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/google-cloud-skills-google-publisher-tag-migrate-to-setconfig/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does google-publisher-tag-migrate-to-setconfig work with?

google-publisher-tag-migrate-to-setconfig runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the google-publisher-tag-migrate-to-setconfig skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use google-publisher-tag-migrate-to-setconfig after installing it?

In Claude Code, type `/google-cloud-skills-google-publisher-tag-migrate-to-setconfig` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the google-publisher-tag-migrate-to-setconfig skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.