Skip to content

fix: GoogleTagManager default key case missmatch #179

Closed
@Ask1n

Description

@Ask1n

🐛 The bug

Example from docs does not work

Because useRegistryScript doesn't get gtm id from useRuntimeConfig

export function scriptRuntimeConfig<T extends keyof ScriptRegistry>(key: T) {
return ((useRuntimeConfig().public.scripts || {}) as ScriptRegistry)[key]
}

default key "google-tag-manager" but useRuntimeConfig().public.scripts has "googleTagManager"

return useRegistryScript<T, typeof GoogleTagManagerOptions>(_options?.key || 'google-tag-manager', options => ({

🛠️ To reproduce

^

🌈 Expected behavior

expected that useScriptGoogleTagManager() gets gtm id from config

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions