DOI-ONRR / blog-nrrd

Blog repo for NRRD site.
MIT License
3 stars 4 forks source link

GA4 - ODDD Property Analytics: look into erroneous blog URLs #321

Closed cthomasONRR closed 4 months ago

cthomasONRR commented 4 months ago

In GA4 - ODDD Property, I'm seeing blog URLs that have this "/?dg" at the end. It's making consolidating data by blog post very difficult. Could either Erin or Jeff help me look into this?

image.png
cthomasONRR commented 4 months ago

From Erin: ?... at the end of URLs are either query or tracking parameters and since we don't use query parameters on the blog I'm almost certain ?dg is a tracking parameter. I can adjust our property to filter those out if we want but let's check and see what Jeff thinks. It could be a few different things - something from GoogleTag manager, Bugcrowd, or something inserted from another site that's linking to us. If Jeff has any idea where the tracking parameter is coming from, we can decide if we just want the parameter removed so it counts towards analytics, or if we want those hits removed entirely from analytics.

greensomes commented 4 months ago

@cthomasONRR, I can confirm that the "?dg" is not likely to be coming from within the application. While we can't do anything about what is already in GA, Tag Manager can be utilized to strip any such query parameters from the URL prior to it being sent to GA. I'll dig into that.

cthomasONRR commented 4 months ago

@greensomes Amazing, thank you! Fixing data going forward would be a huge help!

greensomes commented 4 months ago

I configured GTM based on guidance I got from this video and this video.

greensomes commented 4 months ago

@cthomasONRR, I have published a new version of the GTM container for the blog. It includes a new variable and changes to Google Tag so that "?dg" is stripped from the Page URL. I've taken a blacklist approach (specifying which params should be removed) because the whitelist didn't work as I expected it to. Let me know if other query parameters show up that need to be filtered.

cthomasONRR commented 4 months ago

@greensomes Thank you! We can close this issue and I can make a new one if something else pops up next month. Since this is implemented mid-April, I think May data will be the first full month for this change to be in effect.