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

Update Google Analytics script #1846

Closed
Gerrit0 opened this issue Jan 15, 2022 · 1 comment
Closed

Update Google Analytics script #1846

Gerrit0 opened this issue Jan 15, 2022 · 1 comment
Milestone

Comments

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 15, 2022

TypeDoc 0.22.10 uses a version of a google analytics script which is no longer recommended by Google. It should be updated to the latest version, and gaSite removed since it is no longer required.

@Gerrit0 Gerrit0 added this to To do in TSDoc - v0.23 via automation Feb 15, 2022
@Gerrit0 Gerrit0 moved this from To do to Done in TSDoc - v0.23 Feb 15, 2022
@donalffons
Copy link

I found this ticket while I was having trouble with GA and typedoc.
GA is configured and GA requests are issued by my typedoc page (with collect?v=1 in the request URL). But none of them show up in my GA dashboard. After following the doc on custom themes, I was able to integrate my own analytics function. In my case using firebase. With that everything works fine.

analytics = () => (
      <script type="module">
        <JSX.Raw html={`
          import { initializeApp } from "https://www.gstatic.com/firebasejs/9.6.10/firebase-app.js";
          import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.6.10/firebase-analytics.js";
        
          const firebaseConfig = {
            apiKey: "AIabcdefghijkl",
            authDomain: "blablabla.firebaseapp.com",
            projectId: "bla",
            storageBucket: "blablabla.appspot.com",
            messagingSenderId: "1234567",
            appId: "6:128937198273:web:295387298347",
            measurementId: "G-LLK234LKJ"
          };
        
          const app = initializeApp(firebaseConfig);
          getAnalytics(app);
        `} />
      </script>
    )

PS: Typedoc is fantastic. Thanks for all your great work!

@Gerrit0 Gerrit0 added this to the v0.23 milestone Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants