codler / react-ga4

React Google Analytics 4
https://www.npmjs.com/package/react-ga4
266 stars 34 forks source link

Should this track automatically collected events? #48

Closed brunomguimaraes closed 1 year ago

brunomguimaraes commented 1 year ago

Hey guys, I'm using this to simply track a pageview on my SPA But when I pass utm_ params through the url, it doesn't propely track the source/campaign, etc

Here's how I call the page_view:

ReactGA.event('page_view', {
        page_location: event.share_link,
        page_title: event.name,
});

Note that on the page_location param I'm passing a custom URL(without the utm's), dunno if that would make a difference

rysz-eriksson commented 2 months ago

Hello @brunomguimaraes - how did you manage to solve the problem? I'm also struggling with utm tags not being visible in GA4.