Google Analytics adapter bug with automatically collected page timings


#1

The newly released Google Analytics adapter seems to have an issue with interpreting automatically collected page timing hits (t=timing).

These hits are collected automatically for 1% of page view requests (if using default settings), but can be increased to 100% of page view requests by setting the siteSpeedSampleRate field in the GA tracker.

Anyway, these hits do not have the userTimingVariableName, userTimingCategory, or userTimingTime parameters set, because these are not user timings. The adapter seems to reject these hits as erroneous, because these three parameters are missing.

The Measurement Protocol Parameter Reference is annoyingly misleading here, as it claims that these variables are required if the hit type is “Timing”, when in reality these parameters are only required for custom timing hits.

So one option would be to make these parameter completely optional, or alternatively, if possible, to make all three mandatory if at least one of the three is present.


#2

Nice catch - I’ve created an issue on Github and a potential fix for this.


#3

Thanks for catching this @simoahava - and thanks for the PR @mike.

Mike I agree with your approach - in this case we will patch the existing schema. Any user who has already deployed the timing_1 table should update it to the new version to avoid Redshift loads from failing.