Question

How add plugin @amplitude/plugin-ga-events-forwarder-browser

  • 12 February 2024
  • 0 replies
  • 39 views

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?


0 replies

Be the first to reply!

Reply