google analytics - How to select number only regex -
i using following code select pages hotel id in url
$ga->requestreportdata(ga_profile_id,array('pagepath'),array('visitors'),'-visitors','pagepath=~'.$hotelid,$startdate,$enddate,1,100);
the problem if im looking hotelid 10, selects pages hotelid 1002 example
how can solve this?
you can test in google analytics query explorer :
if string ?hotelid=10 should work. place following line filters in query explore. note: [^0-9] tells next char cant number. need test still works if next char doesn't exist, think should work.
ga:pagepath=~hotelid=10[^0-9]
your code should think:
$ga->requestreportdata(ga_profile_id,array('pagepath'),array('visitors'),'-visitors','pagepath=~hotelid='.$hotelid.'[^0-9]',$startdate,$enddate,1,100);
Comments
Post a Comment