Hi!
I'm trying to connect a plugin to get Measurement ID
import {Identify, identify, init, add, track, logEvent} from '@amplitude/analytics-browser';
import {AMPLITUDE_API_KEY} from "~/constants/conf";
import {gaEventsForwarderPlugin} from '@amplitude/plugin-ga-events-forwarder-browser';
const initAmplitude = () => {
add(gaEventsForwarderPlugin());
init(AMPLITUDE_API_KEY, '',
{
defaultTracking: {
attribution: {
resetSessionOnNewCampaign: true
},
sessions: true,
pageViews: true
}
}
);
};
initAmplitude();
In this case, the following error appears - Cannot read properties of undefined (reading 'sendBeacon').
How can I fix this?