I'm getting this error from Firebase, I added Analytics to my project today, and now the landing page shows this error in the console.
helpers.ts:72 GET https://www.googletagmanager.com/gtag/js?l=dataLayer net::ERR_BLOCKED_BY_CLIENT
I'm not importing GTAG in my index.html (i'm using React) this thing
<script async src="https://www.googletagmanager.com/gtag/js"></script>
Because I'm not using it.
and my config file for Firebase looks like this
import firebase from "firebase/app";
import "firebase/firestore";
import "firebase/auth";
import "firebase/analytics";
// Your web app's Firebase configuration
var firebaseConfig = {
//the usual
measurementId: "G-something",
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
export const auth = firebase.auth();
export const db = firebase.firestore();
export const firestore = firebase.firestore;
export const analytics = firebase.analytics;
Landing page
import { analytics } from "../configs/fbConfig";`
useEffect(() => {
analytics().setCurrentScreen(window.location.pathname); // sets `screen_name` parameter
analytics().logEvent("screen_view"); // log event with `screen_name` parameter attached
analytics().logEvent("landing_page_view", { landing_at: Date.now() });
});
That's all i have, i want to log when the user see the landing page, so I can use a Funnel ( I believe ) to track the process from Landing to Login page.
Do I have to create something in the Firebase Console to make this work ? documentation for web analytics is kind of messy..

