ãã®èšäºã¯ãAndroidã¢ããªã±ãŒã·ã§ã³ãæäœãããã®ã¢ããªã±ãŒã·ã§ã³ã§åºåãã£ã³ããŒã³ãéå§ããçµæãåæããGoogleAnalyticsãããã«äœ¿çšã§ããªããªã£ãããšã«è ¹ãç«ãŠãŠãã人ã«åœ¹ç«ã¡ãŸãããã®èšäºã«ã¯ãBigQueryãFirebaseã«æ¥ç¶ããDataStudioã§çŸããã¬ã³ããªã³ã°ããæ¹æ³ã«ã€ããŠã®èª¬æãå«ãŸããŠããŸãã
Axmorã¯2010幎ããã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ãéçºããŠããŸãã 2016幎ããã·ã¢æ倧ã®èªç©ºäŒç€Ÿã®1ã€ãããã±ãã販売çšã®Androidã¯ã©ã€ã¢ã³ãã¢ããªã±ãŒã·ã§ã³ã®æ¹èšãšãã®åŸã®éçºã泚æããŸãããç¹ã«ãç§ãã¡ã®ã¿ã¹ã¯ã«ã¯ãã¢ããªã±ãŒã·ã§ã³å ã§å®æçã«è¡ãããããã¢ãŒã·ã§ã³ã®åæãåéããããã®ããŒã«ã®éçºãããã³èŠèŠçãªåœ¢åŒã§ã®ããŒã¿ã®æäŸãå«ãŸããŠããŸããã
2020幎ãŸã§ãç§ãã¡ã¯ãããã®ç®çã®ããã«ããããŠä»ã®ã¢ããªã±ãŒã·ã§ã³ã§GoogleAnalyticsã䜿çšããŠããŸããããããã2æ4æ¥ãäŒæ¥ã¯ãã®æ©èœããªãã«ããFirebaseAnalyticsãžã®åãæ¿ããæšå¥šããŸããããã®SDKïŒè±èªã®ãœãããŠã§ã¢éçºãããããïŒã¯ãåã®SDKãæäŸãããã¹ãŠã®å¯èœæ§ãæäŸããããã§ã¯ãªããç¹ã«ãéæšæºã®ã¬ããŒããäœæããããšã¯ã§ããŸããã
Firebase Analyticsã®å¶éãšãã®å¯ŸåŠæ¹æ³ã¯äœã§ããïŒ
ãã®åé¡ã解決ããç§ãã¡ã®çµéšã説æããããã«ãèªç©ºåžã販売ããããã®ã¢ããªã±ãŒã·ã§ã³ã«ç®ãåããŸããããGoogle AnalyticsãåæãããFirebase Analyticsã眮ãæããããããã«ãªã£ããšãã顧客ã®ãŠãŒã¶ãŒè¡ååæãåãæ·±ãã§ç¶æããæ°ããéæšæºã¬ããŒãããã°ããèšå®ãããšåæã«ãçŸããã¢ã¯ã»ã¹å¯èœãªèŠèŠåãæäŸãããšãã課é¡ã«çŽé¢ããŸããã
Google Analyticsã§ã¯ããŠãŒã¶ãŒãã¢ã¯ã»ã¹ããç»é¢ããã±ãããæ¢ããŠããç®çå°ãåºèº«å°ãã¢ããªã±ãŒã·ã§ã³ã§èš±å¯ãããŠããç»é¢ã®æ°ãå¿åã®ç»é¢ã®æ°ã確èªã§ããŸããããã«ãåæ¹åã§è³Œå ¥ããããã±ããã®éãããã¢ãŒã·ã§ã³åŸã«ç¹å®ã®æ¹åã®å£²äžãã©ã®ããã«å¢å ããããªã©ãåžžã«ç¢ºèªããŠããŸãããFirebase Analyticsã§ã¯ãå€æã詳现ã«åæã§ããçµ±èšã®ãã®2çªç®ã®éšåã¯ãçã®åœ¢åŒã§ã®ã¿å©çšå¯èœã§ãããã€ãŸããããã匷åããæ¹æ³ãå¿ èŠã§ãã
FirebaseAnalyticsã§ã§ããããšã¯æ¬¡ã®ãšããã§ãã
- è³Œå ¥ã€ãã³ããèšå®ããŸãã
- ãã©ã¡ãŒã¿ã§ã¯ã補åã®ååïŒæ¹åãŸãã¯ãã®èå¥åãšäŸ¡æ ŒïŒã瀺ããŸãã
- 次ã«ãWebãµã€ãã®ã¬ããŒãã§ãã©ã®ãã©ã€ãã§è²©å£²ããããã±ããã®æ°ãå¹³åè³Œå ¥äŸ¡æ Œãåèšè³Œå ¥æ°ã確èªã§ããŸãã
ã€ã©ã¹ãã®æ å ±ã¯å®éã®ãã®ãšã¯äžèŽããŠããŸããããã¹ãŠã®æ°åã¯äŒæ¥ç§å¯ã®ããã«å€æŽãããŠããŸããããã¯ãäŸã®æå³ãšæ確ãã«åœ±é¿ãäžããŸãããåºæ¬çã«ãFirebaseã®æ©èœã®ã¿ã瀺ããŸãã
ããã§ã¯ãäœäººã®ãŠãŒã¶ãŒãäœæã®ãã±ãããè³Œå ¥ãããã確èªããŸãã顧客ã¯ãããšãã°ãYekaterinburg-Moscowã«ãŒãã®ãã±ããããããè³Œå ¥ããããç¥ããããšèããŠããŸããFirebaseAnalyticsã¯ãã®ãããªçããæäŸããŸããã
ã¬ããŒãã®æ å ±å 容ã¯ãæšæºã®ãã©ã¡ãŒã¿ã»ããã«ãã£ãŠå¶éãããŸããå šäœåã®ã¿ã衚瀺ãããŸãã
ãã®å ŽåãFirebase Analyticsã§å®å šã«å®è£ ã§ããªãã£ãããŒã¿åæã®å¥ã®äŸïŒã¢ããªã±ãŒã·ã§ã³ã¯ããã©ã€ããšã«ãŒãã®å éšåºåã衚瀺ããŸãã顧客ã¯ãåºåãèŠãåŸã«ãã±ãããè³Œå ¥ãããŠãŒã¶ãŒã®æ°ãç¥ãããã£ãŠããŸããããããŠãã¡ãããååãåšåº«ãªã©ã«ããåå ¥ã®å èš³ããããŸããç¹°ãè¿ããŸãããæšæºããŒã«ã§ã¯ãã®æ©äŒã¯åŸãããŸããã§ããã
BigQueryã䜿çšããŠAndroidã¢ããªå ã®å£²äžãåæããæ¹æ³
ããŸããŸãªã»ã¯ã·ã§ã³ã§ãã°ããèŠèŠçãªã¬ããŒããååŸããæ¹æ³ãæ¢ãå§ããŸããããã詳现ãªããŒã¿åæãå¿ èŠãªå ŽåãGoogleã¯BigQueryWebãµãŒãã¹ã«æ¥ç¶ããããšããå§ãããŸããããããç§ãã¡ã®ç解ã§ã¯ãããŒã«ã¯ããã°ããŒã¿ã§åäœãããšäž»åŒµãããŠãããããã¹ãºã¡ã®å€§ç ²ã®ããã§ããããã ããããŒã«ã詳现ã«èª¿æ»ãããšãããæ¯èŒçå°éã®ããŒã¿ã®åæãå¿ èŠã§ãããšåæã«éæšæºã§ããã¿ã¹ã¯ã«ãé©ããŠããããšãããããŸããã確ãã«ãéå»2幎éã§ãããã°ããŒã¿ã®æŠå¿µã¯å€åããŸãããä»ã§ã¯ãExcelã§åŠçããã®ãäžäŸ¿ãªã ãã§ãã
BigQueryæ¥ç¶
BigQueryãFirebaseAnalyticsã«æ¥ç¶ããã®ã¯ç°¡åã§ããã»ãŒãã¹ãŠã®FirebaseAnalyticsããŒãžã§ããããè¡ãããšããå§ãããŸããããã«ã€ããŠã®è©³çŽ°ãªèª¬æããããŸãã
å¯äžã®æ³šæç¹ã¯ãBigQueryãã€ãã³ãããŒã¿ã«æ¥ç¶ããã«ã¯ãFirebaseã®Blazeæ¯æããã©ã³ã«åãæ¿ããå¿ èŠããããšããããšã§ããããã¯ãFirebaseãµãŒãã¹ã䜿çšãããšãã«æéãçºçããããšãæå³ããŸããç§ãã¡ã®çµéšã§ã¯ãBigQueryãµãŒãã¹ã¯ãå°ããªãããžã§ã¯ãã§æ³šææ·±ã䜿çšãããšå®äŸ¡ã§ãã
BigQueryãä»ããç¡æãã©ã³ã§ã¯ãCrashlyticsãPredictionsãCloud Messagingãããã³PerformanceMonitoringã®ããŒã¿ã«ã®ã¿ã¢ã¯ã»ã¹ã§ããŸãã
BigQueryã¯FirebaseAnalyticsã®äžéšã§ã¯ãªãããšãç解ããå¿ èŠããããŸããããã¯ã倧éã®ããŒã¿ãåŠçããããã«èšèšãããå¥åã®GoogleãµãŒãã¹ã§ãããã®å ŽåãFirebase Analytics forBigQueryã¯å¯èœãªããŒã¿ãœãŒã¹ã®1ã€ã§ããBigQueryãæ¥ç¶ãããšãçžé¢é¢ä¿ãããå€ãã®æŽå¯ãèŠã€ããããšãã§ããŸãã
æ¥ç¶åŸã¯ã©ããªããŸãã
BigQueryãFirebaseAnalyticsã«æ¥ç¶ãããšãçã®åœ¢åŒã§åéãããããŒã¿ã確èªã§ããŸãã BigQueryããããžã§ã¯ãã«æ¥ç¶ããåŸã«åéãããããŒã¿ã«ã®ã¿ã¢ã¯ã»ã¹ã§ããŸããä»æ¥BigQueryã«æ¥ç¶ãããšãä»æ¥ããåä¿¡ããããŒã¿ãåŠçã§ããŸãããæšæ¥ã®ããŒã¿ã¯åŠçãããŸããã
ããã§ããã¹ãŠãæ¥ç¶ãããµãŒãã¹ã®ã¡ã€ã³ããŒãžã«ç§»åããŸããç§ãã¡ã®ãããžã§ã¯ãã¯ãªãœãŒã¹ã«ãããŸããããŒã¿ã«ã¯1ã€ã®ããŒãã«ããããŸã-
events
ã FirebaseAnalyticsããã®ãã¹ãŠã®ããŒã¿ã¯ããã«åéãããŸãã
å®éãããã¯1ã€ã®ããŒãã«ã§ã¯ãããŸãããæ¯æ¥ã®ããŒã¿ã¯
events_<>
ãããšãã°ããšããååã®ããŒãã«ã«é
眮ãããŸãevents_20200308
ã
ããŒã¿èªäœãèŠãŠã¿ãŸããããFirebase Analyticsããã®ãã¹ãŠã®ã€ãã³ãã¯ãããŒãã«ã«èšé²ãã
events_*
ãŸããããŒãã«ã®åè¡ã¯åå¥ã®ã€ãã³ãã§ããæ¥ä»ãããã€ã¹æ
å ±ããŠãŒã¶ãŒæ
å ±ãªã©ãå€æ°ã®åãã€ãã³ããã©ã¡ãŒã¿ãè¡šããŸããããŒã¿ã¯è¡šã«è¡šç€ºãããŸãããããã¯å®å
šã«æ®éã§ã¯ãããŸãããããã¯ãããªãŒæ§é ã®è¡šåœ¢åŒã®è¡šçŸã§ãã以äžã¯ãããŒãã«è¡ã®JSONæ§é ã®äŸã§ããç°¡æœã«ããããã«ããã¹ãŠã®ããŒã¿ãæ§é ã«å«ãŸããŠããããã§ã¯ãããŸããããå
šäœåã¯ããããç解ã§ããŸãã
ããŒã¿æ§é ãèŠããšã次ã®ãã®ãå«ãŸããŠããããšãããããŸãã
- . , - . :
event_date
,event_timestamp
,event_name
. - -. , ,
event_params
user_properties
. â . . â --. , - -. â
device
. . âdevice.category
,device.operating_system
device.operating_system_version
.
æåã¯ããŒã¿æ§é ãè€éã«èŠããå Žåã¯ã詳ãã調ã¹ããšç°¡åã«ãªããŸããæçµçã«ãFirebaseAnalyticsããã®ãã¹ãŠã®ã€ãã³ãã«é¢ããæ å ±ãæã«å ¥ããããšãã§ããŸãããããŠãããããå¿ èŠãªããŒã¿ãåŒãåºãå¿ èŠããããŸãã
ããã€ãã®ãªã¯ãšã¹ããããŠã¿ãŸããããããšãã°ãã€ãã³ãã®ãã¹ãŠã®æ¥ä»ã衚瀺ããŸãããã
SELECT event_date
FROM `project_name.data_set.events_20200202`
çµæã衚瀺ãããŸãã
project_name.data_set.events_20200202
ãã®å Žåãç¹å®ã®ããŒãã«ã®ååãããã¯ããããžã§ã¯ãã®ååãããŒã¿ã»ããã®ååãããã³FirebaseAnalyticsããã®ã€ãã³ããå«ãæ¥æ¬¡ããŒãã«ã§æ§æãããŸããã€ãŸãããã®ã¯ãšãªã§ã¯ã2æ2æ¥ã®ã€ãã³ãããã£ãããŒãã«ããã€ãã³ãã®æ¥ä»ãååŸããŸãã:)ããŸã圹ã«ç«ã¡ãŸããããã¯ãšãªã®äŸãšããŠã¯æ©èœããŸããå®éã«ã¯ãå©çšå¯èœãªãã¹ãŠã®ããŒã¿ãããµã³ããªã³ã°ããæ¹ã䟿å©ã§ãããã®å Žåãç¹å®ã®ããŒãã«ã®ä»£ããã«æå®ã§ããŸãproject_name.data_set.events_*
ããªã¯ãšã¹ãã«æçšæ§ãè¿œå ããŠãããšãã°ã次ã®ååã®ã€ãã³ãã®æ¥ä»ãšéœåžãèŠã€ããŸããã"booking_purchase"
ã
SELECT geo.city, event_date
FROM `project_name.data_set.events_*`
WHERE event_name = "booking_purchase" and geo.city != ""
æã ãåŸãïŒ
èå³æ·±ãã®ã¯ãããŒãã«å ã®ç¹å¥ãªãã£ãŒã«ãã§ããé åã ãã§ããäŸãã°
event_params
ããã®ãããªãã£ãŒã«ããæäœããã«ã¯ãUNNESTæŒç®åã䜿çšããããšããå§ãããŸãããã®æŒç®åã¯ãé
åãã£ãŒã«ããååŸããŠããŒãã«ã«å€æããŸãã
ã¯ãšãªãæ¹åããŠããã©ã¡ãŒã¿å€ã衚瀺ããŸããã
"direction"
ïŒ
SELECT
geo.city,
event_date,
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "direction") AS direction,
FROM
`project_name.data_set.events_*`
WHERE
event_name = "booking_purchase" and geo.city != ""
çµæïŒ
ã§ã¯ãäœãè¿œå ããŸããããUNNESTæŒç®åããã£ãŒã«ãã«é©çšããŸãã
event_params
ããã®çµæãè¡ãã€ãã³ãã®ãã©ã¡ãŒã¿ãŒã§ãããåããããã®ãã©ã¡ãŒã¿ãŒã®ããããã£ã§ããããŒãã«ãåŸãããŸããããã©ã¡ãŒã¿ã«ã¯ãããŒãšå€ã®2ã€ã®ããããã£ããããŸããå€- 4ã€ã®ãã£ãŒã«ããæã€ãªããžã§ã¯ãïŒstring_value
ãint_value
ãfloat_value
ããã³double_value
ããã©ã¡ãŒã¿å€ã¯stringãintãfloatãdoubleã«ããããšãã§ããããããããã®ãã£ãŒã«ãã¯ããŸããŸãªããŒã¿ã¿ã€ãã«å¿
èŠã§ãã次ã«ããµãã¯ãšãªã䜿çšããŠããã£ãŒã«ããkey
çãããã©ã¡ãŒã¿ã®æååå€ãåŒãåºããŸããdirection
ãããã¯ãããŒãã«å
ã®é
åãã£ãŒã«ããæäœããæ¹æ³ã§ãã
Firebase AnalyticsãæäŸã§ããªãã£ããã®ãã€ãŸãã¢ããªã§è²©å£²ãããå補åã®åçã®å èš³ãååŸããŸãããã
- Firebase Analyticsã§ã¯ã賌å
¥ã€ãã³ããæž¡ã
"booking_purchase"
ãŸãã - ãã®äžã§ã2ã€ã®ãã©ã¡ãŒã¿ãæž¡ããŸãïŒ
"direction"
ãš"price"
ãæ¹å-補åèå¥åãäŸ¡æ Œ-ãã®äŸ¡æ Œã
販売ãããååã®æ°ãšéé¡ãç¥ãããã®ã§ããã調ã¹ãããã®ãªã¯ãšã¹ãã¯æ¬¡ã®ããã«ãªããŸãã
SELECT
direction,
count(direction) as count,
sum(price) as total_sum
FROM
(
SELECT
(SELECT value.string_value FROM UNNEST(event_params) WHERE key = "direction") AS direction,
(SELECT value.double_value FROM UNNEST(event_params) WHERE key = "price") AS price
FROM
`project_name.data_set.events_*`
WHERE
event_name = "booking_purchase"
)
group by direction
order by total_sum desc
çµæïŒ
å¿ èŠãªããŒã¿ãååŸããŸããã
DataStudioã§ã¬ããŒããã¬ã³ããªã³ã°ããæ¹æ³
顧客ããã€ã§ãæ¥ãŠè²©å£²çµ±èšãèŠãããšæã£ãŠãããšããŸããããã¯ãšãªãä¿åããŠãBigQueryã³ã³ãœãŒã«ã«ç§»åããã¯ãšãªãå®è¡ããŠçµæã確èªã§ããããšã顧客ã«äŒããããšãã§ããŸããããããGoogleã¯ããè¯ããœãªã¥ãŒã·ã§ã³ãæäŸããŸãã
ã¯ãšãªçµæã¯ãDataStudioãµãŒãã¹ã§èŠèŠåã§ããŸãããã®ãµãŒãã¹ã䜿çšãããšãFirebase Analyticsã®ããŒã¿ã«å£ããªãè¡šãã°ã©ããå³ãçŸãããæ©èœã®åœ¢åŒã§ããŒã¿ã衚瀺ã§ããŸãããããè¡ãæ¹æ³ãèŠãŠã¿ãŸãããã
ã¬ããŒããäœæããã«ã¯ããµãŒãã¹ã®ã¡ã€ã³ããŒãžã«ç§»åããŠãæ°ããããã¥ã¡ã³ããäœæããå¿ èŠããããŸããããŒã¿ãœãŒã¹ãšããŠBigQueryãéžæããŸãã
ã¬ããŒãã¯ãããŒãã«ãä¿åããããã¥ãŒããããŸãã¯ã¯ãšãªã«ãã£ãŠçŽæ¥äœæã§ããŸããåŸè ã®ãªãã·ã§ã³ã§ã¯ãæ¥ä»ãã©ã¡ãŒã¿ãŒã䜿çšã§ããŸãããããã®ãã©ã¡ãŒã¿ã䜿çšããŠãæ¥ä»ã«ããããŒã¿éžæãå¶éããåŠçãããããŒã¿ã®éãæé©åã§ããŸããçµæã¯ãGoogle AnalyticsãšFirebaseã®ã€ã³ã¿ãŒãã§ãŒã¹ã«äŒŒãŠããŸã-ã»ãŒåããã©ãŒã ãšæ©èœã§ããå瀟ã¯èŠèŠåã®èŠ³ç¹ãããã¹ããã©ã¯ãã£ã¹ãæ¡çšããããããå ¬éããããã§ãã
ãã©ã¡ãŒã¿
DS_START_DATE
ãšã®éã§çºçããã€ãã³ãã®ã¿ãéžæãããããã«æ¡ä»¶ãè¿œå ããŸããDS_END_DATE
ããããã®ãã©ã¡ãŒã¿ã¯ãã¬ããŒããã©ãŒã ããçŽæ¥ãªã¯ãšã¹ãã«æž¡ãããŸããã¬ããŒããäœæãããšãããã«æ¬¡ã®ãããªãã®ã衚瀺ãããŸãã
次ã«ãæ¥ä»ç¯å²ã®éžæãè¿œå ã§ããŸãããããè¡ãã«ã¯ãé©åãª
ã³ã³ããŒãã³ãããã©ãŒã ã«è¿œå ããŸãã
ãã®ã³ã³ããŒãã³ãã§éžæãããæ¥ä»ã¯ããã©ã¡ãŒã¿ãŒ
DS_START_DATE
ããã³ãšããŠã¯ãšãªã«çŽæ¥éä¿¡ãããŸãDS_END_DATE
ããã®çµæã衚瀺ã¢ãŒãã§ã¯ãã¬ããŒãã¯æ¬¡ã®ããã«ãªããŸãã
åæ§ã«ããã©ãŒã äžã®ä»ã®ã³ã³ããŒãã³ãïŒã°ã©ãããã£ãŒããç»åãããã¹ããªã©ïŒãè¿œå ããã³ã«ã¹ã¿ãã€ãºã§ããŸãããã®åŸããªã³ã¯å ±æãä»ããŠããŸãã¯å¿ èŠãªã¢ã«ãŠã³ããžã®ã¢ã¯ã»ã¹ãæäŸããããšã«ãããã¬ããŒããå ±æã§ããŸãã
BiqQueryã¯æããããšã®ãªãå¹æçãªããŒã«ã§ã
ã¢ãã€ã«ã¢ããªã¯ãç¹ã«ããŒã¿é§ååã®ã¢ãããŒããæ¡çšããŠããå Žåã匷åãªè²©å£²ããã³ããŒã±ãã£ã³ã°ããŒã«ã§ããBiqQueryãæããŠã¯ãããŸããããŸãããã®ããŒã«ã¯è€éã§ãããäžè¬çã«ãããã°ããŒã¿ã¯ããŸãã«ãã¯ãŒã«ã ãšèããŠãã ãããBigQueryã¯ãåæéšéãSpotifyãDelivery Foodããã®ä»ã®ããŒã¿ãžã£ã€ã¢ã³ãã®ã¬ãã«ã«ãŸã§é«ããããŒã±ãã£ã³ã°ã§ãã補åã§ã
BigQueryã®å©ç¹ïŒ
- ãã°ããæ§æãããæ°ç§ã§ããŒã¿ãåŠçã§ããŸãããµãŒããŒããé«äŸ¡ãªã€ã³ãã©ã¹ãã©ã¯ãã£ãã管çè ãããŸããã
- , , , : , , -, CRM.
- , â .
- SQL â .
- Data Studio, .