patrick
patrick

Reputation: 380

Google Analytics 4 rogue referral on SPA and referral exclusion

I am trying the new google analytics 4 and bigquery and would like to understand if there is a way to take care of the "rogue referral" describe by simo on this link https://www.simoahava.com/gtm-tips/fix-rogue-referral-problem-single-page-sites/ The idea is that for single page application website in order for the document location to stay the same we had to create a javascript variable with the original location ( landing page) and send it on the field to set on google tag manager to send to Google Universal Analytics

1 - Is there any way to have the same on Google Tag Manager but this time sending data to the New Google Analytics 4

2 - Is there a way to do referral exclusion as my domain name is consistently inside the utm medium / source / campaign while running this query

SELECT 
event_name,
DATETIME(TIMESTAMP_MICROS(event_timestamp)),
user_pseudo_id,
(select value.string_value from UNNEST(event_params) where key = 'page_location' ) as page_location,
(select value.string_value from UNNEST(event_params) where key = 'page_referrer' ) as page_referrer,
traffic_source.name,
traffic_source.medium,
traffic_source.source,
(select value.string_value from UNNEST(event_params) where key = 'source' ) as source_,
(select value.string_value from UNNEST(event_params) where key = 'medium' ) as medium_,
(select value.string_value from UNNEST(event_params) where key = 'campaign' ) as campaign_
FROM `mytable` 
where user_pseudo_id ='mycookie' 
group by 1,2,3,4,5,6,7,8,9,10,11
order by 2 desc 

Upvotes: 1

Views: 2619

Answers (2)

cisco
cisco

Reputation: 888

GA4 and Rogue Referrer

Looks like this issue does not persist in GA4 based on how sessions are calculated

From Google's documentation,

Differences in session counts between Google Analytics 4 and Universal Analytics

You may see lower session counts in Google Analytics 4 because Google Analytics 4 does not create a new session when the campaign source changes mid session, while Universal Analytics does create a new session under that circumstance.

Upvotes: 1

Javi Villar
Javi Villar

Reputation: 107

In GA4, the session value is defined on the "client-side" (browser), so the rules are different. GA4 doesn't calculate the session by checking the time between hits (more than 30mins) or if the channel change.

You can find more info here: https://support.google.com/analytics/answer/9191807

Upvotes: -1

Related Questions