3
3 Comments

firebase hosting of static sites + google analytics

I am setting up a static web site (trying to learn more about it) and then firebase hosting it. I can turn on "analytics" on firebase but it treats a website as "App+Web (Beta)", which makes me wary.

The resulting views in GA do not look familiar, and I'm not sure if I actually need code in the web page or not, especially since I'm not actually doing anything that is an app yet.

Has anyone gone through this before? Should I just stick with gtag.js and the plain old method of tracking?

  1. 2

    I use Firebase Analytics on all my projects.

    You do need to initialize Firebase on your project on the code level.

    Here is the guide to do so:
    https://firebase.google.com/docs/web/setup

    1. 1

      Thanks for the thoughts - I did see that. But what throws me off is:

      1. the project is a static site, so I don't really have a "javascript project". So is that okay?
      2. I installed GA Debug and Google Tag Manager Assistant extensions... and when I used those I would get errors indicating that the tracker was being loaded twice. So then it got more confusing because I can't tell if firebase is doing the tracking on the backend quietly.
      3. the App+Web dashboard at analytics.google.com... I couldn't find a simple page views count. Just "users".
      1. 2
        1. JavaScript project in this context refers to just Web based project. If you have a static site this is the right one to use.
        2. I am not sure if those extensions are compatible with Firebase Analytics Reporting, as it is still in beta.
        3. If you enabled Firebase Analytics Reporting when you created a Firebase project, you would have a different looking dashboard inside Google Analytics for that project. I am not sure if you can disable Reporting, after you have selected it.
Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 49 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 29 comments My Top 20 Free Tools That I Use Everyday as an Indie Hacker 18 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments