Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types for @analytics/google-tag-manager #380

Open
borasemiz opened this issue Jun 7, 2023 · 2 comments
Open

Types for @analytics/google-tag-manager #380

borasemiz opened this issue Jun 7, 2023 · 2 comments

Comments

@borasemiz
Copy link

Hello,

The analytics package has built-in TypeScript types. It would be great if its plugin packages, like @analytics/google-tag-manager, have type declarations as well.

@grumpyoldman-io
Copy link
Contributor

I'm currently using this fallback:

declare module '@analytics/google-tag-manager' {
  import type { AnalyticsPlugin } from 'analytics';

  export interface GoogleTagManagerConfig {
    auth?: string;
    containerId: string;
    customScriptSrc?: string;
    dataLayerName?: string;
    debug?: boolean;
    execution?: string;
    preview?: string;
  }

  function googleTagManager(config: GoogleTagManagerConfig): AnalyticsPlugin;

  export default googleTagManager;
}

It might not be perfect, but it does help us for now.

@hsdonkin
Copy link

hsdonkin commented Nov 6, 2023

@borasemiz I had this issue, and followed the advice in this thread:
#99 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants