Legato
Google Analytics ã® API ãæ±ãã¨ãã«ä¾¿å©ãª gem ã§ãã
ãã¿æ¸ãã§å®è¡ã¯ã§ããããã©
以åã«æ¸ããè¨äºã®ã¨ããã«ã³ã¼ããæ¸ãã¦ããã° Legato ãç¨ã㦠Google Analytics ã®çµæãåå¾ãããã¨ãã§ãã¾ããããããã®ã³ã¼ãã¯ï¼åãããããã®ãããããï¼ä¸ç´ç·ã®ãã¿æ¸ãã³ã¼ãã§ãã
ãã®ã³ã¼ããé©åã«åå²ãã¦æ½è±¡åããæ¹æ³ãèãã¦ã¿ã¾ãã
åæ
ããã§çæãã¦ããããã®ããLegatoï¼GAï¼ã®ç¹æ§ã§ãã
æ¬å®¶ã® GA ã®æä½ç»é¢ã§ã¯æ¢ç´¢çã«æ¡ä»¶ãå¤ããªãããã¼ã¿ãåå¾ãããã¨ãã§ãã¾ããã¨ããã Legato ãç¨ããå ´åã¯ååã¨ãã¦æ±ºã¾ããã£ãæ¡ä»¶ã§ãããã¼ã¿ãåå¾ãããã¨ãã§ãã¾ããã
ã¦ã§ãã¢ããªåããã¦å¯¾è©±çã«ãã©ã¼ã ã§æ¤ç´¢æ¡ä»¶ãå ¥åãã¦ããããã¨ãã§ãã¾ãããããããæ¤ç´¢æ¡ä»¶ãèæ ®ããè¨è¨ã¨ããã®ã¯ç¡çãããã§ããã*1ã
ãããã£ã¦ããã§ä¸ã¤ã®æ¹éãå®ã¾ãã¾ãããå©ç¨è ãå¤ããå¤ã決ãã¦æ¤ç´¢æ¡ä»¶ã«ãããã¨ãã§ããé ç®ï¼ä»»æå ¥åé ç®ï¼ãã¨ãå é¨ã§ãã¼ãã³ã¼ãã£ã³ã°ããã¦æ±ºãæã¡ããé ç®ï¼å 容åºå®é ç®ï¼ãã«åãããã¨ã§ãã
使ç¨ç¶æ³ã¨ãã¦ã¯ãRedash ã Superset ãªã©ã® BIãã¼ã« ã§è¡¨ç¤ºãããã¨ããã¦ã§ãã¢ããªã±ã¼ã·ã§ã³ã§ç°¡åãªæ¤ç´¢ãè¡ããã¨ãªã©ãæ³å®ãã¦ãã¾ãã
ã©ãããä»»æå ¥åé ç®ãã«ãããï¼ããªããï¼
ããã¯ããã¾ã§ç§ã®è¨è¨ã§ããã以ä¸ã®é ç®ã¯å©ç¨è ãä»»æã«è¨å®ã§ããé ç®ã¨ãã¾ããããããã®å¤ã¯å¤ãã YAML ã§è¨å®ããããã«ãã¾ãããã¦ã§ãã¢ããªã®å ´åã¯ãã©ã¼ã ããã®å ¥åã«ãªãã§ãããã
start_date end_date limit offset sort quota_user sampling_level segment_id
ããã«ä»¥ä¸ã®äºã¤ã®é ç®ãèªç±ã«ãã®å 容ã決ãããããä»»æå ¥åé ç®ãã¨ãã¾ããã
dimensions metrics
ãã®äºã¤ã«å ¥ãå¾ãå¤ã¯ããªãå¤ãã®ã§ãããç¨æããã¦ãã決ã¾ããã£ãå¤ããå ¥ããªãã®ã§ä»»æã«å ¥åãã¦ããããã¨ãã§ãã¾ããããã YAML ã§å¤ã«åºãã¾ããã
ãä»»æå ¥åé ç®ãã«ã§ããªãç®æ
ããã£ã«ã¿ã¼ãã«ã¤ãã¦ã¯ä»»æã«å ¥åãã¦ããããã¨ã¯ãã¾ããã§ãããèãå¾ããã£ã«ã¿ã¼ã®ãã¿ã¼ã³ã¯ç¡éã§ãããæ±ç¨çã«ã«ãã¼ãããã¨ã¯ä¸å¯è½ã ã¨èããããã§ãã
ã¤ã¾ãããã£ã«ã¿ã¼ã¯ææ¸ãã§æ¸ãã¦ãããã¨ã«ãªãã¾ãããã ãåå©ç¨ãããããããã«ããã£ã«ã¿ã¼ã ããéããã¢ã¸ã¥ã¼ã«ãä½ã*2ãããã§ä¸æ°ã«ãã£ã«ã¿ã¼ã®ã¡ã½ãããç»é²ããå©ç¨ããããã£ã«ã¿ã¼ã ããæåã§ãã§ã¤ã³ããã¨ããæ¹çã«ãã¾ãããåå¾ããããã¼ã¿ã®å 容ãã¨ã«å©ç¨ãããã£ã«ã¿ã¼ãæ¸ãï¼ãã¡ã¤ã«ãåå²ããï¼ããã«ãã¾ãããããã§è¨è¨ã¨ãã¦ã¯ããªãã¹ãããªããã¨æã£ã¦ãã¾ãã
çµè«
ä¸è¨ã®ãããªæ¹æ³ãæ¡ããã¨ã§ä¸åãã£ããã§ã¯ãªããæ§ã ãªãã¼ã¿ãæ§ã ãªå½¢ã§ç¶ç¶çãã¤å®¹æã«åå¾ã§ããè¨è¨ã«ãªã£ããã¨æãã¾ããæåã«è¦å´ããã¨å¾ã§æ¥½ã«ãªãã¾ããã