Filtering out all date hours past a point with regex for Google Analytics -
so want send filter query sending google analytics, in way results younger given day , hour
for example want results after 2013-03-12-15 (yyyy-mm-dd-hh)
my problem in how phrase regex not miss out records
okay, despite wrong comment still think easier solve use of index hour (than ga:datehour), ga:nthhour in api.
index hour given string of 6 numbers left-padded zeros (first hour 000000, second 000001 etc). results after 2013-03-12-15 set 2013-03-12 start date , filter out results index hour after 15 (or after 14 if want 15 included).
you still need regular expression, (imo) easier construct (than expression parses date) . first try be
filter ga:nthhour!~00001[0-5]|00000[0-9]
where 00001[0-5] filters out index hours ten 15 , 00000[0-9] filter index hour 0 9 (i'm sure can done more elegantly). tested in query explorer , reasonably sure returns desired result.
Comments
Post a Comment