Skip to content

no gtagOption for debug_mode? #79

Description

@ezbeazy

I don't see the gtag debug_mode option mapped to any parameter for ReactGA.initialize(). It also doesn't appear to be related to options.testMode, and I don't know what testMode is for since their is no description. Will the below not work? How can we use debug_mode? and what is options.testMode for?

 export const initGA = (ga4Id: string, devMode: boolean) => {
ReactGA.initialize(ga4Id, {dev_mode: devMode});
};
if (
!window.GA_ANALYTICS &&
googleAnalyticsTrackingCode
){
if (apiHost.includes('localhost:'){
initGA(googleAnalyticsTrackingCode, true);
} else {
initGA(googleAnalyticsTrackingCode, false);
}
window.GA_ANALYTICS = true;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions