@koda-sl/baker-cli 0.449.0-dev.bd86e5817 → 0.450.0-dev.b454c3dd2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -6
- package/dist/{account-AL2ZDSR7.js → account-XQXC7BR6.js} +5 -4
- package/dist/{account-AL2ZDSR7.js.map → account-XQXC7BR6.js.map} +1 -1
- package/dist/{accounts-HAFCLSR5.js → accounts-722UY53A.js} +4 -3
- package/dist/{accounts-HAFCLSR5.js.map → accounts-722UY53A.js.map} +1 -1
- package/dist/{accounts-O5MFO3QQ.js → accounts-E67BMK7T.js} +6 -5
- package/dist/{accounts-O5MFO3QQ.js.map → accounts-E67BMK7T.js.map} +1 -1
- package/dist/{actions-P35MEMGN.js → actions-6TQMSVWD.js} +18 -18
- package/dist/{add-5GAN6CVO.js → add-2BEGRHUX.js} +28 -5
- package/dist/add-2BEGRHUX.js.map +1 -0
- package/dist/{add-6DTC6X5G.js → add-LEMKEOPO.js} +3 -2
- package/dist/{add-6DTC6X5G.js.map → add-LEMKEOPO.js.map} +1 -1
- package/dist/{ads-73PGA4YC.js → ads-AGYCVD62.js} +4 -4
- package/dist/{advertisers-AE75CGVE.js → advertisers-2VQKAYKG.js} +4 -3
- package/dist/{advertisers-AE75CGVE.js.map → advertisers-2VQKAYKG.js.map} +1 -1
- package/dist/{analytics-FKCXIMPO.js → analytics-IFELDWLL.js} +24 -20
- package/dist/analytics-IFELDWLL.js.map +1 -0
- package/dist/{analytics-FPWQQGRM.js → analytics-OH5QEH7F.js} +4 -3
- package/dist/{analytics-FPWQQGRM.js.map → analytics-OH5QEH7F.js.map} +1 -1
- package/dist/{assign-ABN2AQ4J.js → assign-PTUJUCEL.js} +4 -3
- package/dist/{assign-ABN2AQ4J.js.map → assign-PTUJUCEL.js.map} +1 -1
- package/dist/{audience-size-GNBJY35X.js → audience-size-LRI6GJRT.js} +4 -3
- package/dist/{audience-size-GNBJY35X.js.map → audience-size-LRI6GJRT.js.map} +1 -1
- package/dist/{audit-3VS63TBW.js → audit-HWP7OPB7.js} +4 -3
- package/dist/{audit-3VS63TBW.js.map → audit-HWP7OPB7.js.map} +1 -1
- package/dist/{autocomplete-VS3XG3B7.js → autocomplete-J6DHU6MR.js} +4 -3
- package/dist/{autocomplete-VS3XG3B7.js.map → autocomplete-J6DHU6MR.js.map} +1 -1
- package/dist/{avatars-EKCKHCC3.js → avatars-467OSBD6.js} +4 -4
- package/dist/{bid-pricing-Q72B65AY.js → bid-pricing-EO5WLHGV.js} +4 -3
- package/dist/{bid-pricing-Q72B65AY.js.map → bid-pricing-EO5WLHGV.js.map} +1 -1
- package/dist/{brand-C6PFGGQN.js → brand-YRTEPGBK.js} +2 -2
- package/dist/{brief-YFJHQ5VQ.js → brief-OSFJ2V7F.js} +8 -7
- package/dist/{brief-YFJHQ5VQ.js.map → brief-OSFJ2V7F.js.map} +1 -1
- package/dist/{campaign-groups-KFFYQPU3.js → campaign-groups-PQ6KSQJR.js} +9 -8
- package/dist/{campaign-groups-KFFYQPU3.js.map → campaign-groups-PQ6KSQJR.js.map} +1 -1
- package/dist/{campaign-writes-FHOS5XZY.js → campaign-writes-5OVLUD5E.js} +4 -3
- package/dist/{campaign-writes-FHOS5XZY.js.map → campaign-writes-5OVLUD5E.js.map} +1 -1
- package/dist/{campaigns-2NHWBF5C.js → campaigns-6T3NSUT2.js} +12 -11
- package/dist/{campaigns-2NHWBF5C.js.map → campaigns-6T3NSUT2.js.map} +1 -1
- package/dist/{campaigns-KZYZTXDS.js → campaigns-OYMXDGWX.js} +5 -5
- package/dist/{canvas-UJNSHD3B.js → canvas-YQFG52IG.js} +13 -13
- package/dist/{capabilities-DJFTRJKS.js → capabilities-PXBKUN2G.js} +4 -3
- package/dist/{capabilities-DJFTRJKS.js.map → capabilities-PXBKUN2G.js.map} +1 -1
- package/dist/{catalog-ZQX6BGXS.js → catalog-XLXIM7IW.js} +4 -4
- package/dist/{chats-D2CSDX5Q.js → chats-UK47UE7C.js} +4 -3
- package/dist/{chats-D2CSDX5Q.js.map → chats-UK47UE7C.js.map} +1 -1
- package/dist/{chunk-7YCRFMXF.js → chunk-24EB7EDR.js} +3 -3
- package/dist/{chunk-5ZDLTE5T.js → chunk-2AOE2MZQ.js} +3 -3
- package/dist/{chunk-4SG4RW2P.js → chunk-2VPBIT65.js} +8 -8
- package/dist/chunk-4PDHHHUJ.js +537 -0
- package/dist/chunk-4PDHHHUJ.js.map +1 -0
- package/dist/{chunk-NPY4QUMQ.js → chunk-54C6YDGJ.js} +2 -2
- package/dist/{chunk-LZ73CZGP.js → chunk-5WCSKQ7Z.js} +6 -6
- package/dist/{chunk-3G3ZDLMI.js → chunk-5ZNTADVR.js} +2 -2
- package/dist/{chunk-AEOSAVVL.js → chunk-6F7DVPOS.js} +3 -3
- package/dist/{chunk-CJCVIEJ5.js → chunk-6NY2GPR4.js} +3 -3
- package/dist/{chunk-CXWFX2AM.js → chunk-6Y7ZBENQ.js} +6 -6
- package/dist/{chunk-M242LHLX.js → chunk-7CTMH5AK.js} +3 -3
- package/dist/{chunk-XF4JUKVF.js → chunk-7EPXVICM.js} +38 -5
- package/dist/chunk-7EPXVICM.js.map +1 -0
- package/dist/{chunk-T2PC5AVH.js → chunk-ASI4P6X2.js} +6 -6
- package/dist/chunk-ASI4P6X2.js.map +1 -0
- package/dist/{chunk-QD7ESRLN.js → chunk-C46GUI2S.js} +2 -2
- package/dist/{chunk-6N6WKAJM.js → chunk-CWYAELVG.js} +2 -2
- package/dist/{chunk-MXYBTMKB.js → chunk-DCRPXOJJ.js} +2 -2
- package/dist/{chunk-GKZ2WU75.js → chunk-FPOGPFAG.js} +3 -14
- package/dist/chunk-FPOGPFAG.js.map +1 -0
- package/dist/{chunk-JQJDXPCO.js → chunk-FUHN4MFY.js} +2 -2
- package/dist/{chunk-S77PZVYM.js → chunk-FYGR3I2A.js} +3 -3
- package/dist/{chunk-OZRUJVIQ.js → chunk-H3427GPU.js} +2 -2
- package/dist/{chunk-RPUSTYHL.js → chunk-HDLYPC6K.js} +5 -3
- package/dist/{chunk-RPUSTYHL.js.map → chunk-HDLYPC6K.js.map} +1 -1
- package/dist/{chunk-SSJK7FEV.js → chunk-HR6IWNKE.js} +1196 -1140
- package/dist/chunk-HR6IWNKE.js.map +1 -0
- package/dist/{chunk-YRQYA2LR.js → chunk-HROZYQ5H.js} +63 -5
- package/dist/chunk-HROZYQ5H.js.map +1 -0
- package/dist/{chunk-IR6D7K4H.js → chunk-I3ZR655O.js} +2 -2
- package/dist/{chunk-YK32GUBN.js → chunk-KMKEYI37.js} +3 -3
- package/dist/{chunk-W3ZHJJVT.js → chunk-KS2QY6MK.js} +4 -4
- package/dist/{chunk-WNRV4QH7.js → chunk-LYQJ4PZW.js} +5 -5
- package/dist/{chunk-B5SCU7MJ.js → chunk-MACCF4JZ.js} +16 -22
- package/dist/{chunk-B5SCU7MJ.js.map → chunk-MACCF4JZ.js.map} +1 -1
- package/dist/{chunk-CSYSX4D2.js → chunk-N4LAYIIN.js} +2 -2
- package/dist/{chunk-4AUMTNVB.js → chunk-NA63BH7V.js} +3 -3
- package/dist/{chunk-4BQXAE7Z.js → chunk-NDEE6G2J.js} +2 -2
- package/dist/{chunk-EDLZGTGN.js → chunk-NYIGXDUG.js} +1 -39
- package/dist/chunk-NYIGXDUG.js.map +1 -0
- package/dist/{chunk-DWHIOO7E.js → chunk-QE7W555R.js} +163 -12
- package/dist/chunk-QE7W555R.js.map +1 -0
- package/dist/{chunk-MELOSESI.js → chunk-R25YLW6H.js} +2 -2
- package/dist/{chunk-Y6O7EWYY.js → chunk-RL5CP7N6.js} +5 -5
- package/dist/{chunk-DGUNI37S.js → chunk-RX2DKU3W.js} +2 -2
- package/dist/{chunk-3HJLHTWP.js → chunk-SJYEY5MV.js} +12 -3
- package/dist/{chunk-3HJLHTWP.js.map → chunk-SJYEY5MV.js.map} +1 -1
- package/dist/{chunk-VTDMKARH.js → chunk-ULG4QRTV.js} +2 -2
- package/dist/{chunk-QRP3PXWN.js → chunk-VL43TNIP.js} +2 -2
- package/dist/{chunk-SHL7LOC3.js → chunk-VLMBTPXU.js} +3 -3
- package/dist/{chunk-KHRXPQID.js → chunk-VYQ3QJ3C.js} +2 -2
- package/dist/{chunk-A4LOJ2VD.js → chunk-WGUQHAJY.js} +2 -2
- package/dist/{chunk-ZEYEWPK6.js → chunk-WKQG6TER.js} +2 -2
- package/dist/{chunk-3IBYKLXR.js → chunk-ZDMTXQ2Q.js} +2 -2
- package/dist/{claim-FZ5OQLMU.js → claim-W6G6VEG5.js} +4 -3
- package/dist/{claim-FZ5OQLMU.js.map → claim-W6G6VEG5.js.map} +1 -1
- package/dist/cli.js +30 -30
- package/dist/{companies-DNI634RC.js → companies-TS6KBATJ.js} +4 -3
- package/dist/{companies-DNI634RC.js.map → companies-TS6KBATJ.js.map} +1 -1
- package/dist/{complete-2FZMGJV5.js → complete-LYR2HMQU.js} +4 -3
- package/dist/{complete-2FZMGJV5.js.map → complete-LYR2HMQU.js.map} +1 -1
- package/dist/{connect-QCOGEPP4.js → connect-FCXNVTXG.js} +13 -6
- package/dist/{conversation-6IOGV7B7.js → conversation-6ZJGPCXM.js} +4 -3
- package/dist/{conversation-6IOGV7B7.js.map → conversation-6ZJGPCXM.js.map} +1 -1
- package/dist/{conversions-4SRZPBBX.js → conversions-UHB55MMQ.js} +8 -7
- package/dist/{conversions-4SRZPBBX.js.map → conversions-UHB55MMQ.js.map} +1 -1
- package/dist/{create-BJNMO6HT.js → create-EX6OWLNM.js} +3 -2
- package/dist/{create-BJNMO6HT.js.map → create-EX6OWLNM.js.map} +1 -1
- package/dist/{create-RM7HV77Y.js → create-JCA7JPLP.js} +4 -3
- package/dist/{create-RM7HV77Y.js.map → create-JCA7JPLP.js.map} +1 -1
- package/dist/{create-FX4OJ2XF.js → create-JFSK4BOP.js} +4 -3
- package/dist/{create-FX4OJ2XF.js.map → create-JFSK4BOP.js.map} +1 -1
- package/dist/{create-VXM34ZWH.js → create-WU22YYU2.js} +4 -3
- package/dist/{create-VXM34ZWH.js.map → create-WU22YYU2.js.map} +1 -1
- package/dist/{creatives-NJF2U763.js → creatives-FXUQ5WSD.js} +10 -10
- package/dist/{creatives-JSWBFQ5R.js → creatives-KGXUOYPE.js} +9 -8
- package/dist/{creatives-JSWBFQ5R.js.map → creatives-KGXUOYPE.js.map} +1 -1
- package/dist/{credentials-C33K6XCJ.js → credentials-MJC7PGKR.js} +4 -3
- package/dist/{credentials-C33K6XCJ.js.map → credentials-MJC7PGKR.js.map} +1 -1
- package/dist/{critique-YDKPYZLD.js → critique-GS5VV5ZC.js} +7 -6
- package/dist/{critique-YDKPYZLD.js.map → critique-GS5VV5ZC.js.map} +1 -1
- package/dist/{critique-ZS4ON3SU.js → critique-TPHR27KH.js} +4 -3
- package/dist/{critique-ZS4ON3SU.js.map → critique-TPHR27KH.js.map} +1 -1
- package/dist/{crm-R5IXIFIV.js → crm-AVCM5D4G.js} +5 -4
- package/dist/{crm-R5IXIFIV.js.map → crm-AVCM5D4G.js.map} +1 -1
- package/dist/{crm-52ROSWH5.js → crm-VK44O3ED.js} +5 -4
- package/dist/{crm-52ROSWH5.js.map → crm-VK44O3ED.js.map} +1 -1
- package/dist/{customers-A36LOZOB.js → customers-XH2DMTFH.js} +6 -5
- package/dist/{delete-M2GDLPYN.js → delete-E3R3TKIL.js} +3 -2
- package/dist/{delete-M2GDLPYN.js.map → delete-E3R3TKIL.js.map} +1 -1
- package/dist/{delete-HGHXY24R.js → delete-KRH2YMSZ.js} +4 -3
- package/dist/{delete-HGHXY24R.js.map → delete-KRH2YMSZ.js.map} +1 -1
- package/dist/{delete-AIGE4Y4H.js → delete-WI5E3DR3.js} +4 -3
- package/dist/{delete-AIGE4Y4H.js.map → delete-WI5E3DR3.js.map} +1 -1
- package/dist/{demographics-NTWB2IMG.js → demographics-XV5PBA77.js} +4 -3
- package/dist/{demographics-NTWB2IMG.js.map → demographics-XV5PBA77.js.map} +1 -1
- package/dist/{discard-2WWQG6OU.js → discard-HTQUUHJR.js} +4 -3
- package/dist/{discard-2WWQG6OU.js.map → discard-HTQUUHJR.js.map} +1 -1
- package/dist/{domain-Y2LT6JLT.js → domain-RECGZXJB.js} +4 -3
- package/dist/{domain-Y2LT6JLT.js.map → domain-RECGZXJB.js.map} +1 -1
- package/dist/{draft-SLHAKJ2A.js → draft-2IBSJEKC.js} +4 -3
- package/dist/{draft-SLHAKJ2A.js.map → draft-2IBSJEKC.js.map} +1 -1
- package/dist/{draft-FJ7WHIXW.js → draft-PVTX6QT6.js} +4 -3
- package/dist/{draft-FJ7WHIXW.js.map → draft-PVTX6QT6.js.map} +1 -1
- package/dist/{draft-EJXNNJ3Y.js → draft-Q546QPPU.js} +5 -4
- package/dist/{draft-EJXNNJ3Y.js.map → draft-Q546QPPU.js.map} +1 -1
- package/dist/engine/index.js +3 -3
- package/dist/{facets-U7AQC4H6.js → facets-7EVPJMKS.js} +4 -3
- package/dist/{facets-U7AQC4H6.js.map → facets-7EVPJMKS.js.map} +1 -1
- package/dist/{feedback-PPQMOQ46.js → feedback-EIZKS4JU.js} +2 -2
- package/dist/{feedback-record-V66HWVRR.js → feedback-record-TKO54BOE.js} +9 -8
- package/dist/{feedback-record-V66HWVRR.js.map → feedback-record-TKO54BOE.js.map} +1 -1
- package/dist/{fetch-W7NULDEO.js → fetch-4BY6HYUM.js} +4 -3
- package/dist/{fetch-W7NULDEO.js.map → fetch-4BY6HYUM.js.map} +1 -1
- package/dist/{find-OTDIX6V4.js → find-FRRHAPWX.js} +4 -4
- package/dist/{flows-KABCBS3S.js → flows-KTFAML22.js} +21 -17
- package/dist/flows-KTFAML22.js.map +1 -0
- package/dist/{fonts-EMMX3KII.js → fonts-MXR3ZKDX.js} +6 -5
- package/dist/{forecast-GNODEIIC.js → forecast-3QTJYVND.js} +4 -3
- package/dist/{forecast-GNODEIIC.js.map → forecast-3QTJYVND.js.map} +1 -1
- package/dist/{funnel-AAX27NH4.js → funnel-I6XIAEHG.js} +11 -455
- package/dist/funnel-I6XIAEHG.js.map +1 -0
- package/dist/{ga4-UDQ2HA2J.js → ga4-DV2AXCSL.js} +1 -1
- package/dist/{get-QEYJRLV3.js → get-5PKNKJ5S.js} +7 -4
- package/dist/get-5PKNKJ5S.js.map +1 -0
- package/dist/{get-RTVUZM6E.js → get-72YPHJGV.js} +4 -3
- package/dist/{get-RTVUZM6E.js.map → get-72YPHJGV.js.map} +1 -1
- package/dist/{google-M7KEXVK5.js → google-6OGZX47I.js} +2 -2
- package/dist/{google-KTO3PLEU.js → google-QYYYSSXI.js} +5 -5
- package/dist/{google-ads-OK6IG3UV.js → google-ads-QGMQKZQD.js} +4 -3
- package/dist/{google-ads-OK6IG3UV.js.map → google-ads-QGMQKZQD.js.map} +1 -1
- package/dist/{gsc-P3QYGDV2.js → gsc-TAKOF7J5.js} +1 -1
- package/dist/{history-PQUJKK26.js → history-6AVQX2OQ.js} +4 -3
- package/dist/{history-PQUJKK26.js.map → history-6AVQX2OQ.js.map} +1 -1
- package/dist/{hubspot-Y77VLY6Y.js → hubspot-SVEMFK5S.js} +9 -8
- package/dist/{hubspot-Y77VLY6Y.js.map → hubspot-SVEMFK5S.js.map} +1 -1
- package/dist/{icon-I43F77FV.js → icon-L4RSS6PZ.js} +4 -4
- package/dist/{ideas-MIDU7YOA.js → ideas-NFOW3HKJ.js} +3 -2
- package/dist/{images-S254MS6O.js → images-2EFFUNNV.js} +9 -9
- package/dist/{ingest-YV2NLDBE.js → ingest-2EIKN4QC.js} +4 -3
- package/dist/{ingest-J4I3HKM3.js → ingest-2SO62RRI.js} +3 -2
- package/dist/{ingest-J4I3HKM3.js.map → ingest-2SO62RRI.js.map} +1 -1
- package/dist/{inspect-Q5NHBBHX.js → inspect-4OOS4APT.js} +4 -3
- package/dist/{inspect-Q5NHBBHX.js.map → inspect-4OOS4APT.js.map} +1 -1
- package/dist/{inspiration-P265QJ2H.js → inspiration-S3DU4CMQ.js} +1 -1
- package/dist/{keyword-metrics-PDY4ZXSP.js → keyword-metrics-SF4CSNZ2.js} +4 -3
- package/dist/{keyword-metrics-PDY4ZXSP.js.map → keyword-metrics-SF4CSNZ2.js.map} +1 -1
- package/dist/{keywords-for-site-GALSCV77.js → keywords-for-site-WDAOPNKC.js} +4 -3
- package/dist/{keywords-for-site-GALSCV77.js.map → keywords-for-site-WDAOPNKC.js.map} +1 -1
- package/dist/{landing-CJYGWCK4.js → landing-2ZB46LXH.js} +3 -3
- package/dist/{leads-PHKG6CP3.js → leads-A4W5KTWB.js} +4 -3
- package/dist/{leads-PHKG6CP3.js.map → leads-A4W5KTWB.js.map} +1 -1
- package/dist/{learn-FUQSY7DN.js → learn-IPULBCOD.js} +5 -4
- package/dist/{learn-FUQSY7DN.js.map → learn-IPULBCOD.js.map} +1 -1
- package/dist/{line-item-writes-E6MZPIZZ.js → line-item-writes-EMYSOJKM.js} +4 -3
- package/dist/{line-item-writes-E6MZPIZZ.js.map → line-item-writes-EMYSOJKM.js.map} +1 -1
- package/dist/{line-items-7ZGIKEF2.js → line-items-5NECXUZT.js} +5 -5
- package/dist/{link-QYAW6A2W.js → link-CI45HWFN.js} +4 -3
- package/dist/{link-QYAW6A2W.js.map → link-CI45HWFN.js.map} +1 -1
- package/dist/{linkedin-FFSDSGGS.js → linkedin-B7SYR75X.js} +27 -26
- package/dist/{linkedin-FFSDSGGS.js.map → linkedin-B7SYR75X.js.map} +1 -1
- package/dist/{list-NVQC5SNY.js → list-2BARXOT5.js} +3 -2
- package/dist/{list-NVQC5SNY.js.map → list-2BARXOT5.js.map} +1 -1
- package/dist/{list-SAV3LQHY.js → list-BIEVLEHS.js} +4 -3
- package/dist/{list-SAV3LQHY.js.map → list-BIEVLEHS.js.map} +1 -1
- package/dist/{list-5IC6KIKO.js → list-ZBT3EBVZ.js} +4 -3
- package/dist/{list-5IC6KIKO.js.map → list-ZBT3EBVZ.js.map} +1 -1
- package/dist/{log-XZPVOALD.js → log-C23OOAJZ.js} +4 -3
- package/dist/{log-XZPVOALD.js.map → log-C23OOAJZ.js.map} +1 -1
- package/dist/{logo-2IP663QO.js → logo-Q5D7PZY6.js} +3 -3
- package/dist/{lookup-XK45W2SH.js → lookup-ETWY47F7.js} +6 -5
- package/dist/{make-J3WBO62B.js → make-TPKKJXGL.js} +18 -17
- package/dist/{make-J3WBO62B.js.map → make-TPKKJXGL.js.map} +1 -1
- package/dist/{map-4J5WIWIG.js → map-SYZMPHLL.js} +5 -4
- package/dist/{map-4J5WIWIG.js.map → map-SYZMPHLL.js.map} +1 -1
- package/dist/{mcp-XXD7ZQCP.js → mcp-6FQBVJ6F.js} +3 -2
- package/dist/{mcp-XXD7ZQCP.js.map → mcp-6FQBVJ6F.js.map} +1 -1
- package/dist/{media-sources-O6ZRUA3N.js → media-sources-ZXHEEP6T.js} +2 -2
- package/dist/{members-D5ZYLS4Y.js → members-UDY4OOJW.js} +4 -3
- package/dist/{members-D5ZYLS4Y.js.map → members-UDY4OOJW.js.map} +1 -1
- package/dist/{normalize-PCNC6E2N.js → normalize-DAKHYS3V.js} +7 -3
- package/dist/{normalize-PCNC6E2N.js.map → normalize-DAKHYS3V.js.map} +1 -1
- package/dist/{options-MQ65VEVD.js → options-QL3ULED5.js} +7 -6
- package/dist/{options-MQ65VEVD.js.map → options-QL3ULED5.js.map} +1 -1
- package/dist/{performance-6QW2KEEQ.js → performance-UF5VTY2U.js} +5 -4
- package/dist/plan-FT632COT.js +51 -0
- package/dist/plan-FT632COT.js.map +1 -0
- package/dist/{promoted-tweet-writes-JPLHY3GM.js → promoted-tweet-writes-7HGESJ46.js} +4 -3
- package/dist/{promoted-tweet-writes-JPLHY3GM.js.map → promoted-tweet-writes-7HGESJ46.js.map} +1 -1
- package/dist/{promoted-tweets-SURKMHFI.js → promoted-tweets-LZKS5JIF.js} +3 -3
- package/dist/{publish-HCQ6MXLB.js → publish-NPD3SMZL.js} +4 -3
- package/dist/{publish-HCQ6MXLB.js.map → publish-NPD3SMZL.js.map} +1 -1
- package/dist/questionnaire-JNGYJTAY.js +37 -0
- package/dist/questionnaire-JNGYJTAY.js.map +1 -0
- package/dist/{reddit-GIP3ADMS.js → reddit-NU2N3LZD.js} +5 -4
- package/dist/{refresh-UXQSLCR3.js → refresh-EBVJ2C6L.js} +3 -2
- package/dist/{refresh-UXQSLCR3.js.map → refresh-EBVJ2C6L.js.map} +1 -1
- package/dist/{release-5KVLXNP6.js → release-V43YB2PY.js} +4 -3
- package/dist/{release-5KVLXNP6.js.map → release-V43YB2PY.js.map} +1 -1
- package/dist/{remove-6FIVKCJI.js → remove-QPSWLFI4.js} +3 -2
- package/dist/{remove-6FIVKCJI.js.map → remove-QPSWLFI4.js.map} +1 -1
- package/dist/{reopen-YM5LNOLB.js → reopen-GQ66NMWF.js} +4 -3
- package/dist/{reopen-YM5LNOLB.js.map → reopen-GQ66NMWF.js.map} +1 -1
- package/dist/{rerun-WYDRHIUJ.js → rerun-PZK275DY.js} +18 -17
- package/dist/{rerun-WYDRHIUJ.js.map → rerun-PZK275DY.js.map} +1 -1
- package/dist/{research-2BLEISBG.js → research-FMM6AWZC.js} +10 -10
- package/dist/{research-YOGE7GT2.js → research-GEOCUBXB.js} +3 -2
- package/dist/{research-YOGE7GT2.js.map → research-GEOCUBXB.js.map} +1 -1
- package/dist/{reset-C4UHQ3EU.js → reset-REXJ6AUK.js} +3 -2
- package/dist/{reset-C4UHQ3EU.js.map → reset-REXJ6AUK.js.map} +1 -1
- package/dist/{reset-OLVB6AE6.js → reset-Y72IVESB.js} +3 -2
- package/dist/{reset-OLVB6AE6.js.map → reset-Y72IVESB.js.map} +1 -1
- package/dist/{resolve-XYH2GDAE.js → resolve-OGX7C4TV.js} +4 -3
- package/dist/{resolve-XYH2GDAE.js.map → resolve-OGX7C4TV.js.map} +1 -1
- package/dist/{retry-7EELDEQP.js → retry-CD6JAQ3F.js} +3 -2
- package/dist/{retry-7EELDEQP.js.map → retry-CD6JAQ3F.js.map} +1 -1
- package/dist/{retry-726GKI6V.js → retry-TCUBBFR5.js} +3 -2
- package/dist/{retry-726GKI6V.js.map → retry-TCUBBFR5.js.map} +1 -1
- package/dist/{run-P4KR2MXC.js → run-A5ZDXTOI.js} +4 -3
- package/dist/{run-P4KR2MXC.js.map → run-A5ZDXTOI.js.map} +1 -1
- package/dist/{run-MODGUNGT.js → run-EUO34T2J.js} +18 -17
- package/dist/{scaffold-ad-5ZE7KE62.js → scaffold-ad-SW2HEWM3.js} +13 -12
- package/dist/{scaffold-ad-5ZE7KE62.js.map → scaffold-ad-SW2HEWM3.js.map} +1 -1
- package/dist/{scaffold-static-ad-HJY5HFDL.js → scaffold-static-ad-ECTJL54Y.js} +37 -36
- package/dist/scaffold-static-ad-ECTJL54Y.js.map +1 -0
- package/dist/{scaffold-video-P2PYPWG2.js → scaffold-video-EI7U7RBK.js} +12 -11
- package/dist/{scaffold-video-P2PYPWG2.js.map → scaffold-video-EI7U7RBK.js.map} +1 -1
- package/dist/{schedule-RDK4GEPI.js → schedule-S5YZJZ5U.js} +3 -2
- package/dist/{schedule-RDK4GEPI.js.map → schedule-S5YZJZ5U.js.map} +1 -1
- package/dist/{scheduled-agents-6U44QE76.js → scheduled-agents-N4LJRM4C.js} +11 -11
- package/dist/{schema-CHJDC7GQ.js → schema-R7JWWOF4.js} +8 -4
- package/dist/{schema-CHJDC7GQ.js.map → schema-R7JWWOF4.js.map} +1 -1
- package/dist/{search-PMJRU3C4.js → search-KHMQH3AT.js} +3 -2
- package/dist/{search-PMJRU3C4.js.map → search-KHMQH3AT.js.map} +1 -1
- package/dist/{select-AB2L4GAA.js → select-O2FN2JEQ.js} +9 -8
- package/dist/{select-AB2L4GAA.js.map → select-O2FN2JEQ.js.map} +1 -1
- package/dist/{sends-WGJVQUMF.js → sends-BQZM5PLS.js} +5 -4
- package/dist/{sends-WGJVQUMF.js.map → sends-BQZM5PLS.js.map} +1 -1
- package/dist/{set-prompt-DU2G2WTB.js → set-prompt-2HASHGWC.js} +9 -8
- package/dist/{set-prompt-DU2G2WTB.js.map → set-prompt-2HASHGWC.js.map} +1 -1
- package/dist/{setup-links-REPREN3C.js → setup-links-GYSE56GX.js} +4 -3
- package/dist/{setup-links-REPREN3C.js.map → setup-links-GYSE56GX.js.map} +1 -1
- package/dist/{site-WFSWIA3S.js → site-4SKM7RKG.js} +5 -4
- package/dist/{site-WFSWIA3S.js.map → site-4SKM7RKG.js.map} +1 -1
- package/dist/{sources-YBQ6KPFM.js → sources-FQ2UZTHL.js} +6 -6
- package/dist/{sources-AMI2AWKZ.js → sources-R2NKNC6J.js} +10 -9
- package/dist/{sources-AMI2AWKZ.js.map → sources-R2NKNC6J.js.map} +1 -1
- package/dist/{stale-6MJHVEG4.js → stale-W756ACKC.js} +8 -7
- package/dist/{stale-6MJHVEG4.js.map → stale-W756ACKC.js.map} +1 -1
- package/dist/{status-7F2KHFGA.js → status-SE2VZJJB.js} +4 -3
- package/dist/{status-7F2KHFGA.js.map → status-SE2VZJJB.js.map} +1 -1
- package/dist/{stock-2YCDN3N6.js → stock-KXJ26BY4.js} +5 -5
- package/dist/{studio-RA7QQH4O.js → studio-SYKOSNDB.js} +1 -1
- package/dist/{sync-GWTLKZTU.js → sync-LJGSODK3.js} +3 -2
- package/dist/{sync-GWTLKZTU.js.map → sync-LJGSODK3.js.map} +1 -1
- package/dist/{sync-definition-IPUFS5XS.js → sync-definition-QR2N233R.js} +12 -11
- package/dist/{tags-KFYLZLB3.js → tags-4BAVFH4S.js} +3 -2
- package/dist/{tags-KFYLZLB3.js.map → tags-4BAVFH4S.js.map} +1 -1
- package/dist/{tags-ABHSX6M5.js → tags-5SBMRC2A.js} +4 -3
- package/dist/{tags-ABHSX6M5.js.map → tags-5SBMRC2A.js.map} +1 -1
- package/dist/{tags-3WPW6PTV.js → tags-PYWFSBTR.js} +4 -4
- package/dist/{tags-6342FQEB.js → tags-QQU3OKMZ.js} +4 -3
- package/dist/{tags-6342FQEB.js.map → tags-QQU3OKMZ.js.map} +1 -1
- package/dist/{tags-FJIBBBRG.js → tags-YYLNF3PK.js} +4 -3
- package/dist/{tags-FJIBBBRG.js.map → tags-YYLNF3PK.js.map} +1 -1
- package/dist/{targeting-criteria-NR47AF5C.js → targeting-criteria-RJFLFICN.js} +3 -3
- package/dist/{targets-L56KOVQE.js → targets-S2MT2PNB.js} +4 -3
- package/dist/{targets-L56KOVQE.js.map → targets-S2MT2PNB.js.map} +1 -1
- package/dist/{templates-B6XGDYUF.js → templates-ZE5TOGRT.js} +4 -3
- package/dist/{templates-B6XGDYUF.js.map → templates-ZE5TOGRT.js.map} +1 -1
- package/dist/{testimonials-CVC4YIXO.js → testimonials-DII5DYLR.js} +6 -6
- package/dist/{top-companies-45X3DT7Z.js → top-companies-PGIAEHDF.js} +4 -3
- package/dist/{top-companies-45X3DT7Z.js.map → top-companies-PGIAEHDF.js.map} +1 -1
- package/dist/{translate-Z66FDB4K.js → translate-GXTS633J.js} +12 -11
- package/dist/{translate-Z66FDB4K.js.map → translate-GXTS633J.js.map} +1 -1
- package/dist/{triggers-22EMIVFD.js → triggers-2PTONXRU.js} +4 -3
- package/dist/{triggers-22EMIVFD.js.map → triggers-2PTONXRU.js.map} +1 -1
- package/dist/{unlink-65KUN6ID.js → unlink-XRMYJ6DB.js} +4 -3
- package/dist/{unlink-65KUN6ID.js.map → unlink-XRMYJ6DB.js.map} +1 -1
- package/dist/{unstage-2E3I5SWF.js → unstage-FY7A3YFF.js} +4 -3
- package/dist/{unstage-2E3I5SWF.js.map → unstage-FY7A3YFF.js.map} +1 -1
- package/dist/{unstage-4ZEULXEQ.js → unstage-RM2RLXKD.js} +5 -4
- package/dist/{unstage-4ZEULXEQ.js.map → unstage-RM2RLXKD.js.map} +1 -1
- package/dist/{update-KREBPGBH.js → update-E5SRBXQR.js} +4 -3
- package/dist/{update-KREBPGBH.js.map → update-E5SRBXQR.js.map} +1 -1
- package/dist/{update-D6DJC6T7.js → update-PJ67D2OG.js} +3 -2
- package/dist/{update-D6DJC6T7.js.map → update-PJ67D2OG.js.map} +1 -1
- package/dist/{update-2S7CSEAW.js → update-S4562V3O.js} +4 -3
- package/dist/{update-2S7CSEAW.js.map → update-S4562V3O.js.map} +1 -1
- package/dist/{update-7NCOTAQZ.js → update-V6YVEUI2.js} +4 -3
- package/dist/{update-7NCOTAQZ.js.map → update-V6YVEUI2.js.map} +1 -1
- package/dist/{upload-O6NHRPS7.js → upload-R6CQVLKF.js} +4 -3
- package/dist/{upload-O6NHRPS7.js.map → upload-R6CQVLKF.js.map} +1 -1
- package/dist/{url-options-GGXAL3J4.js → url-options-JOKU46F2.js} +4 -3
- package/dist/{url-options-GGXAL3J4.js.map → url-options-JOKU46F2.js.map} +1 -1
- package/dist/{url-params-3EFGVTZZ.js → url-params-7U2XMOWF.js} +4 -3
- package/dist/{url-params-3EFGVTZZ.js.map → url-params-7U2XMOWF.js.map} +1 -1
- package/dist/{validate-UMHHNTVU.js → validate-7YPOUKPB.js} +10 -9
- package/dist/{validate-UMHHNTVU.js.map → validate-7YPOUKPB.js.map} +1 -1
- package/dist/{videos-YSXYGTBM.js → videos-LICG6ACJ.js} +5 -5
- package/dist/{web-IGIGVEKS.js → web-BA2PGTWU.js} +4 -3
- package/dist/{web-IGIGVEKS.js.map → web-BA2PGTWU.js.map} +1 -1
- package/dist/{winning-ads-2WS7FI4E.js → winning-ads-C6S2C5VP.js} +2 -2
- package/dist/{write-commands-5C7FUOVN.js → write-commands-7SJ3BOW5.js} +5 -4
- package/dist/{write-commands-5C7FUOVN.js.map → write-commands-7SJ3BOW5.js.map} +1 -1
- package/dist/{x-BFSKFCZD.js → x-CZHRC6U7.js} +6 -6
- package/package.json +1 -1
- package/dist/add-5GAN6CVO.js.map +0 -1
- package/dist/analytics-FKCXIMPO.js.map +0 -1
- package/dist/chunk-DWHIOO7E.js.map +0 -1
- package/dist/chunk-EDLZGTGN.js.map +0 -1
- package/dist/chunk-GKZ2WU75.js.map +0 -1
- package/dist/chunk-SSJK7FEV.js.map +0 -1
- package/dist/chunk-T2PC5AVH.js.map +0 -1
- package/dist/chunk-XF4JUKVF.js.map +0 -1
- package/dist/chunk-YRQYA2LR.js.map +0 -1
- package/dist/flows-KABCBS3S.js.map +0 -1
- package/dist/funnel-AAX27NH4.js.map +0 -1
- package/dist/get-QEYJRLV3.js.map +0 -1
- package/dist/scaffold-static-ad-HJY5HFDL.js.map +0 -1
- /package/dist/{actions-P35MEMGN.js.map → actions-6TQMSVWD.js.map} +0 -0
- /package/dist/{ads-73PGA4YC.js.map → ads-AGYCVD62.js.map} +0 -0
- /package/dist/{avatars-EKCKHCC3.js.map → avatars-467OSBD6.js.map} +0 -0
- /package/dist/{brand-C6PFGGQN.js.map → brand-YRTEPGBK.js.map} +0 -0
- /package/dist/{campaigns-KZYZTXDS.js.map → campaigns-OYMXDGWX.js.map} +0 -0
- /package/dist/{canvas-UJNSHD3B.js.map → canvas-YQFG52IG.js.map} +0 -0
- /package/dist/{catalog-ZQX6BGXS.js.map → catalog-XLXIM7IW.js.map} +0 -0
- /package/dist/{chunk-7YCRFMXF.js.map → chunk-24EB7EDR.js.map} +0 -0
- /package/dist/{chunk-5ZDLTE5T.js.map → chunk-2AOE2MZQ.js.map} +0 -0
- /package/dist/{chunk-4SG4RW2P.js.map → chunk-2VPBIT65.js.map} +0 -0
- /package/dist/{chunk-NPY4QUMQ.js.map → chunk-54C6YDGJ.js.map} +0 -0
- /package/dist/{chunk-LZ73CZGP.js.map → chunk-5WCSKQ7Z.js.map} +0 -0
- /package/dist/{chunk-3G3ZDLMI.js.map → chunk-5ZNTADVR.js.map} +0 -0
- /package/dist/{chunk-AEOSAVVL.js.map → chunk-6F7DVPOS.js.map} +0 -0
- /package/dist/{chunk-CJCVIEJ5.js.map → chunk-6NY2GPR4.js.map} +0 -0
- /package/dist/{chunk-CXWFX2AM.js.map → chunk-6Y7ZBENQ.js.map} +0 -0
- /package/dist/{chunk-M242LHLX.js.map → chunk-7CTMH5AK.js.map} +0 -0
- /package/dist/{chunk-QD7ESRLN.js.map → chunk-C46GUI2S.js.map} +0 -0
- /package/dist/{chunk-6N6WKAJM.js.map → chunk-CWYAELVG.js.map} +0 -0
- /package/dist/{chunk-MXYBTMKB.js.map → chunk-DCRPXOJJ.js.map} +0 -0
- /package/dist/{chunk-JQJDXPCO.js.map → chunk-FUHN4MFY.js.map} +0 -0
- /package/dist/{chunk-S77PZVYM.js.map → chunk-FYGR3I2A.js.map} +0 -0
- /package/dist/{chunk-OZRUJVIQ.js.map → chunk-H3427GPU.js.map} +0 -0
- /package/dist/{chunk-IR6D7K4H.js.map → chunk-I3ZR655O.js.map} +0 -0
- /package/dist/{chunk-YK32GUBN.js.map → chunk-KMKEYI37.js.map} +0 -0
- /package/dist/{chunk-W3ZHJJVT.js.map → chunk-KS2QY6MK.js.map} +0 -0
- /package/dist/{chunk-WNRV4QH7.js.map → chunk-LYQJ4PZW.js.map} +0 -0
- /package/dist/{chunk-CSYSX4D2.js.map → chunk-N4LAYIIN.js.map} +0 -0
- /package/dist/{chunk-4AUMTNVB.js.map → chunk-NA63BH7V.js.map} +0 -0
- /package/dist/{chunk-4BQXAE7Z.js.map → chunk-NDEE6G2J.js.map} +0 -0
- /package/dist/{chunk-MELOSESI.js.map → chunk-R25YLW6H.js.map} +0 -0
- /package/dist/{chunk-Y6O7EWYY.js.map → chunk-RL5CP7N6.js.map} +0 -0
- /package/dist/{chunk-DGUNI37S.js.map → chunk-RX2DKU3W.js.map} +0 -0
- /package/dist/{chunk-VTDMKARH.js.map → chunk-ULG4QRTV.js.map} +0 -0
- /package/dist/{chunk-QRP3PXWN.js.map → chunk-VL43TNIP.js.map} +0 -0
- /package/dist/{chunk-SHL7LOC3.js.map → chunk-VLMBTPXU.js.map} +0 -0
- /package/dist/{chunk-KHRXPQID.js.map → chunk-VYQ3QJ3C.js.map} +0 -0
- /package/dist/{chunk-A4LOJ2VD.js.map → chunk-WGUQHAJY.js.map} +0 -0
- /package/dist/{chunk-ZEYEWPK6.js.map → chunk-WKQG6TER.js.map} +0 -0
- /package/dist/{chunk-3IBYKLXR.js.map → chunk-ZDMTXQ2Q.js.map} +0 -0
- /package/dist/{connect-QCOGEPP4.js.map → connect-FCXNVTXG.js.map} +0 -0
- /package/dist/{creatives-NJF2U763.js.map → creatives-FXUQ5WSD.js.map} +0 -0
- /package/dist/{customers-A36LOZOB.js.map → customers-XH2DMTFH.js.map} +0 -0
- /package/dist/{feedback-PPQMOQ46.js.map → feedback-EIZKS4JU.js.map} +0 -0
- /package/dist/{find-OTDIX6V4.js.map → find-FRRHAPWX.js.map} +0 -0
- /package/dist/{fonts-EMMX3KII.js.map → fonts-MXR3ZKDX.js.map} +0 -0
- /package/dist/{ga4-UDQ2HA2J.js.map → ga4-DV2AXCSL.js.map} +0 -0
- /package/dist/{google-M7KEXVK5.js.map → google-6OGZX47I.js.map} +0 -0
- /package/dist/{google-KTO3PLEU.js.map → google-QYYYSSXI.js.map} +0 -0
- /package/dist/{gsc-P3QYGDV2.js.map → gsc-TAKOF7J5.js.map} +0 -0
- /package/dist/{icon-I43F77FV.js.map → icon-L4RSS6PZ.js.map} +0 -0
- /package/dist/{ideas-MIDU7YOA.js.map → ideas-NFOW3HKJ.js.map} +0 -0
- /package/dist/{images-S254MS6O.js.map → images-2EFFUNNV.js.map} +0 -0
- /package/dist/{ingest-YV2NLDBE.js.map → ingest-2EIKN4QC.js.map} +0 -0
- /package/dist/{inspiration-P265QJ2H.js.map → inspiration-S3DU4CMQ.js.map} +0 -0
- /package/dist/{landing-CJYGWCK4.js.map → landing-2ZB46LXH.js.map} +0 -0
- /package/dist/{line-items-7ZGIKEF2.js.map → line-items-5NECXUZT.js.map} +0 -0
- /package/dist/{logo-2IP663QO.js.map → logo-Q5D7PZY6.js.map} +0 -0
- /package/dist/{lookup-XK45W2SH.js.map → lookup-ETWY47F7.js.map} +0 -0
- /package/dist/{media-sources-O6ZRUA3N.js.map → media-sources-ZXHEEP6T.js.map} +0 -0
- /package/dist/{performance-6QW2KEEQ.js.map → performance-UF5VTY2U.js.map} +0 -0
- /package/dist/{promoted-tweets-SURKMHFI.js.map → promoted-tweets-LZKS5JIF.js.map} +0 -0
- /package/dist/{reddit-GIP3ADMS.js.map → reddit-NU2N3LZD.js.map} +0 -0
- /package/dist/{research-2BLEISBG.js.map → research-FMM6AWZC.js.map} +0 -0
- /package/dist/{run-MODGUNGT.js.map → run-EUO34T2J.js.map} +0 -0
- /package/dist/{scheduled-agents-6U44QE76.js.map → scheduled-agents-N4LJRM4C.js.map} +0 -0
- /package/dist/{sources-YBQ6KPFM.js.map → sources-FQ2UZTHL.js.map} +0 -0
- /package/dist/{stock-2YCDN3N6.js.map → stock-KXJ26BY4.js.map} +0 -0
- /package/dist/{studio-RA7QQH4O.js.map → studio-SYKOSNDB.js.map} +0 -0
- /package/dist/{sync-definition-IPUFS5XS.js.map → sync-definition-QR2N233R.js.map} +0 -0
- /package/dist/{tags-3WPW6PTV.js.map → tags-PYWFSBTR.js.map} +0 -0
- /package/dist/{targeting-criteria-NR47AF5C.js.map → targeting-criteria-RJFLFICN.js.map} +0 -0
- /package/dist/{testimonials-CVC4YIXO.js.map → testimonials-DII5DYLR.js.map} +0 -0
- /package/dist/{videos-YSXYGTBM.js.map → videos-LICG6ACJ.js.map} +0 -0
- /package/dist/{winning-ads-2WS7FI4E.js.map → winning-ads-C6S2C5VP.js.map} +0 -0
- /package/dist/{x-BFSKFCZD.js.map → x-CZHRC6U7.js.map} +0 -0
|
@@ -1,10 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
// ../api/src/analytics/eventKey.ts
|
|
2
|
+
var SEP = ":";
|
|
3
|
+
function formEventKey(flowSlug, nodeId, triggerId) {
|
|
4
|
+
return ["form", flowSlug, nodeId, triggerId].join(SEP);
|
|
5
|
+
}
|
|
6
|
+
function isLandingViewKey(key2) {
|
|
7
|
+
return parseEventKey(key2)?.family === "view";
|
|
8
|
+
}
|
|
9
|
+
function parseEventKey(key2) {
|
|
10
|
+
const cut = key2.indexOf(SEP);
|
|
11
|
+
if (cut <= 0) return null;
|
|
12
|
+
const family = key2.slice(0, cut);
|
|
13
|
+
const rest = key2.slice(cut + 1);
|
|
14
|
+
if (rest === "") return null;
|
|
15
|
+
switch (family) {
|
|
16
|
+
case "form": {
|
|
17
|
+
const [flowSlug, nodeId, ...triggerParts] = rest.split(SEP);
|
|
18
|
+
const triggerId = triggerParts.join(SEP);
|
|
19
|
+
if (!flowSlug || !nodeId || triggerId === "") return null;
|
|
20
|
+
return { family: "form", flowSlug, nodeId, triggerId };
|
|
21
|
+
}
|
|
22
|
+
case "submit":
|
|
23
|
+
return { family: "submit", flowSlug: rest };
|
|
24
|
+
case "page":
|
|
25
|
+
return { family: "page", eventName: rest };
|
|
26
|
+
case "exit":
|
|
27
|
+
return { family: "exit", host: rest };
|
|
28
|
+
case "view":
|
|
29
|
+
return { family: "view", landingId: rest };
|
|
30
|
+
default:
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
8
34
|
|
|
9
35
|
// ../api/src/analytics/adParams.ts
|
|
10
36
|
var AD_PARAM_ROLES = [
|
|
@@ -348,112 +374,46 @@ var CAPTURED_WITHOUT_ROLE = [
|
|
|
348
374
|
"targetid"
|
|
349
375
|
].sort();
|
|
350
376
|
|
|
351
|
-
// ../api/src/analytics/
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
377
|
+
// ../api/src/analytics/peopleSearch.ts
|
|
378
|
+
import { z } from "zod";
|
|
379
|
+
|
|
380
|
+
// ../api/src/identity/digest.ts
|
|
381
|
+
var SHA256_HEX = /^[0-9a-fA-F]{64}$/;
|
|
382
|
+
function isSha256Hex(value) {
|
|
383
|
+
return SHA256_HEX.test(value);
|
|
355
384
|
}
|
|
356
|
-
|
|
357
|
-
|
|
385
|
+
|
|
386
|
+
// ../api/src/identity/email.ts
|
|
387
|
+
function normalizeEmailV1(raw) {
|
|
388
|
+
const trimmed = raw.trim().toLowerCase();
|
|
389
|
+
return trimmed === "" ? null : trimmed;
|
|
358
390
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const rest = key.slice(cut + 1);
|
|
364
|
-
if (rest === "") return null;
|
|
365
|
-
switch (family) {
|
|
366
|
-
case "form": {
|
|
367
|
-
const [flowSlug, nodeId, ...triggerParts] = rest.split(SEP);
|
|
368
|
-
const triggerId = triggerParts.join(SEP);
|
|
369
|
-
if (!flowSlug || !nodeId || triggerId === "") return null;
|
|
370
|
-
return { family: "form", flowSlug, nodeId, triggerId };
|
|
371
|
-
}
|
|
372
|
-
case "submit":
|
|
373
|
-
return { family: "submit", flowSlug: rest };
|
|
374
|
-
case "page":
|
|
375
|
-
return { family: "page", eventName: rest };
|
|
376
|
-
case "exit":
|
|
377
|
-
return { family: "exit", host: rest };
|
|
378
|
-
case "view":
|
|
379
|
-
return { family: "view", landingId: rest };
|
|
380
|
-
default:
|
|
381
|
-
return null;
|
|
382
|
-
}
|
|
391
|
+
var EMAIL = /^[^\s@]+@[^\s@.]+(?:\.[^\s@.]+)+$/;
|
|
392
|
+
function normalizeEmailV2(raw) {
|
|
393
|
+
const trimmed = raw.trim().toLowerCase();
|
|
394
|
+
return EMAIL.test(trimmed) ? trimmed : null;
|
|
383
395
|
}
|
|
384
396
|
|
|
385
|
-
// ../api/src/
|
|
386
|
-
|
|
387
|
-
"
|
|
388
|
-
"
|
|
389
|
-
"googleAds",
|
|
390
|
-
"linkedinInsightTag",
|
|
391
|
-
"twitterAds",
|
|
392
|
-
"googleAnalytics"
|
|
393
|
-
];
|
|
394
|
-
function isSendPlatform(value) {
|
|
395
|
-
return SEND_PLATFORMS.includes(value);
|
|
397
|
+
// ../api/src/identity/phone.ts
|
|
398
|
+
function normalizePhoneV1(raw) {
|
|
399
|
+
const digits = raw.trim().toLowerCase().replace(/[^0-9]/g, "");
|
|
400
|
+
return digits === "" ? null : `+${digits}`;
|
|
396
401
|
}
|
|
397
|
-
var
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
setupHint: "Add the Conversions API access token to the Meta pixel in Tracking"
|
|
404
|
-
},
|
|
405
|
-
chatgptAds: {
|
|
406
|
-
title: "ChatGPT Ads",
|
|
407
|
-
eventMeans: "A ChatGPT Ads event \u2014 lead_created, order_created, or a custom name",
|
|
408
|
-
eventKind: "name",
|
|
409
|
-
credentialFields: ["apiKey"],
|
|
410
|
-
setupHint: "Add the Conversions API key to the ChatGPT Ads pixel in Tracking"
|
|
411
|
-
},
|
|
412
|
-
googleAds: {
|
|
413
|
-
title: "Google Ads",
|
|
414
|
-
eventMeans: "One of the account's conversion actions, picked from its list",
|
|
415
|
-
eventKind: "id",
|
|
416
|
-
credentialFields: ["oauthProviderId"],
|
|
417
|
-
setupHint: "Connect the Google Ads conversion tag to a Google Ads account in Tracking"
|
|
418
|
-
},
|
|
419
|
-
linkedinInsightTag: {
|
|
420
|
-
title: "LinkedIn",
|
|
421
|
-
eventMeans: "The id of a conversion rule in LinkedIn Campaign Manager",
|
|
422
|
-
eventKind: "id",
|
|
423
|
-
credentialFields: ["oauthProviderId"],
|
|
424
|
-
setupHint: "Connect the LinkedIn Insight Tag to a LinkedIn account in Tracking"
|
|
425
|
-
},
|
|
426
|
-
twitterAds: {
|
|
427
|
-
title: "X",
|
|
428
|
-
eventMeans: "The event tag id from X Events Manager, like tw-oka17-abc12",
|
|
429
|
-
eventKind: "id",
|
|
430
|
-
credentialFields: ["oauthProviderId"],
|
|
431
|
-
setupHint: "Connect the X pixel to an X Ads account in Tracking"
|
|
432
|
-
},
|
|
433
|
-
googleAnalytics: {
|
|
434
|
-
title: "Google Analytics",
|
|
435
|
-
eventMeans: "A GA4 event name \u2014 generate_lead, purchase, or one of your own",
|
|
436
|
-
eventKind: "name",
|
|
437
|
-
credentialFields: ["apiSecret"],
|
|
438
|
-
setupHint: "Add the Measurement Protocol API secret to the Google Analytics tag in Tracking"
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
var SEND_ORIGINS = ["server", "website", "any"];
|
|
442
|
-
var MAX_SEND_ID = 64;
|
|
443
|
-
var MAX_SEND_EVENT_KEY = 320;
|
|
444
|
-
function sendEventIsTemplated(event) {
|
|
445
|
-
return templateMentions(event).length > 0;
|
|
402
|
+
var PHONE_PUNCTUATION = /[\s()./-]/g;
|
|
403
|
+
var E164 = /^\+[1-9]\d{7,14}$/;
|
|
404
|
+
function normalizePhoneV2(raw) {
|
|
405
|
+
const compact = raw.replace(PHONE_PUNCTUATION, "");
|
|
406
|
+
const e164 = compact.startsWith("00") ? `+${compact.slice(2)}` : compact;
|
|
407
|
+
return E164.test(e164) ? e164 : null;
|
|
446
408
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
return `${spec.title} identifies a conversion by an id it issued, so it cannot be written from the event. Paste the id; pass what varies as an extra parameter instead.`;
|
|
409
|
+
|
|
410
|
+
// ../api/src/identity/index.ts
|
|
411
|
+
function normalizeIdentity(raw, version) {
|
|
412
|
+
const value = raw.kind === "email" ? version === 1 ? normalizeEmailV1(raw.value) : normalizeEmailV2(raw.value) : version === 1 ? normalizePhoneV1(raw.value) : normalizePhoneV2(raw.value);
|
|
413
|
+
return value === null ? null : { kind: raw.kind, value, normalizationVersion: version };
|
|
453
414
|
}
|
|
454
415
|
|
|
455
416
|
// ../api/src/analytics/peopleSearch.ts
|
|
456
|
-
import { z } from "zod";
|
|
457
417
|
var PEOPLE_SEARCH_MAX_TERMS = 50;
|
|
458
418
|
var VERBATIM_KINDS = [
|
|
459
419
|
"browser",
|
|
@@ -523,8 +483,8 @@ function sameness(term) {
|
|
|
523
483
|
return `${term.kind}|${term.value}`;
|
|
524
484
|
}
|
|
525
485
|
}
|
|
526
|
-
function parsePeopleQuery(
|
|
527
|
-
const inputs = (typeof
|
|
486
|
+
function parsePeopleQuery(text2) {
|
|
487
|
+
const inputs = (typeof text2 === "string" ? [text2] : text2).flatMap((part) => part.split(TERM_SEPARATORS));
|
|
528
488
|
const seen = /* @__PURE__ */ new Set();
|
|
529
489
|
const terms = [];
|
|
530
490
|
for (const raw of inputs) {
|
|
@@ -584,163 +544,8 @@ var peopleLookupDataSchema = z.object({
|
|
|
584
544
|
dropped: z.number()
|
|
585
545
|
});
|
|
586
546
|
|
|
587
|
-
// ../api/src/analytics/sendsWire.ts
|
|
588
|
-
import { z as z2 } from "zod";
|
|
589
|
-
var conversionSendSchema = z2.object({
|
|
590
|
-
/** Stable within the company. `s1`, `s2` — something a person can type. */
|
|
591
|
-
id: z2.string().min(1).max(MAX_SEND_ID),
|
|
592
|
-
/** The event it sends, by key — `page:<name>`, from `events[]` of a plain read. */
|
|
593
|
-
eventKey: z2.string().min(1).max(MAX_SEND_EVENT_KEY),
|
|
594
|
-
/** `website` for an event Baker's pixel raised on the company's own site; absent (or `server`) for the API and integrations. */
|
|
595
|
-
origin: z2.enum(SEND_ORIGINS).optional(),
|
|
596
|
-
platform: z2.enum(SEND_PLATFORMS),
|
|
597
|
-
/** The tag's id on Tracking. Must be one of this company's tags of the platform's type, with its server credential set. */
|
|
598
|
-
tagId: z2.string().min(1).max(120),
|
|
599
|
-
/** A Meta or GA4 event name; a Google Ads conversion action id; a LinkedIn conversion rule id; an X event tag id. */
|
|
600
|
-
event: z2.string().min(1).max(255),
|
|
601
|
-
/** The LinkedIn ad account the conversion rule belongs to. */
|
|
602
|
-
account: z2.string().max(120).optional(),
|
|
603
|
-
/** Extra platform parameters: name → template over the event. See `SEND_PARAMETERS[platform]`. */
|
|
604
|
-
parameters: z2.record(z2.string().min(1).max(64), z2.string().min(1).max(500)).optional()
|
|
605
|
-
});
|
|
606
|
-
var sendUploadSchema = z2.object({
|
|
607
|
-
sendId: z2.string(),
|
|
608
|
-
eventUid: z2.string(),
|
|
609
|
-
/** The event's own name, as it was counted. Empty for a Form's submit, which has none. */
|
|
610
|
-
eventName: z2.string(),
|
|
611
|
-
/** The event's key, as `conversions` spells it — what names a Form's submit. */
|
|
612
|
-
eventKey: z2.string(),
|
|
613
|
-
/** The Form it happened in, for a `form:` or `submit:` key. */
|
|
614
|
-
flowSlug: z2.string(),
|
|
615
|
-
/** ISO instant of the event itself. */
|
|
616
|
-
eventAt: z2.string(),
|
|
617
|
-
/** ISO instant of the upload. */
|
|
618
|
-
dispatchedAt: z2.string(),
|
|
619
|
-
/** `skipped`: never uploaded, because the event carried nothing the platform can match a person by. */
|
|
620
|
-
outcome: z2.enum(["success", "failed", "pending", "skipped"]),
|
|
621
|
-
/** The platform's refusal in its own words, or why it was skipped. Empty otherwise. */
|
|
622
|
-
error: z2.string(),
|
|
623
|
-
sessionId: z2.string(),
|
|
624
|
-
anonId: z2.string()
|
|
625
|
-
});
|
|
626
|
-
var MAX_SENDS_PER_REQUEST = 40;
|
|
627
|
-
var sendsRequestSchema = z2.object({
|
|
628
|
-
set: z2.array(conversionSendSchema).max(MAX_SENDS_PER_REQUEST).optional(),
|
|
629
|
-
remove: z2.array(z2.string().min(1).max(MAX_SEND_ID)).max(MAX_SENDS_PER_REQUEST).optional(),
|
|
630
|
-
/** How many days the outcomes beside each send cover. Default 30. */
|
|
631
|
-
days: z2.number().int().min(1).max(400).optional(),
|
|
632
|
-
/** List one send's uploads over the window, newest first, by the send's id. */
|
|
633
|
-
uploads: z2.string().min(1).max(MAX_SEND_ID).optional(),
|
|
634
|
-
/** With `uploads`: only the ones the platform refused. */
|
|
635
|
-
failedOnly: z2.boolean().optional(),
|
|
636
|
-
/** With `uploads`: only the events skipped, with what each was missing. */
|
|
637
|
-
skippedOnly: z2.boolean().optional()
|
|
638
|
-
});
|
|
639
|
-
var sendOutcomeSchema = z2.object({
|
|
640
|
-
sendId: z2.string(),
|
|
641
|
-
dispatched: z2.number(),
|
|
642
|
-
succeeded: z2.number(),
|
|
643
|
-
failed: z2.number(),
|
|
644
|
-
pending: z2.number(),
|
|
645
|
-
lastError: z2.string(),
|
|
646
|
-
lastAt: z2.string(),
|
|
647
|
-
/** Events not uploaded: they carried nothing this platform can match a person by. */
|
|
648
|
-
skipped: z2.number().optional(),
|
|
649
|
-
lastSkipReason: z2.string().optional()
|
|
650
|
-
});
|
|
651
|
-
var sendsResponseSchema = z2.object({
|
|
652
|
-
ok: z2.literal(true),
|
|
653
|
-
data: z2.object({
|
|
654
|
-
/** The company's sends, as they are live. */
|
|
655
|
-
sends: z2.array(conversionSendSchema.extend({ outcome: sendOutcomeSchema.optional() })),
|
|
656
|
-
/** The ops this chat has staged and not yet published. Absent outside a chat. */
|
|
657
|
-
staged: z2.object({
|
|
658
|
-
set: z2.array(conversionSendSchema),
|
|
659
|
-
remove: z2.array(z2.string())
|
|
660
|
-
}).optional(),
|
|
661
|
-
/** The platforms, what `event` means on each, what a tag needs on Tracking to send, and the tags that can. */
|
|
662
|
-
platforms: z2.array(
|
|
663
|
-
z2.object({
|
|
664
|
-
platform: z2.string(),
|
|
665
|
-
title: z2.string(),
|
|
666
|
-
eventMeans: z2.string(),
|
|
667
|
-
setupHint: z2.string(),
|
|
668
|
-
tags: z2.array(z2.object({ tagId: z2.string(), label: z2.string() })),
|
|
669
|
-
/**
|
|
670
|
-
* The conversions the platform already holds, by the id a send's `event`
|
|
671
|
-
* takes and the name the person gave them. Google Ads only: its `event`
|
|
672
|
-
* is an id Google issued, and an id the account does not hold is
|
|
673
|
-
* accepted and files against nothing. `label` is the conversion label
|
|
674
|
-
* the account's tag setup shows (`AW-…/<label>`) — how the person knows it.
|
|
675
|
-
*/
|
|
676
|
-
conversionActions: z2.array(
|
|
677
|
-
z2.object({ id: z2.string(), name: z2.string(), primaryForGoal: z2.boolean(), label: z2.string().optional() })
|
|
678
|
-
).optional()
|
|
679
|
-
})
|
|
680
|
-
),
|
|
681
|
-
/** Every field a send forwards. Nothing to map. */
|
|
682
|
-
carries: z2.array(z2.object({ name: z2.string(), label: z2.string(), group: z2.string(), hashed: z2.boolean() })),
|
|
683
|
-
/**
|
|
684
|
-
* The events this company's systems raise, so a send can be pointed at
|
|
685
|
-
* one: every Source by the key it raises, and every named event the store
|
|
686
|
-
* saw arrive from a system.
|
|
687
|
-
*/
|
|
688
|
-
events: z2.array(
|
|
689
|
-
z2.object({
|
|
690
|
-
eventKey: z2.string(),
|
|
691
|
-
/** The event's own name. */
|
|
692
|
-
name: z2.string(),
|
|
693
|
-
/** `source` for a Source on Sources, `systems` for a name the API posted, `both` when a page sends it too, `website` for a name Baker's pixel sent — a send on it carries `origin: "website"`. */
|
|
694
|
-
origin: z2.string(),
|
|
695
|
-
/**
|
|
696
|
-
* The last 30 days of it: how many arrived, and how many each platform
|
|
697
|
-
* could match a person on. The rest would be skipped by a send there.
|
|
698
|
-
*/
|
|
699
|
-
match: z2.object({ events: z2.number(), platforms: z2.record(z2.string(), z2.number()) }).optional()
|
|
700
|
-
})
|
|
701
|
-
),
|
|
702
|
-
/** What each platform does with extra parameters, and the names it knows. */
|
|
703
|
-
parameters: z2.array(
|
|
704
|
-
z2.object({
|
|
705
|
-
platform: z2.string(),
|
|
706
|
-
takes: z2.boolean(),
|
|
707
|
-
where: z2.string(),
|
|
708
|
-
known: z2.array(z2.string()),
|
|
709
|
-
max: z2.number()
|
|
710
|
-
})
|
|
711
|
-
),
|
|
712
|
-
/** The event fields a parameter template may read, beside `properties.<key>`. */
|
|
713
|
-
templateFields: z2.array(z2.object({ name: z2.string(), label: z2.string() })),
|
|
714
|
-
/** One send's uploads, when `uploads` named one. */
|
|
715
|
-
uploads: z2.object({ sendId: z2.string(), rows: z2.array(sendUploadSchema) }).optional()
|
|
716
|
-
}),
|
|
717
|
-
hints: z2.array(z2.string()).optional()
|
|
718
|
-
});
|
|
719
|
-
|
|
720
|
-
// ../api/src/analytics/unstage.ts
|
|
721
|
-
import { z as z3 } from "zod";
|
|
722
|
-
var ANALYTICS_UNSTAGE_KINDS = ["mapping", "conversion", "send", "source"];
|
|
723
|
-
var analyticsUnstageKindSchema = z3.enum(ANALYTICS_UNSTAGE_KINDS);
|
|
724
|
-
var analyticsUnstageRequestSchema = z3.object({
|
|
725
|
-
chatId: z3.string().min(1),
|
|
726
|
-
kind: analyticsUnstageKindSchema.optional(),
|
|
727
|
-
ref: z3.string().min(1).optional(),
|
|
728
|
-
/** Everything staged — of `kind` when given, of every kind otherwise. */
|
|
729
|
-
all: z3.boolean().optional()
|
|
730
|
-
}).refine((body) => body.all === true ? body.ref === void 0 : body.kind !== void 0 && body.ref !== void 0, {
|
|
731
|
-
message: "Pass --kind with --ref to take back one staged change, or --all (optionally with --kind) to take back everything staged."
|
|
732
|
-
});
|
|
733
|
-
var analyticsUnstageResponseSchema = z3.object({
|
|
734
|
-
ok: z3.literal(true),
|
|
735
|
-
data: z3.object({
|
|
736
|
-
/** How many staged changes were taken back, per kind touched. */
|
|
737
|
-
removed: z3.partialRecord(analyticsUnstageKindSchema, z3.number().int().min(0))
|
|
738
|
-
}),
|
|
739
|
-
hints: z3.array(z3.string()).optional()
|
|
740
|
-
});
|
|
741
|
-
|
|
742
547
|
// ../api/src/analytics/wire.ts
|
|
743
|
-
import { z as
|
|
548
|
+
import { z as z2 } from "zod";
|
|
744
549
|
|
|
745
550
|
// ../api/src/analytics/conversions.ts
|
|
746
551
|
var CONVERSION_COUNT_MODES = ["once_per_visit", "every_time"];
|
|
@@ -779,7 +584,7 @@ function boundSubmissionAnswers(answers) {
|
|
|
779
584
|
|
|
780
585
|
// ../api/src/analytics/wire.ts
|
|
781
586
|
var SEND_FILTERS = ["any", "failed", "skipped"];
|
|
782
|
-
var adParamRoleSchema =
|
|
587
|
+
var adParamRoleSchema = z2.enum(AD_PARAM_ROLES);
|
|
783
588
|
var ANALYTICS_MAX_PAGE_SIZE = 200;
|
|
784
589
|
var ANALYTICS_MAX_PAGE = 500;
|
|
785
590
|
function isResolvableTimeZone(value) {
|
|
@@ -790,7 +595,7 @@ function isResolvableTimeZone(value) {
|
|
|
790
595
|
return false;
|
|
791
596
|
}
|
|
792
597
|
}
|
|
793
|
-
var analyticsPresetSchema =
|
|
598
|
+
var analyticsPresetSchema = z2.enum([
|
|
794
599
|
/** Everything that matters in one call — the default entry point. */
|
|
795
600
|
"overview",
|
|
796
601
|
/** Traffic shape: trend, sources, geo, device. */
|
|
@@ -990,30 +795,30 @@ var analyticsPresetSchema = z4.enum([
|
|
|
990
795
|
]);
|
|
991
796
|
var ANALYTICS_PRESETS = analyticsPresetSchema.options;
|
|
992
797
|
var ANALYTICS_EVENT_DOORS = ["pages", "website", "server", "integrations"];
|
|
993
|
-
var analyticsQueryRequestSchema =
|
|
798
|
+
var analyticsQueryRequestSchema = z2.object({
|
|
994
799
|
preset: analyticsPresetSchema,
|
|
995
800
|
/** Lookback in days. Ignored when `startDate` is given. */
|
|
996
|
-
days:
|
|
997
|
-
startDate:
|
|
998
|
-
endDate:
|
|
801
|
+
days: z2.coerce.number().int().positive().max(400).optional(),
|
|
802
|
+
startDate: z2.iso.date().optional(),
|
|
803
|
+
endDate: z2.iso.date().optional(),
|
|
999
804
|
/** Required by the `page` preset; ignored by the others. */
|
|
1000
|
-
path:
|
|
805
|
+
path: z2.string().max(1024).optional(),
|
|
1001
806
|
/** Narrows `funnel` to one Form. Omitted means every Form. */
|
|
1002
|
-
flowSlug:
|
|
807
|
+
flowSlug: z2.string().max(120).optional(),
|
|
1003
808
|
/**
|
|
1004
809
|
* How far down the `geo` preset looks. Ignored by every other preset.
|
|
1005
810
|
*
|
|
1006
811
|
* A closed set rather than a column name, because it names a column and a
|
|
1007
812
|
* column name taken from a request must never reach the SQL.
|
|
1008
813
|
*/
|
|
1009
|
-
grain:
|
|
814
|
+
grain: z2.enum(["country", "region", "city", "postal_code", "metro_code"]).optional(),
|
|
1010
815
|
/**
|
|
1011
816
|
* Narrows `geo` to one country before going finer.
|
|
1012
817
|
*
|
|
1013
818
|
* Not optional decoration below country level: postcodes collide across
|
|
1014
819
|
* markets, so a bare `28001` is a Madrid postcode and a US ZIP at once.
|
|
1015
820
|
*/
|
|
1016
|
-
country:
|
|
821
|
+
country: z2.string().max(8).optional(),
|
|
1017
822
|
/**
|
|
1018
823
|
* Which ad dimension to break down by, or to narrow every other report to.
|
|
1019
824
|
*
|
|
@@ -1031,7 +836,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1031
836
|
* none of these" — which is how you size the untagged half of an account.
|
|
1032
837
|
* Omit both to leave the report unnarrowed.
|
|
1033
838
|
*/
|
|
1034
|
-
adValue:
|
|
839
|
+
adValue: z2.string().max(255).optional(),
|
|
1035
840
|
/**
|
|
1036
841
|
* Read this report in one ad platform's vocabulary, and from its traffic.
|
|
1037
842
|
*
|
|
@@ -1046,7 +851,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1046
851
|
* Omit it for the union across every platform, which is the honest
|
|
1047
852
|
* superset and the right default for "how is paid doing".
|
|
1048
853
|
*/
|
|
1049
|
-
adPlatform:
|
|
854
|
+
adPlatform: z2.enum(AD_PLATFORMS).optional(),
|
|
1050
855
|
/**
|
|
1051
856
|
* Read only what came in by one door. See {@link ANALYTICS_EVENT_DOORS}.
|
|
1052
857
|
*
|
|
@@ -1057,7 +862,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1057
862
|
* ingest row carries no `session_id`, deliberately, so there is no visit
|
|
1058
863
|
* for it to be counted in.
|
|
1059
864
|
*/
|
|
1060
|
-
eventOrigin:
|
|
865
|
+
eventOrigin: z2.enum(ANALYTICS_EVENT_DOORS).optional(),
|
|
1061
866
|
/**
|
|
1062
867
|
* `stream` only: keep just one kind of event, named by the key
|
|
1063
868
|
* `conversions` hands back in its catalogue.
|
|
@@ -1067,26 +872,26 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1067
872
|
* and a filter that could only name the fourth would be a filter that hides
|
|
1068
873
|
* most of the feed from itself.
|
|
1069
874
|
*/
|
|
1070
|
-
eventKey:
|
|
875
|
+
eventKey: z2.string().optional(),
|
|
1071
876
|
/**
|
|
1072
877
|
* `stream` only: keep just what one source sent, by the source's name —
|
|
1073
878
|
* the `baker_source` every event from an address or a HubSpot read
|
|
1074
879
|
* carries. Names come from `baker analytics sources`.
|
|
1075
880
|
*/
|
|
1076
|
-
sourceName:
|
|
881
|
+
sourceName: z2.string().optional(),
|
|
1077
882
|
/**
|
|
1078
883
|
* `stream` only: keep just the uploads a conversion's sends made —
|
|
1079
884
|
* `any` for every upload, `failed` for the ones the platform refused.
|
|
1080
885
|
*/
|
|
1081
|
-
sends:
|
|
886
|
+
sends: z2.enum(SEND_FILTERS).optional(),
|
|
1082
887
|
/** `stream` only: keep just the uploads one send made, by its id (`s1`). */
|
|
1083
|
-
sendId:
|
|
888
|
+
sendId: z2.string().optional(),
|
|
1084
889
|
/** `stream` only: keep what went to one destination (`meta`, `httpWebhook`) — a Form's deliveries and sends' uploads alike. */
|
|
1085
|
-
sentTo:
|
|
890
|
+
sentTo: z2.string().max(64).optional(),
|
|
1086
891
|
/** `stream` only: one event by its uid, and every upload made for it — with the platform's verdict on each. */
|
|
1087
|
-
eventUid:
|
|
892
|
+
eventUid: z2.string().optional(),
|
|
1088
893
|
/** Return the long breakdowns and the per-day trend. */
|
|
1089
|
-
full:
|
|
894
|
+
full: z2.boolean().optional(),
|
|
1090
895
|
/**
|
|
1091
896
|
* IANA zone the day boundaries are drawn in. Defaults to UTC.
|
|
1092
897
|
*
|
|
@@ -1107,7 +912,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1107
912
|
* prevent — better to say the zone is unknown than to answer for the wrong
|
|
1108
913
|
* one.
|
|
1109
914
|
*/
|
|
1110
|
-
timezone:
|
|
915
|
+
timezone: z2.string().max(64).refine(isResolvableTimeZone, { message: "Unknown timezone \u2014 pass an IANA zone such as Europe/Madrid" }).optional(),
|
|
1111
916
|
/**
|
|
1112
917
|
* How wide one point of a series is.
|
|
1113
918
|
*
|
|
@@ -1116,7 +921,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1116
921
|
* dashboard and 4 on a slide. A 24-hour window at `day` granularity is one
|
|
1117
922
|
* bar, which is the shape this exists to prevent.
|
|
1118
923
|
*/
|
|
1119
|
-
granularity:
|
|
924
|
+
granularity: z2.enum(["hour", "day", "week", "month"]).optional(),
|
|
1120
925
|
/**
|
|
1121
926
|
* Narrow to one landing by its `internalId`.
|
|
1122
927
|
*
|
|
@@ -1124,9 +929,9 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1124
929
|
* renamed or moved, which is exactly when a before-and-after comparison
|
|
1125
930
|
* matters most and is exactly when `path` stops matching.
|
|
1126
931
|
*/
|
|
1127
|
-
landingId:
|
|
932
|
+
landingId: z2.string().max(120).optional(),
|
|
1128
933
|
/** Narrows `landings` to the landings carrying one tag. */
|
|
1129
|
-
tag:
|
|
934
|
+
tag: z2.string().max(32).optional(),
|
|
1130
935
|
/**
|
|
1131
936
|
* Which visit the `session` preset replays.
|
|
1132
937
|
*
|
|
@@ -1134,18 +939,18 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1134
939
|
* a population report to one visitor produces numbers that are individually
|
|
1135
940
|
* true and collectively meaningless.
|
|
1136
941
|
*/
|
|
1137
|
-
sessionId:
|
|
942
|
+
sessionId: z2.string().max(120).optional(),
|
|
1138
943
|
/**
|
|
1139
944
|
* Whose earlier visits to resolve, as a lowercase hex digest.
|
|
1140
945
|
*
|
|
1141
946
|
* A digest and never an address: the identity a page sends is hashed in the
|
|
1142
947
|
* browser, and nothing downstream of that ever holds the original.
|
|
1143
948
|
*/
|
|
1144
|
-
identityHash:
|
|
949
|
+
identityHash: z2.string().max(128).optional(),
|
|
1145
950
|
/** Which page-defined event the `events` preset breaks down. */
|
|
1146
|
-
eventName:
|
|
951
|
+
eventName: z2.string().max(120).optional(),
|
|
1147
952
|
/** Which of that event's own properties to break it down by. */
|
|
1148
|
-
property:
|
|
953
|
+
property: z2.string().max(64).optional(),
|
|
1149
954
|
/**
|
|
1150
955
|
* Narrow the breakdown to the rows carrying one property value.
|
|
1151
956
|
*
|
|
@@ -1155,7 +960,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1155
960
|
* muted hero produces by playing to nobody. Grouping gives the two totals;
|
|
1156
961
|
* only filtering gives either curve.
|
|
1157
962
|
*/
|
|
1158
|
-
where:
|
|
963
|
+
where: z2.object({ property: z2.string().max(64), value: z2.string().max(120) }).optional(),
|
|
1159
964
|
/**
|
|
1160
965
|
* An ordered funnel over page-defined event names.
|
|
1161
966
|
*
|
|
@@ -1165,7 +970,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1165
970
|
* step N after step N-1, or "saw pricing then clicked demo" and the reverse
|
|
1166
971
|
* would be the same number.
|
|
1167
972
|
*/
|
|
1168
|
-
steps:
|
|
973
|
+
steps: z2.array(z2.string().max(120)).max(10).optional(),
|
|
1169
974
|
/**
|
|
1170
975
|
* Also return the immediately preceding window of the same length.
|
|
1171
976
|
*
|
|
@@ -1174,9 +979,9 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1174
979
|
* comparison window is described in the response and a caller can render
|
|
1175
980
|
* either side of it.
|
|
1176
981
|
*/
|
|
1177
|
-
compare:
|
|
982
|
+
compare: z2.boolean().optional(),
|
|
1178
983
|
/** `devices` only: which facet to group on. */
|
|
1179
|
-
deviceGrain:
|
|
984
|
+
deviceGrain: z2.enum(["browser", "os", "engine", "device", "viewport"]).optional(),
|
|
1180
985
|
/**
|
|
1181
986
|
* One browser, by its cookie id.
|
|
1182
987
|
*
|
|
@@ -1190,15 +995,15 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1190
995
|
* Filtering on the cookie alone would drop exactly the rows the reader
|
|
1191
996
|
* came for — a deal a CRM posted names the person and carries no cookie.
|
|
1192
997
|
*/
|
|
1193
|
-
anonId:
|
|
998
|
+
anonId: z2.string().max(120).optional(),
|
|
1194
999
|
/**
|
|
1195
1000
|
* `stream` and `session`: one person by any key the store recognises them
|
|
1196
1001
|
* by — a contact digest, a CRM id, a click id, a platform cookie — for the
|
|
1197
1002
|
* rows a system posted about somebody no browser has named yet. A browser
|
|
1198
1003
|
* wins when both are given.
|
|
1199
1004
|
*/
|
|
1200
|
-
personKind:
|
|
1201
|
-
personValue:
|
|
1005
|
+
personKind: z2.string().max(40).optional(),
|
|
1006
|
+
personValue: z2.string().max(255).optional(),
|
|
1202
1007
|
/**
|
|
1203
1008
|
* `stream` only: several people, each by whatever the reader holds about
|
|
1204
1009
|
* them — an email, a phone, a CRM contact or deal id, a click id, a browser
|
|
@@ -1215,7 +1020,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1215
1020
|
* filtering the most recent 200 visitors down to the ones who converted
|
|
1216
1021
|
* usually leaves two, and reads as "we had two leads".
|
|
1217
1022
|
*/
|
|
1218
|
-
onlyConverted:
|
|
1023
|
+
onlyConverted: z2.boolean().optional(),
|
|
1219
1024
|
/**
|
|
1220
1025
|
* Which page of a list-shaped report to read, 1-based.
|
|
1221
1026
|
*
|
|
@@ -1231,7 +1036,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1231
1036
|
* indication that the number was the cap talking. A cap that is reported is
|
|
1232
1037
|
* a page; a cap that is not is a wrong answer.
|
|
1233
1038
|
*/
|
|
1234
|
-
page:
|
|
1039
|
+
page: z2.coerce.number().int().min(1).max(ANALYTICS_MAX_PAGE).optional(),
|
|
1235
1040
|
/**
|
|
1236
1041
|
* How many rows one page holds. Bounded, because the reader is a browser.
|
|
1237
1042
|
*
|
|
@@ -1239,7 +1044,7 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1239
1044
|
* what keeps `baker analytics submissions --full` returning the same 800
|
|
1240
1045
|
* rows it always did for an agent that reads the whole thing in one go.
|
|
1241
1046
|
*/
|
|
1242
|
-
pageSize:
|
|
1047
|
+
pageSize: z2.coerce.number().int().min(1).max(ANALYTICS_MAX_PAGE_SIZE).optional()
|
|
1243
1048
|
}).refine((value) => value.preset !== "page" || typeof value.path === "string", {
|
|
1244
1049
|
message: "The 'page' preset needs --path",
|
|
1245
1050
|
path: ["path"]
|
|
@@ -1256,19 +1061,19 @@ var analyticsQueryRequestSchema = z4.object({
|
|
|
1256
1061
|
message: "Narrowing with --where needs --event and --property too",
|
|
1257
1062
|
path: ["where"]
|
|
1258
1063
|
});
|
|
1259
|
-
var analyticsWindowSchema =
|
|
1260
|
-
startDate:
|
|
1261
|
-
endDate:
|
|
1262
|
-
days:
|
|
1064
|
+
var analyticsWindowSchema = z2.object({
|
|
1065
|
+
startDate: z2.iso.date(),
|
|
1066
|
+
endDate: z2.iso.date(),
|
|
1067
|
+
days: z2.number().int().positive(),
|
|
1263
1068
|
/** True when the window reaches past the datasource TTL, so part of it is simply gone. */
|
|
1264
|
-
beyondRetention:
|
|
1069
|
+
beyondRetention: z2.boolean()
|
|
1265
1070
|
});
|
|
1266
|
-
var analyticsTotalsSchema =
|
|
1071
|
+
var analyticsTotalsSchema = z2.object({
|
|
1267
1072
|
/** Counted from `visitor_new`. */
|
|
1268
|
-
visitors:
|
|
1073
|
+
visitors: z2.number().int().nonnegative(),
|
|
1269
1074
|
/** Counted from `session_start`. */
|
|
1270
|
-
sessions:
|
|
1271
|
-
pageViews:
|
|
1075
|
+
sessions: z2.number().int().nonnegative(),
|
|
1076
|
+
pageViews: z2.number().int().nonnegative(),
|
|
1272
1077
|
/**
|
|
1273
1078
|
* Every conversion, counting a visit twice when it converted twice.
|
|
1274
1079
|
*
|
|
@@ -1276,16 +1081,16 @@ var analyticsTotalsSchema = z4.object({
|
|
|
1276
1081
|
* download, a repeatable action — so this legitimately runs ahead of
|
|
1277
1082
|
* {@link convertingSessions}, and of `sessions`.
|
|
1278
1083
|
*/
|
|
1279
|
-
conversions:
|
|
1084
|
+
conversions: z2.number().int().nonnegative(),
|
|
1280
1085
|
/**
|
|
1281
1086
|
* Conversions in the window that no landing earned — by people none of the
|
|
1282
1087
|
* company's pages saw. Not in `conversions`, which is a page metric; shown
|
|
1283
1088
|
* beside it so a deal a CRM reported is never a silent zero. Zero under any
|
|
1284
1089
|
* scope.
|
|
1285
1090
|
*/
|
|
1286
|
-
unplacedConversions:
|
|
1091
|
+
unplacedConversions: z2.number().int().nonnegative().default(0),
|
|
1287
1092
|
/** Visits that produced at least one conversion. Never above `sessions`. */
|
|
1288
|
-
convertingSessions:
|
|
1093
|
+
convertingSessions: z2.number().int().nonnegative(),
|
|
1289
1094
|
/**
|
|
1290
1095
|
* Converting visits per visit, 0–1. Null when there were no visits.
|
|
1291
1096
|
*
|
|
@@ -1294,12 +1099,12 @@ var analyticsTotalsSchema = z4.object({
|
|
|
1294
1099
|
* reading "125%" is read as a broken report, not as a visitor who did the
|
|
1295
1100
|
* thing twice. The count above still says how often it happened.
|
|
1296
1101
|
*/
|
|
1297
|
-
conversionRate:
|
|
1298
|
-
avgEngagementMs:
|
|
1102
|
+
conversionRate: z2.number().min(0).max(1).nullable(),
|
|
1103
|
+
avgEngagementMs: z2.number().nonnegative().nullable(),
|
|
1299
1104
|
/** Page views per session. At or near 1 means visitors leave from the page they land on. */
|
|
1300
|
-
pagesPerSession:
|
|
1105
|
+
pagesPerSession: z2.number().nonnegative().nullable()
|
|
1301
1106
|
});
|
|
1302
|
-
var analyticsTrendPointSchema =
|
|
1107
|
+
var analyticsTrendPointSchema = z2.object({
|
|
1303
1108
|
/**
|
|
1304
1109
|
* The bucket's start, as an ISO instant.
|
|
1305
1110
|
*
|
|
@@ -1310,17 +1115,17 @@ var analyticsTrendPointSchema = z4.object({
|
|
|
1310
1115
|
* on the zone the caller asked for — which a bare `YYYY-MM-DD` cannot
|
|
1311
1116
|
* express without silently choosing one.
|
|
1312
1117
|
*/
|
|
1313
|
-
bucket:
|
|
1314
|
-
visitors:
|
|
1315
|
-
sessions:
|
|
1316
|
-
pageViews:
|
|
1317
|
-
conversions:
|
|
1118
|
+
bucket: z2.string(),
|
|
1119
|
+
visitors: z2.number().int().nonnegative(),
|
|
1120
|
+
sessions: z2.number().int().nonnegative(),
|
|
1121
|
+
pageViews: z2.number().int().nonnegative(),
|
|
1122
|
+
conversions: z2.number().int().nonnegative()
|
|
1318
1123
|
});
|
|
1319
|
-
var analyticsLandingRowSchema =
|
|
1124
|
+
var analyticsLandingRowSchema = z2.object({
|
|
1320
1125
|
/** The landing's `internalId` — the reference every event carries. */
|
|
1321
|
-
landingId:
|
|
1126
|
+
landingId: z2.string(),
|
|
1322
1127
|
/** The Convex `landings._id`, so a dashboard can link straight to the row. */
|
|
1323
|
-
landingRef:
|
|
1128
|
+
landingRef: z2.string(),
|
|
1324
1129
|
/**
|
|
1325
1130
|
* What a person calls it, or `""` when the dimension has not been mirrored
|
|
1326
1131
|
* yet.
|
|
@@ -1330,14 +1135,14 @@ var analyticsLandingRowSchema = z4.object({
|
|
|
1330
1135
|
* than papered over with the id, so a caller can say "not synced yet"
|
|
1331
1136
|
* instead of showing something that looks like a name and is not.
|
|
1332
1137
|
*/
|
|
1333
|
-
name:
|
|
1334
|
-
slug:
|
|
1335
|
-
tags:
|
|
1336
|
-
views:
|
|
1337
|
-
sessions:
|
|
1138
|
+
name: z2.string(),
|
|
1139
|
+
slug: z2.string(),
|
|
1140
|
+
tags: z2.array(z2.string()),
|
|
1141
|
+
views: z2.number().int().nonnegative(),
|
|
1142
|
+
sessions: z2.number().int().nonnegative(),
|
|
1338
1143
|
/** Sessions that BEGAN here. The honest denominator for this page's rate. */
|
|
1339
|
-
entrances:
|
|
1340
|
-
visitors:
|
|
1144
|
+
entrances: z2.number().int().nonnegative(),
|
|
1145
|
+
visitors: z2.number().int().nonnegative(),
|
|
1341
1146
|
/**
|
|
1342
1147
|
* Conversions that fired ON this landing — rarely the number to show.
|
|
1343
1148
|
*
|
|
@@ -1345,9 +1150,9 @@ var analyticsLandingRowSchema = z4.object({
|
|
|
1345
1150
|
* their shop, a CRM days later. None of those rows carries a landing id, so
|
|
1346
1151
|
* this reads 0 for a page whose visits convert reliably.
|
|
1347
1152
|
*/
|
|
1348
|
-
conversions:
|
|
1153
|
+
conversions: z2.number().int().nonnegative(),
|
|
1349
1154
|
/** Visits that converted on this page at least once. */
|
|
1350
|
-
convertingSessions:
|
|
1155
|
+
convertingSessions: z2.number().int().nonnegative(),
|
|
1351
1156
|
/**
|
|
1352
1157
|
* Conversions this landing led to — what the page is bought for.
|
|
1353
1158
|
*
|
|
@@ -1356,23 +1161,23 @@ var analyticsLandingRowSchema = z4.object({
|
|
|
1356
1161
|
* the sale a returning visitor made next week and the deal a CRM posted with
|
|
1357
1162
|
* no cookie at all, and the landings add up to the headline.
|
|
1358
1163
|
*/
|
|
1359
|
-
creditedConversions:
|
|
1164
|
+
creditedConversions: z2.number().int().nonnegative(),
|
|
1360
1165
|
/** People whose conversions are credited here. */
|
|
1361
|
-
creditedVisitors:
|
|
1362
|
-
outboundClicks:
|
|
1166
|
+
creditedVisitors: z2.number().int().nonnegative(),
|
|
1167
|
+
outboundClicks: z2.number().int().nonnegative(),
|
|
1363
1168
|
/**
|
|
1364
1169
|
* Visits credited a conversion, per visit. Null when nobody visited.
|
|
1365
1170
|
*
|
|
1366
1171
|
* Converting visits, not conversions: see {@link analyticsTotalsSchema}.
|
|
1367
1172
|
*/
|
|
1368
|
-
conversionRate:
|
|
1369
|
-
avgEngagementMs:
|
|
1173
|
+
conversionRate: z2.number().min(0).max(1).nullable(),
|
|
1174
|
+
avgEngagementMs: z2.number().nonnegative().nullable(),
|
|
1370
1175
|
/**
|
|
1371
1176
|
* Views per bucket, zero-filled against the same axis every other landing
|
|
1372
1177
|
* in the response uses — so the arrays are the same length and can be drawn
|
|
1373
1178
|
* side by side without asking what each element means.
|
|
1374
1179
|
*/
|
|
1375
|
-
sparkline:
|
|
1180
|
+
sparkline: z2.array(z2.number().int().nonnegative()),
|
|
1376
1181
|
/**
|
|
1377
1182
|
* The ad platforms actually sending this page traffic — `google`, `meta`,
|
|
1378
1183
|
* `linkedin`, `tiktok`, `x`, `microsoft`.
|
|
@@ -1381,7 +1186,7 @@ var analyticsLandingRowSchema = z4.object({
|
|
|
1381
1186
|
* a label is whatever somebody typed into a tracking template, a `gclid` is a
|
|
1382
1187
|
* click. Ordered by traffic, busiest first.
|
|
1383
1188
|
*/
|
|
1384
|
-
channels:
|
|
1189
|
+
channels: z2.array(z2.string()),
|
|
1385
1190
|
/**
|
|
1386
1191
|
* Visits per entry of {@link channels}, in the same order.
|
|
1387
1192
|
*
|
|
@@ -1391,26 +1196,26 @@ var analyticsLandingRowSchema = z4.object({
|
|
|
1391
1196
|
* show nothing at all. The count says how much, so one test click and a live
|
|
1392
1197
|
* campaign are distinguishable by reading rather than by absence.
|
|
1393
1198
|
*/
|
|
1394
|
-
channelSessions:
|
|
1199
|
+
channelSessions: z2.array(z2.number().int().nonnegative())
|
|
1395
1200
|
});
|
|
1396
|
-
var analyticsTagRowSchema =
|
|
1397
|
-
tag:
|
|
1398
|
-
landings:
|
|
1399
|
-
views:
|
|
1400
|
-
sessions:
|
|
1401
|
-
entrances:
|
|
1402
|
-
conversions:
|
|
1201
|
+
var analyticsTagRowSchema = z2.object({
|
|
1202
|
+
tag: z2.string(),
|
|
1203
|
+
landings: z2.number().int().nonnegative(),
|
|
1204
|
+
views: z2.number().int().nonnegative(),
|
|
1205
|
+
sessions: z2.number().int().nonnegative(),
|
|
1206
|
+
entrances: z2.number().int().nonnegative(),
|
|
1207
|
+
conversions: z2.number().int().nonnegative(),
|
|
1403
1208
|
/** Visits that converted on one of this tag's pages. */
|
|
1404
|
-
convertingSessions:
|
|
1209
|
+
convertingSessions: z2.number().int().nonnegative(),
|
|
1405
1210
|
/** Converting visits per entrance. */
|
|
1406
|
-
conversionRate:
|
|
1211
|
+
conversionRate: z2.number().min(0).max(1).nullable()
|
|
1407
1212
|
});
|
|
1408
1213
|
var ANALYTICS_EVENT_ORIGINS = ["site", "systems", "both"];
|
|
1409
|
-
var analyticsCustomEventRowSchema =
|
|
1410
|
-
eventName:
|
|
1411
|
-
events:
|
|
1412
|
-
sessions:
|
|
1413
|
-
visitors:
|
|
1214
|
+
var analyticsCustomEventRowSchema = z2.object({
|
|
1215
|
+
eventName: z2.string(),
|
|
1216
|
+
events: z2.number().int().nonnegative(),
|
|
1217
|
+
sessions: z2.number().int().nonnegative(),
|
|
1218
|
+
visitors: z2.number().int().nonnegative(),
|
|
1414
1219
|
/**
|
|
1415
1220
|
* The property keys this event carries.
|
|
1416
1221
|
*
|
|
@@ -1419,7 +1224,7 @@ var analyticsCustomEventRowSchema = z4.object({
|
|
|
1419
1224
|
* capped. This is what lets a dashboard offer the breakdown without the
|
|
1420
1225
|
* reader already knowing what the page chose to record.
|
|
1421
1226
|
*/
|
|
1422
|
-
propertyKeys:
|
|
1227
|
+
propertyKeys: z2.array(z2.string()),
|
|
1423
1228
|
/**
|
|
1424
1229
|
* What these events were worth, per currency.
|
|
1425
1230
|
*
|
|
@@ -1431,34 +1236,34 @@ var analyticsCustomEventRowSchema = z4.object({
|
|
|
1431
1236
|
* which is a score on the page's own terms rather than money. Kept rather
|
|
1432
1237
|
* than dropped, because for those events it is the only number there is.
|
|
1433
1238
|
*/
|
|
1434
|
-
money:
|
|
1435
|
-
landings:
|
|
1239
|
+
money: z2.record(z2.string(), z2.number()).default({}),
|
|
1240
|
+
landings: z2.array(z2.string()),
|
|
1436
1241
|
/** Which collector produced this name — and `both` when more than one did. */
|
|
1437
|
-
origin:
|
|
1242
|
+
origin: z2.enum(ANALYTICS_EVENT_ORIGINS)
|
|
1438
1243
|
});
|
|
1439
|
-
var analyticsEventBreakdownRowSchema =
|
|
1440
|
-
value:
|
|
1441
|
-
events:
|
|
1442
|
-
sessions:
|
|
1244
|
+
var analyticsEventBreakdownRowSchema = z2.object({
|
|
1245
|
+
value: z2.string(),
|
|
1246
|
+
events: z2.number().int().nonnegative(),
|
|
1247
|
+
sessions: z2.number().int().nonnegative(),
|
|
1443
1248
|
/** Per currency, exactly as {@link analyticsCustomEventRowSchema.money}. */
|
|
1444
|
-
money:
|
|
1249
|
+
money: z2.record(z2.string(), z2.number()).default({})
|
|
1445
1250
|
});
|
|
1446
|
-
var analyticsCustomFunnelStepSchema =
|
|
1447
|
-
stepIndex:
|
|
1448
|
-
stepName:
|
|
1449
|
-
sessions:
|
|
1251
|
+
var analyticsCustomFunnelStepSchema = z2.object({
|
|
1252
|
+
stepIndex: z2.number().int().positive(),
|
|
1253
|
+
stepName: z2.string(),
|
|
1254
|
+
sessions: z2.number().int().nonnegative(),
|
|
1450
1255
|
/** Share of the sessions that reached the previous step. Null on the first. */
|
|
1451
|
-
stepRate:
|
|
1256
|
+
stepRate: z2.number().min(0).max(1).nullable(),
|
|
1452
1257
|
/** Share of the sessions that reached step one. Null on the first. */
|
|
1453
|
-
overallRate:
|
|
1258
|
+
overallRate: z2.number().min(0).max(1).nullable()
|
|
1454
1259
|
});
|
|
1455
|
-
var analyticsDeviceRowSchema =
|
|
1260
|
+
var analyticsDeviceRowSchema = z2.object({
|
|
1456
1261
|
/** The bucket label — `Chrome 120.0`, `iOS 17.4`, `380–767`. */
|
|
1457
|
-
bucket:
|
|
1458
|
-
sessions:
|
|
1459
|
-
pageViews:
|
|
1460
|
-
convertingSessions:
|
|
1461
|
-
conversions:
|
|
1262
|
+
bucket: z2.string(),
|
|
1263
|
+
sessions: z2.number().int().nonnegative(),
|
|
1264
|
+
pageViews: z2.number().int().nonnegative(),
|
|
1265
|
+
convertingSessions: z2.number().int().nonnegative(),
|
|
1266
|
+
conversions: z2.number().int().nonnegative(),
|
|
1462
1267
|
/**
|
|
1463
1268
|
* Converting sessions over sessions.
|
|
1464
1269
|
*
|
|
@@ -1466,11 +1271,11 @@ var analyticsDeviceRowSchema = z4.object({
|
|
|
1466
1271
|
* can submit twice and a rate above 1 in a browser-comparison table reads as
|
|
1467
1272
|
* a bug in the report rather than as a visitor who filled two forms.
|
|
1468
1273
|
*/
|
|
1469
|
-
conversionRate:
|
|
1470
|
-
avgEngagementMs:
|
|
1274
|
+
conversionRate: z2.number().min(0).max(1).nullable(),
|
|
1275
|
+
avgEngagementMs: z2.number().nonnegative().nullable()
|
|
1471
1276
|
});
|
|
1472
|
-
var analyticsPageRowSchema =
|
|
1473
|
-
path:
|
|
1277
|
+
var analyticsPageRowSchema = z2.object({
|
|
1278
|
+
path: z2.string(),
|
|
1474
1279
|
/**
|
|
1475
1280
|
* The landing's own `internalId`, straight out of its `_definition.md`.
|
|
1476
1281
|
*
|
|
@@ -1479,10 +1284,10 @@ var analyticsPageRowSchema = z4.object({
|
|
|
1479
1284
|
* it has been renamed, which the path does not. Empty for a path with no
|
|
1480
1285
|
* landing behind it.
|
|
1481
1286
|
*/
|
|
1482
|
-
landingId:
|
|
1483
|
-
pageViews:
|
|
1287
|
+
landingId: z2.string(),
|
|
1288
|
+
pageViews: z2.number().int().nonnegative(),
|
|
1484
1289
|
/** Sessions that began on this page — its value as a landing page. */
|
|
1485
|
-
entrances:
|
|
1290
|
+
entrances: z2.number().int().nonnegative(),
|
|
1486
1291
|
/**
|
|
1487
1292
|
* Conversions that fired ON this page — "which page converts".
|
|
1488
1293
|
*
|
|
@@ -1491,32 +1296,32 @@ var analyticsPageRowSchema = z4.object({
|
|
|
1491
1296
|
* the shop, the checkout, a CRM a week later. Read alone this makes every
|
|
1492
1297
|
* landing page of a real funnel report zero.
|
|
1493
1298
|
*/
|
|
1494
|
-
conversions:
|
|
1299
|
+
conversions: z2.number().int().nonnegative(),
|
|
1495
1300
|
/** Visits that converted on this page at least once. */
|
|
1496
|
-
convertingSessions:
|
|
1301
|
+
convertingSessions: z2.number().int().nonnegative(),
|
|
1497
1302
|
/**
|
|
1498
1303
|
* Conversions credited to this landing page by the landing rule — on it, or
|
|
1499
1304
|
* anywhere when it was the last landing page its person viewed, up to 90
|
|
1500
1305
|
* days before. The number a landing-page table means by "conversions".
|
|
1501
1306
|
*/
|
|
1502
|
-
creditedConversions:
|
|
1307
|
+
creditedConversions: z2.number().int().nonnegative(),
|
|
1503
1308
|
/** People whose conversions are credited here. */
|
|
1504
|
-
creditedVisitors:
|
|
1309
|
+
creditedVisitors: z2.number().int().nonnegative(),
|
|
1505
1310
|
/** Credited people per entrance, 0–1. Null when nobody landed here. */
|
|
1506
|
-
conversionRate:
|
|
1507
|
-
avgEngagementMs:
|
|
1311
|
+
conversionRate: z2.number().min(0).max(1).nullable(),
|
|
1312
|
+
avgEngagementMs: z2.number().nonnegative().nullable()
|
|
1508
1313
|
});
|
|
1509
|
-
var analyticsSourceRowSchema =
|
|
1510
|
-
source:
|
|
1511
|
-
medium:
|
|
1512
|
-
sessions:
|
|
1513
|
-
conversions:
|
|
1514
|
-
conversionRate:
|
|
1314
|
+
var analyticsSourceRowSchema = z2.object({
|
|
1315
|
+
source: z2.string(),
|
|
1316
|
+
medium: z2.string(),
|
|
1317
|
+
sessions: z2.number().int().nonnegative(),
|
|
1318
|
+
conversions: z2.number().int().nonnegative(),
|
|
1319
|
+
conversionRate: z2.number().min(0).max(1).nullable()
|
|
1515
1320
|
});
|
|
1516
|
-
var analyticsCampaignRowSchema =
|
|
1517
|
-
utmSource:
|
|
1518
|
-
utmMedium:
|
|
1519
|
-
utmCampaign:
|
|
1321
|
+
var analyticsCampaignRowSchema = z2.object({
|
|
1322
|
+
utmSource: z2.string(),
|
|
1323
|
+
utmMedium: z2.string(),
|
|
1324
|
+
utmCampaign: z2.string(),
|
|
1520
1325
|
/**
|
|
1521
1326
|
* The platform a click id proves, or `""` when the visit carried none.
|
|
1522
1327
|
*
|
|
@@ -1530,46 +1335,46 @@ var analyticsCampaignRowSchema = z4.object({
|
|
|
1530
1335
|
* campaign list as "no campaign tagging on any traffic", and dropping the
|
|
1531
1336
|
* paid ones would make that fire on a perfectly tagged account.
|
|
1532
1337
|
*/
|
|
1533
|
-
clickPlatform:
|
|
1534
|
-
sessions:
|
|
1535
|
-
conversions:
|
|
1536
|
-
conversionRate:
|
|
1338
|
+
clickPlatform: z2.string(),
|
|
1339
|
+
sessions: z2.number().int().nonnegative(),
|
|
1340
|
+
conversions: z2.number().int().nonnegative(),
|
|
1341
|
+
conversionRate: z2.number().min(0).max(1).nullable()
|
|
1537
1342
|
});
|
|
1538
|
-
var analyticsRealtimeMinuteSchema =
|
|
1343
|
+
var analyticsRealtimeMinuteSchema = z2.object({
|
|
1539
1344
|
/** The minute, as an ISO instant. */
|
|
1540
|
-
minute:
|
|
1541
|
-
visitors:
|
|
1542
|
-
pageViews:
|
|
1345
|
+
minute: z2.string(),
|
|
1346
|
+
visitors: z2.number().int().nonnegative(),
|
|
1347
|
+
pageViews: z2.number().int().nonnegative()
|
|
1543
1348
|
});
|
|
1544
|
-
var analyticsRealtimePageSchema =
|
|
1545
|
-
path:
|
|
1349
|
+
var analyticsRealtimePageSchema = z2.object({
|
|
1350
|
+
path: z2.string(),
|
|
1546
1351
|
/** The landing this path belongs to; empty when no landing claims it. */
|
|
1547
|
-
landingId:
|
|
1548
|
-
visitors:
|
|
1352
|
+
landingId: z2.string(),
|
|
1353
|
+
visitors: z2.number().int().nonnegative()
|
|
1549
1354
|
});
|
|
1550
|
-
var analyticsRealtimeSchema =
|
|
1355
|
+
var analyticsRealtimeSchema = z2.object({
|
|
1551
1356
|
/** Distinct visitors with any activity inside the active window. */
|
|
1552
|
-
activeNow:
|
|
1357
|
+
activeNow: z2.number().int().nonnegative(),
|
|
1553
1358
|
/** How recently a visitor must have acted to be counted, in minutes. */
|
|
1554
|
-
activeWithinMinutes:
|
|
1555
|
-
minutes:
|
|
1556
|
-
pages:
|
|
1557
|
-
});
|
|
1558
|
-
var analyticsDimensionRowSchema =
|
|
1559
|
-
key:
|
|
1560
|
-
sessions:
|
|
1561
|
-
conversions:
|
|
1562
|
-
conversionRate:
|
|
1563
|
-
});
|
|
1564
|
-
var analyticsFunnelStepSchema =
|
|
1565
|
-
stepId:
|
|
1566
|
-
stepIndex:
|
|
1359
|
+
activeWithinMinutes: z2.number().int().positive(),
|
|
1360
|
+
minutes: z2.array(analyticsRealtimeMinuteSchema),
|
|
1361
|
+
pages: z2.array(analyticsRealtimePageSchema)
|
|
1362
|
+
});
|
|
1363
|
+
var analyticsDimensionRowSchema = z2.object({
|
|
1364
|
+
key: z2.string(),
|
|
1365
|
+
sessions: z2.number().int().nonnegative(),
|
|
1366
|
+
conversions: z2.number().int().nonnegative(),
|
|
1367
|
+
conversionRate: z2.number().min(0).max(1).nullable()
|
|
1368
|
+
});
|
|
1369
|
+
var analyticsFunnelStepSchema = z2.object({
|
|
1370
|
+
stepId: z2.string(),
|
|
1371
|
+
stepIndex: z2.number().int().nonnegative(),
|
|
1567
1372
|
/** Visits that moved forward into this step. Never events — see `visits`. */
|
|
1568
|
-
views:
|
|
1373
|
+
views: z2.number().int().nonnegative(),
|
|
1569
1374
|
/** Visits that finished this step and moved on. */
|
|
1570
|
-
completions:
|
|
1375
|
+
completions: z2.number().int().nonnegative(),
|
|
1571
1376
|
/** Share of viewers who did not complete this step, 0–1. */
|
|
1572
|
-
dropRate:
|
|
1377
|
+
dropRate: z2.number().min(0).max(1).nullable(),
|
|
1573
1378
|
/**
|
|
1574
1379
|
* Visits that converted AT this step — the node kind's own outcome trigger
|
|
1575
1380
|
* fired here, or the Form was submitted here.
|
|
@@ -1578,7 +1383,7 @@ var analyticsFunnelStepSchema = z4.object({
|
|
|
1578
1383
|
* conversion, and knowing which step owns it is what stops a drop-off chart
|
|
1579
1384
|
* treating the booking widget's "profile viewed" as a funnel stage.
|
|
1580
1385
|
*/
|
|
1581
|
-
convertedSessions:
|
|
1386
|
+
convertedSessions: z2.number().int().nonnegative(),
|
|
1582
1387
|
/**
|
|
1583
1388
|
* This step is where the Form ends — a confirmation screen, not a loss.
|
|
1584
1389
|
*
|
|
@@ -1586,10 +1391,10 @@ var analyticsFunnelStepSchema = z4.object({
|
|
|
1586
1391
|
* `dropRate === null`, which is also how a step nobody viewed arrives, so a
|
|
1587
1392
|
* converting link node in the middle of a Form was labelled its ending.
|
|
1588
1393
|
*/
|
|
1589
|
-
isEnding:
|
|
1394
|
+
isEnding: z2.boolean()
|
|
1590
1395
|
});
|
|
1591
|
-
var analyticsFunnelSchema =
|
|
1592
|
-
flowSlug:
|
|
1396
|
+
var analyticsFunnelSchema = z2.object({
|
|
1397
|
+
flowSlug: z2.string(),
|
|
1593
1398
|
/**
|
|
1594
1399
|
* Visits that saw the Form at all — the denominator for every share here.
|
|
1595
1400
|
*
|
|
@@ -1604,15 +1409,15 @@ var analyticsFunnelSchema = z4.object({
|
|
|
1604
1409
|
* a Form four people had opened reported one step reached fifteen times and
|
|
1605
1410
|
* fourteen people lost.
|
|
1606
1411
|
*/
|
|
1607
|
-
visits:
|
|
1412
|
+
visits: z2.number().int().nonnegative(),
|
|
1608
1413
|
/** Visits that interacted with the Form at all — typed, picked, or advanced. */
|
|
1609
|
-
starts:
|
|
1610
|
-
submits:
|
|
1414
|
+
starts: z2.number().int().nonnegative(),
|
|
1415
|
+
submits: z2.number().int().nonnegative(),
|
|
1611
1416
|
/** Conversions per visit that opened the Form, 0–1. */
|
|
1612
|
-
completionRate:
|
|
1417
|
+
completionRate: z2.number().min(0).max(1).nullable(),
|
|
1613
1418
|
/** The step losing the most people. The single most useful field here. */
|
|
1614
1419
|
worstStep: analyticsFunnelStepSchema.nullable(),
|
|
1615
|
-
steps:
|
|
1420
|
+
steps: z2.array(analyticsFunnelStepSchema),
|
|
1616
1421
|
/**
|
|
1617
1422
|
* Visits that converted, counted once each at whichever node did it.
|
|
1618
1423
|
*
|
|
@@ -1621,33 +1426,33 @@ var analyticsFunnelSchema = z4.object({
|
|
|
1621
1426
|
* mid-flow Calendly node reports zero submits and every one of its real
|
|
1622
1427
|
* bookings here.
|
|
1623
1428
|
*/
|
|
1624
|
-
convertedSessions:
|
|
1429
|
+
convertedSessions: z2.number().int().nonnegative()
|
|
1625
1430
|
});
|
|
1626
|
-
var analyticsPaidRowSchema =
|
|
1627
|
-
source:
|
|
1628
|
-
medium:
|
|
1629
|
-
campaign:
|
|
1630
|
-
content:
|
|
1631
|
-
term:
|
|
1431
|
+
var analyticsPaidRowSchema = z2.object({
|
|
1432
|
+
source: z2.string(),
|
|
1433
|
+
medium: z2.string(),
|
|
1434
|
+
campaign: z2.string(),
|
|
1435
|
+
content: z2.string(),
|
|
1436
|
+
term: z2.string(),
|
|
1632
1437
|
/** `google` | `meta` | `tiktok` | `x` | `linkedin` | `microsoft` | `""`. */
|
|
1633
|
-
clickPlatform:
|
|
1634
|
-
sessions:
|
|
1635
|
-
convertingSessions:
|
|
1636
|
-
conversions:
|
|
1438
|
+
clickPlatform: z2.string(),
|
|
1439
|
+
sessions: z2.number().int().nonnegative(),
|
|
1440
|
+
convertingSessions: z2.number().int().nonnegative(),
|
|
1441
|
+
conversions: z2.number().int().nonnegative(),
|
|
1637
1442
|
/** Leads whose server-side delivery reported success. */
|
|
1638
|
-
delivered:
|
|
1443
|
+
delivered: z2.number().int().nonnegative(),
|
|
1639
1444
|
/** Leads whose delivery reported failure. Non-zero here is a broken integration. */
|
|
1640
|
-
failedDeliveries:
|
|
1445
|
+
failedDeliveries: z2.number().int().nonnegative(),
|
|
1641
1446
|
/** Distinct people, across devices — only countable where visitors identified themselves. */
|
|
1642
|
-
identifiedPeople:
|
|
1447
|
+
identifiedPeople: z2.number().int().nonnegative(),
|
|
1643
1448
|
/** Converting sessions per session, 0–1. */
|
|
1644
|
-
conversionRate:
|
|
1449
|
+
conversionRate: z2.number().min(0).max(1).nullable(),
|
|
1645
1450
|
/** Delivered leads per conversion, 0–1. Below 1 means leads are being lost after submit. */
|
|
1646
|
-
deliveryRate:
|
|
1451
|
+
deliveryRate: z2.number().min(0).max(1).nullable()
|
|
1647
1452
|
});
|
|
1648
|
-
var analyticsDeliveryRowSchema =
|
|
1649
|
-
eventId:
|
|
1650
|
-
submittedAt:
|
|
1453
|
+
var analyticsDeliveryRowSchema = z2.object({
|
|
1454
|
+
eventId: z2.string(),
|
|
1455
|
+
submittedAt: z2.string(),
|
|
1651
1456
|
/**
|
|
1652
1457
|
* The visit the submission was made in, so a lead can be opened as a story.
|
|
1653
1458
|
*
|
|
@@ -1656,18 +1461,18 @@ var analyticsDeliveryRowSchema = z4.object({
|
|
|
1656
1461
|
* which ad brought them, what they read first, how long they took — are all
|
|
1657
1462
|
* on the other side of this one join.
|
|
1658
1463
|
*/
|
|
1659
|
-
sessionId:
|
|
1464
|
+
sessionId: z2.string(),
|
|
1660
1465
|
/** Lowercase hex digest of who submitted, when the page could identify them. */
|
|
1661
|
-
identityHash:
|
|
1662
|
-
flowSlug:
|
|
1663
|
-
stepId:
|
|
1664
|
-
landingId:
|
|
1665
|
-
destinations:
|
|
1666
|
-
dispatched:
|
|
1667
|
-
succeeded:
|
|
1668
|
-
failed:
|
|
1466
|
+
identityHash: z2.string(),
|
|
1467
|
+
flowSlug: z2.string(),
|
|
1468
|
+
stepId: z2.string(),
|
|
1469
|
+
landingId: z2.string(),
|
|
1470
|
+
destinations: z2.array(z2.string()),
|
|
1471
|
+
dispatched: z2.number().int().nonnegative(),
|
|
1472
|
+
succeeded: z2.number().int().nonnegative(),
|
|
1473
|
+
failed: z2.number().int().nonnegative(),
|
|
1669
1474
|
/** Dispatched and never settled. Distinguishing this from failed is "wait" vs "act". */
|
|
1670
|
-
pending:
|
|
1475
|
+
pending: z2.number().int().nonnegative(),
|
|
1671
1476
|
/**
|
|
1672
1477
|
* The ids the destinations gave back.
|
|
1673
1478
|
*
|
|
@@ -1675,57 +1480,57 @@ var analyticsDeliveryRowSchema = z4.object({
|
|
|
1675
1480
|
* and previously invisible failure: the integration accepted the call and
|
|
1676
1481
|
* dropped the record.
|
|
1677
1482
|
*/
|
|
1678
|
-
providerRefs:
|
|
1679
|
-
sampleError:
|
|
1483
|
+
providerRefs: z2.array(z2.string()),
|
|
1484
|
+
sampleError: z2.string()
|
|
1680
1485
|
});
|
|
1681
|
-
var analyticsTriggerRowSchema =
|
|
1682
|
-
flowSlug:
|
|
1486
|
+
var analyticsTriggerRowSchema = z2.object({
|
|
1487
|
+
flowSlug: z2.string(),
|
|
1683
1488
|
/** `link`, `customForm`, `iframe`, `hubspotMeeting`, … */
|
|
1684
|
-
nodeType:
|
|
1489
|
+
nodeType: z2.string(),
|
|
1685
1490
|
/** The trigger, verbatim: `link.onClick`, `iframe.checkout_completed`. */
|
|
1686
|
-
triggerId:
|
|
1687
|
-
fires:
|
|
1688
|
-
sessions:
|
|
1491
|
+
triggerId: z2.string(),
|
|
1492
|
+
fires: z2.number().int().nonnegative(),
|
|
1493
|
+
sessions: z2.number().int().nonnegative(),
|
|
1689
1494
|
/** How many of those fires produced a side effect. Often zero, on purpose. */
|
|
1690
|
-
sideEffectsFired:
|
|
1495
|
+
sideEffectsFired: z2.number().int().nonnegative()
|
|
1691
1496
|
});
|
|
1692
|
-
var analyticsReleaseRowSchema =
|
|
1497
|
+
var analyticsReleaseRowSchema = z2.object({
|
|
1693
1498
|
/** The commit the build came from. */
|
|
1694
|
-
release:
|
|
1695
|
-
firstSeen:
|
|
1696
|
-
lastSeen:
|
|
1697
|
-
sessions:
|
|
1698
|
-
pageViews:
|
|
1699
|
-
conversions:
|
|
1499
|
+
release: z2.string(),
|
|
1500
|
+
firstSeen: z2.string(),
|
|
1501
|
+
lastSeen: z2.string(),
|
|
1502
|
+
sessions: z2.number().int().nonnegative(),
|
|
1503
|
+
pageViews: z2.number().int().nonnegative(),
|
|
1504
|
+
conversions: z2.number().int().nonnegative(),
|
|
1700
1505
|
/** Visits that converted on this build at least once. */
|
|
1701
|
-
convertingSessions:
|
|
1506
|
+
convertingSessions: z2.number().int().nonnegative(),
|
|
1702
1507
|
/** Converting visits per session, 0–1. Null below a usable sample. */
|
|
1703
|
-
conversionRate:
|
|
1508
|
+
conversionRate: z2.number().min(0).max(1).nullable()
|
|
1704
1509
|
});
|
|
1705
|
-
var analyticsGeoRowSchema =
|
|
1510
|
+
var analyticsGeoRowSchema = z2.object({
|
|
1706
1511
|
/** The place itself, at whatever grain was asked for. */
|
|
1707
|
-
place:
|
|
1512
|
+
place: z2.string(),
|
|
1708
1513
|
/** Always carried: a postcode without its country is ambiguous, a city twice over. */
|
|
1709
|
-
country:
|
|
1710
|
-
region:
|
|
1711
|
-
sessions:
|
|
1712
|
-
conversions:
|
|
1514
|
+
country: z2.string(),
|
|
1515
|
+
region: z2.string(),
|
|
1516
|
+
sessions: z2.number().int().nonnegative(),
|
|
1517
|
+
conversions: z2.number().int().nonnegative(),
|
|
1713
1518
|
/** Conversions per session, 0–1. Null below a usable sample. */
|
|
1714
|
-
conversionRate:
|
|
1519
|
+
conversionRate: z2.number().min(0).max(1).nullable(),
|
|
1715
1520
|
/** People rather than browsers, where the visit identified itself. */
|
|
1716
|
-
identifiedPeople:
|
|
1521
|
+
identifiedPeople: z2.number().int().nonnegative()
|
|
1717
1522
|
});
|
|
1718
|
-
var analyticsBotRowSchema =
|
|
1523
|
+
var analyticsBotRowSchema = z2.object({
|
|
1719
1524
|
/** The crawler's name, or `unidentified` for a machine we could not name. */
|
|
1720
|
-
bot:
|
|
1525
|
+
bot: z2.string(),
|
|
1721
1526
|
/** `search` | `ai` | `social` | `seo` | `monitoring` | `tool` | `automation`. */
|
|
1722
|
-
category:
|
|
1723
|
-
hits:
|
|
1724
|
-
pages:
|
|
1725
|
-
lastSeen:
|
|
1726
|
-
samplePaths:
|
|
1527
|
+
category: z2.string(),
|
|
1528
|
+
hits: z2.number().int().nonnegative(),
|
|
1529
|
+
pages: z2.number().int().nonnegative(),
|
|
1530
|
+
lastSeen: z2.string(),
|
|
1531
|
+
samplePaths: z2.array(z2.string())
|
|
1727
1532
|
});
|
|
1728
|
-
var analyticsWarningSchema =
|
|
1533
|
+
var analyticsWarningSchema = z2.object({
|
|
1729
1534
|
/**
|
|
1730
1535
|
* `AD_ROLE_UNMAPPED` is the one that reports a *question* rather than the
|
|
1731
1536
|
* data. A role resolves to the parameter names that carry it, and when a
|
|
@@ -1734,71 +1539,71 @@ var analyticsWarningSchema = z4.object({
|
|
|
1734
1539
|
* the whole report. Zero is a far more expensive conclusion than "nobody has
|
|
1735
1540
|
* said which parameter that is", so the narrowing is dropped and this says so.
|
|
1736
1541
|
*/
|
|
1737
|
-
code:
|
|
1738
|
-
message:
|
|
1542
|
+
code: z2.enum(["LOW_SAMPLE", "NO_DATA", "BEYOND_RETENTION", "AD_ROLE_UNMAPPED"]),
|
|
1543
|
+
message: z2.string()
|
|
1739
1544
|
});
|
|
1740
|
-
var analyticsFlowSummarySchema =
|
|
1741
|
-
flowSlug:
|
|
1742
|
-
sessions:
|
|
1743
|
-
starts:
|
|
1744
|
-
convertedSessions:
|
|
1745
|
-
submits:
|
|
1746
|
-
stepViews:
|
|
1545
|
+
var analyticsFlowSummarySchema = z2.object({
|
|
1546
|
+
flowSlug: z2.string(),
|
|
1547
|
+
sessions: z2.number().int().nonnegative(),
|
|
1548
|
+
starts: z2.number().int().nonnegative(),
|
|
1549
|
+
convertedSessions: z2.number().int().nonnegative(),
|
|
1550
|
+
submits: z2.number().int().nonnegative(),
|
|
1551
|
+
stepViews: z2.number().int().nonnegative(),
|
|
1747
1552
|
/** Distinct steps anyone reached, across all visits. */
|
|
1748
|
-
stepsSeen:
|
|
1749
|
-
deepestStepIndex:
|
|
1553
|
+
stepsSeen: z2.number().int().nonnegative(),
|
|
1554
|
+
deepestStepIndex: z2.number().int().nonnegative(),
|
|
1750
1555
|
/** Steps reached per visit, averaged — "how much of this Form do people read". */
|
|
1751
|
-
avgStepsReached:
|
|
1556
|
+
avgStepsReached: z2.number().nonnegative(),
|
|
1752
1557
|
/** Conversions per visit that started, 0–1. */
|
|
1753
|
-
conversionRate:
|
|
1558
|
+
conversionRate: z2.number().min(0).max(1).nullable(),
|
|
1754
1559
|
/** Which node ids produced the conversions. Usually one; two means two offers. */
|
|
1755
|
-
conversionSteps:
|
|
1560
|
+
conversionSteps: z2.array(z2.string()),
|
|
1756
1561
|
/** And by what — `calendlyEvent.eventScheduled`, `customForm.onFormSubmitted`. */
|
|
1757
|
-
conversionTriggers:
|
|
1758
|
-
conversionNodeTypes:
|
|
1759
|
-
lastSeen:
|
|
1562
|
+
conversionTriggers: z2.array(z2.string()),
|
|
1563
|
+
conversionNodeTypes: z2.array(z2.string()),
|
|
1564
|
+
lastSeen: z2.string()
|
|
1760
1565
|
});
|
|
1761
|
-
var analyticsFlowEdgeSchema =
|
|
1762
|
-
flowSlug:
|
|
1763
|
-
fromStep:
|
|
1764
|
-
toStep:
|
|
1765
|
-
sessions:
|
|
1566
|
+
var analyticsFlowEdgeSchema = z2.object({
|
|
1567
|
+
flowSlug: z2.string(),
|
|
1568
|
+
fromStep: z2.string(),
|
|
1569
|
+
toStep: z2.string(),
|
|
1570
|
+
sessions: z2.number().int().nonnegative()
|
|
1766
1571
|
});
|
|
1767
|
-
var analyticsConversionRowSchema =
|
|
1572
|
+
var analyticsConversionRowSchema = z2.object({
|
|
1768
1573
|
/** What a person calls this outcome. */
|
|
1769
|
-
name:
|
|
1574
|
+
name: z2.string(),
|
|
1770
1575
|
/** Every event counted under this name. One entry unless the name is shared. */
|
|
1771
|
-
eventKeys:
|
|
1576
|
+
eventKeys: z2.array(z2.string()),
|
|
1772
1577
|
/**
|
|
1773
1578
|
* `once_per_visit` | `every_time` — how repeats inside one visit are counted.
|
|
1774
1579
|
*
|
|
1775
1580
|
* `mixed` when a shared name spans both, which is a real state and an editing
|
|
1776
1581
|
* accident; saying so is what makes it findable.
|
|
1777
1582
|
*/
|
|
1778
|
-
countMode:
|
|
1583
|
+
countMode: z2.string(),
|
|
1779
1584
|
/** Counted the way each definition asked to be counted, and credited to a landing. */
|
|
1780
|
-
conversions:
|
|
1585
|
+
conversions: z2.number(),
|
|
1781
1586
|
/**
|
|
1782
1587
|
* Times it happened that no landing earned: by people none of the company's
|
|
1783
1588
|
* pages saw, within 90 days. Zero under a landing or an ad scope, where the
|
|
1784
1589
|
* gap would mean something else. Absent on a row built before it existed.
|
|
1785
1590
|
*/
|
|
1786
|
-
unplaced:
|
|
1591
|
+
unplaced: z2.number().default(0),
|
|
1787
1592
|
/** Distinct visits that produced it, never mode-adjusted. The gap between the two is the repeat behaviour. */
|
|
1788
|
-
convertingVisits:
|
|
1593
|
+
convertingVisits: z2.number(),
|
|
1789
1594
|
/** Null when it has never fired. */
|
|
1790
|
-
lastSeen:
|
|
1595
|
+
lastSeen: z2.string().nullable(),
|
|
1791
1596
|
/**
|
|
1792
1597
|
* The doors its events came in by in the window, in
|
|
1793
1598
|
* {@link ANALYTICS_EVENT_DOORS} order. Empty when it has not fired.
|
|
1794
1599
|
*/
|
|
1795
|
-
doors:
|
|
1600
|
+
doors: z2.array(z2.enum(ANALYTICS_EVENT_DOORS)).default([]),
|
|
1796
1601
|
/** Proposed in this chat: counted from when it is published, so every report reads it as nothing until then. */
|
|
1797
|
-
staged:
|
|
1602
|
+
staged: z2.boolean().optional()
|
|
1798
1603
|
});
|
|
1799
|
-
var analyticsEventCatalogRowSchema =
|
|
1604
|
+
var analyticsEventCatalogRowSchema = z2.object({
|
|
1800
1605
|
/** `form:…` | `submit:…` | `page:…` | `exit:…` — parse with `parseEventKey`. */
|
|
1801
|
-
eventKey:
|
|
1606
|
+
eventKey: z2.string(),
|
|
1802
1607
|
/**
|
|
1803
1608
|
* Which collector produced this key — and `both` when more than one did.
|
|
1804
1609
|
*
|
|
@@ -1808,25 +1613,25 @@ var analyticsEventCatalogRowSchema = z4.object({
|
|
|
1808
1613
|
* populations at any grain, but nothing downstream has to learn a second
|
|
1809
1614
|
* vocabulary to count one.
|
|
1810
1615
|
*/
|
|
1811
|
-
origin:
|
|
1812
|
-
events:
|
|
1813
|
-
sessions:
|
|
1616
|
+
origin: z2.enum(ANALYTICS_EVENT_ORIGINS),
|
|
1617
|
+
events: z2.number(),
|
|
1618
|
+
sessions: z2.number(),
|
|
1814
1619
|
/** The Form node's kind, for a `form:` key. Empty otherwise. */
|
|
1815
|
-
nodeType:
|
|
1620
|
+
nodeType: z2.string(),
|
|
1816
1621
|
/** The Form this happened in, for a `form:` or `submit:` key. Empty otherwise. */
|
|
1817
|
-
flowSlug:
|
|
1622
|
+
flowSlug: z2.string(),
|
|
1818
1623
|
/** Null when it has never fired — only possible for a row we already count. */
|
|
1819
|
-
lastSeen:
|
|
1624
|
+
lastSeen: z2.string().nullable(),
|
|
1820
1625
|
/** Already counted as a conversion. Shown, never hidden: a row that vanished on being counted reads as a bug. */
|
|
1821
|
-
isCounted:
|
|
1626
|
+
isCounted: z2.boolean(),
|
|
1822
1627
|
/** The name it is counted under, when it is. */
|
|
1823
|
-
countedAs:
|
|
1628
|
+
countedAs: z2.string(),
|
|
1824
1629
|
/**
|
|
1825
1630
|
* The doors on Sources this key's events came through, by name — the
|
|
1826
1631
|
* `baker_source` each event carries. Empty for a key nothing on Sources
|
|
1827
1632
|
* sent; more than one when two doors used one name.
|
|
1828
1633
|
*/
|
|
1829
|
-
sources:
|
|
1634
|
+
sources: z2.array(z2.string()),
|
|
1830
1635
|
/**
|
|
1831
1636
|
* The doors this key's events came in by, in {@link ANALYTICS_EVENT_DOORS}
|
|
1832
1637
|
* order, each with its own volume — only the doors it actually used.
|
|
@@ -1835,29 +1640,29 @@ var analyticsEventCatalogRowSchema = z4.object({
|
|
|
1835
1640
|
* question every picker is read to answer. Defaulted, so a store that
|
|
1836
1641
|
* predates the column parses as "no door known" rather than failing.
|
|
1837
1642
|
*/
|
|
1838
|
-
doors:
|
|
1643
|
+
doors: z2.array(z2.object({ door: z2.enum(ANALYTICS_EVENT_DOORS), events: z2.number(), sessions: z2.number() })).default([])
|
|
1839
1644
|
});
|
|
1840
|
-
var analyticsAdDimensionRowSchema =
|
|
1645
|
+
var analyticsAdDimensionRowSchema = z2.object({
|
|
1841
1646
|
/** The dimension's value. Empty means "arrived carrying none of these". */
|
|
1842
|
-
value:
|
|
1647
|
+
value: z2.string(),
|
|
1843
1648
|
/** Which platform stamped the click, from the click id rather than a label. */
|
|
1844
|
-
platform:
|
|
1845
|
-
sessions:
|
|
1846
|
-
convertingSessions:
|
|
1847
|
-
conversions:
|
|
1848
|
-
bouncedSessions:
|
|
1849
|
-
identifiedPeople:
|
|
1850
|
-
pageViews:
|
|
1851
|
-
engagementMs:
|
|
1649
|
+
platform: z2.string(),
|
|
1650
|
+
sessions: z2.number(),
|
|
1651
|
+
convertingSessions: z2.number(),
|
|
1652
|
+
conversions: z2.number(),
|
|
1653
|
+
bouncedSessions: z2.number(),
|
|
1654
|
+
identifiedPeople: z2.number(),
|
|
1655
|
+
pageViews: z2.number(),
|
|
1656
|
+
engagementMs: z2.number(),
|
|
1852
1657
|
/** Conversions per session, or null when nothing arrived. */
|
|
1853
|
-
conversionRate:
|
|
1658
|
+
conversionRate: z2.number().nullable(),
|
|
1854
1659
|
/** Bounces per session, or null when nothing arrived. */
|
|
1855
|
-
bounceRate:
|
|
1660
|
+
bounceRate: z2.number().nullable()
|
|
1856
1661
|
});
|
|
1857
|
-
var analyticsAdParamRowSchema =
|
|
1858
|
-
name:
|
|
1662
|
+
var analyticsAdParamRowSchema = z2.object({
|
|
1663
|
+
name: z2.string(),
|
|
1859
1664
|
/** Whether the value is stored, or only the fact that the name appeared. */
|
|
1860
|
-
captured:
|
|
1665
|
+
captured: z2.boolean(),
|
|
1861
1666
|
/** The role in force for the platform asked about, built-in or configured. */
|
|
1862
1667
|
role: adParamRoleSchema.optional(),
|
|
1863
1668
|
/**
|
|
@@ -1866,7 +1671,7 @@ var analyticsAdParamRowSchema = z4.object({
|
|
|
1866
1671
|
* The difference between a row that can be reset to a sensible default and
|
|
1867
1672
|
* one where clearing it means "nobody has said".
|
|
1868
1673
|
*/
|
|
1869
|
-
configured:
|
|
1674
|
+
configured: z2.boolean(),
|
|
1870
1675
|
/**
|
|
1871
1676
|
* Visits carrying this parameter **that arrived from the platform asked
|
|
1872
1677
|
* about**, not visits carrying it anywhere.
|
|
@@ -1879,11 +1684,11 @@ var analyticsAdParamRowSchema = z4.object({
|
|
|
1879
1684
|
* parameter in Meta's vocabulary and then wonder why no report ever used it.
|
|
1880
1685
|
* The count belongs to the platform or it is not a count of anything.
|
|
1881
1686
|
*/
|
|
1882
|
-
sessions:
|
|
1883
|
-
events:
|
|
1687
|
+
sessions: z2.number(),
|
|
1688
|
+
events: z2.number(),
|
|
1884
1689
|
/** Up to five distinct values. Always empty for an uncaptured parameter. */
|
|
1885
|
-
sampleValues:
|
|
1886
|
-
lastSeen:
|
|
1690
|
+
sampleValues: z2.array(z2.string()),
|
|
1691
|
+
lastSeen: z2.string().optional(),
|
|
1887
1692
|
/**
|
|
1888
1693
|
* True when this row is here because somebody configured it, not because it
|
|
1889
1694
|
* arrived.
|
|
@@ -1895,31 +1700,31 @@ var analyticsAdParamRowSchema = z4.object({
|
|
|
1895
1700
|
* values, and says so rather than reading as a parameter that stopped
|
|
1896
1701
|
* arriving.
|
|
1897
1702
|
*/
|
|
1898
|
-
awaitingTraffic:
|
|
1703
|
+
awaitingTraffic: z2.boolean().optional()
|
|
1899
1704
|
});
|
|
1900
|
-
var analyticsFlowDestinationsSchema =
|
|
1901
|
-
flowSlug:
|
|
1705
|
+
var analyticsFlowDestinationsSchema = z2.object({
|
|
1706
|
+
flowSlug: z2.string(),
|
|
1902
1707
|
/** Destination types seen — `meta`, `httpWebhook`, `hubspotForm`. */
|
|
1903
|
-
destinations:
|
|
1904
|
-
lastSeen:
|
|
1708
|
+
destinations: z2.array(z2.string()),
|
|
1709
|
+
lastSeen: z2.string().optional()
|
|
1905
1710
|
});
|
|
1906
|
-
var analyticsAdPlatformTrafficSchema =
|
|
1907
|
-
platform:
|
|
1908
|
-
sessions:
|
|
1909
|
-
conversions:
|
|
1711
|
+
var analyticsAdPlatformTrafficSchema = z2.object({
|
|
1712
|
+
platform: z2.string(),
|
|
1713
|
+
sessions: z2.number(),
|
|
1714
|
+
conversions: z2.number(),
|
|
1910
1715
|
/** How many of those visits carried any campaign parameter at all. */
|
|
1911
|
-
taggedSessions:
|
|
1716
|
+
taggedSessions: z2.number()
|
|
1912
1717
|
});
|
|
1913
|
-
var analyticsPageInfoSchema =
|
|
1718
|
+
var analyticsPageInfoSchema = z2.object({
|
|
1914
1719
|
/** Which field of the response was paged. */
|
|
1915
|
-
block:
|
|
1916
|
-
page:
|
|
1917
|
-
pageSize:
|
|
1918
|
-
returned:
|
|
1919
|
-
hasMore:
|
|
1720
|
+
block: z2.enum(["visitors", "submissions", "deliveries", "stream"]),
|
|
1721
|
+
page: z2.number().int(),
|
|
1722
|
+
pageSize: z2.number().int(),
|
|
1723
|
+
returned: z2.number().int(),
|
|
1724
|
+
hasMore: z2.boolean()
|
|
1920
1725
|
});
|
|
1921
|
-
var analyticsTimelineRowSchema =
|
|
1922
|
-
timestamp:
|
|
1726
|
+
var analyticsTimelineRowSchema = z2.object({
|
|
1727
|
+
timestamp: z2.string(),
|
|
1923
1728
|
/**
|
|
1924
1729
|
* The visit this event belongs to, and the browser that made it.
|
|
1925
1730
|
*
|
|
@@ -1929,8 +1734,8 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
1929
1734
|
* visit's, so a row has to say who it was about before a reader can get from
|
|
1930
1735
|
* it to the person. On a replay both are constant and simply confirm it.
|
|
1931
1736
|
*/
|
|
1932
|
-
sessionId:
|
|
1933
|
-
anonId:
|
|
1737
|
+
sessionId: z2.string(),
|
|
1738
|
+
anonId: z2.string(),
|
|
1934
1739
|
/**
|
|
1935
1740
|
* Where the producer put this event in its own order, from 1. `0` means it
|
|
1936
1741
|
* did not number this one.
|
|
@@ -1941,13 +1746,13 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
1941
1746
|
* coming into view routinely share one — and sorted on the timestamp alone
|
|
1942
1747
|
* they came back in an order that matched nothing that happened.
|
|
1943
1748
|
*/
|
|
1944
|
-
eventSeq:
|
|
1749
|
+
eventSeq: z2.number().int().nonnegative(),
|
|
1945
1750
|
/** This event's identity, so two rows can be said to be the same event. */
|
|
1946
|
-
eventUid:
|
|
1751
|
+
eventUid: z2.string(),
|
|
1947
1752
|
/** `page_view`, `form_step_view`, `side_effect_dispatched`, … */
|
|
1948
|
-
eventType:
|
|
1753
|
+
eventType: z2.string(),
|
|
1949
1754
|
/** `edge`, `beacon`, `server` — where the row was written from. */
|
|
1950
|
-
source:
|
|
1755
|
+
source: z2.string(),
|
|
1951
1756
|
/**
|
|
1952
1757
|
* `baker`, `external`, `export` — where the page was, which `source` does
|
|
1953
1758
|
* not say. The two together are what decide the row's door; see
|
|
@@ -1958,26 +1763,26 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
1958
1763
|
* that has to mean "Baker's, as everything was then" rather than fail the
|
|
1959
1764
|
* whole row's parse.
|
|
1960
1765
|
*/
|
|
1961
|
-
deployment:
|
|
1962
|
-
environment:
|
|
1766
|
+
deployment: z2.string().default(""),
|
|
1767
|
+
environment: z2.string(),
|
|
1963
1768
|
/** The build the page was published from. */
|
|
1964
|
-
release:
|
|
1965
|
-
path:
|
|
1966
|
-
host:
|
|
1967
|
-
landingId:
|
|
1968
|
-
flowSlug:
|
|
1969
|
-
stepId:
|
|
1970
|
-
stepIndex:
|
|
1971
|
-
nodeType:
|
|
1972
|
-
triggerId:
|
|
1769
|
+
release: z2.string(),
|
|
1770
|
+
path: z2.string(),
|
|
1771
|
+
host: z2.string(),
|
|
1772
|
+
landingId: z2.string(),
|
|
1773
|
+
flowSlug: z2.string(),
|
|
1774
|
+
stepId: z2.string(),
|
|
1775
|
+
stepIndex: z2.number().int().nonnegative(),
|
|
1776
|
+
nodeType: z2.string(),
|
|
1777
|
+
triggerId: z2.string(),
|
|
1973
1778
|
/** A page-defined event's own name, when this row is one. */
|
|
1974
|
-
eventName:
|
|
1779
|
+
eventName: z2.string(),
|
|
1975
1780
|
/** Whatever the page attached to a custom event. Strings only, by design. */
|
|
1976
|
-
properties:
|
|
1781
|
+
properties: z2.record(z2.string(), z2.string()),
|
|
1977
1782
|
/** Where an outbound click or a link node was going, in full. */
|
|
1978
|
-
targetUrl:
|
|
1783
|
+
targetUrl: z2.string(),
|
|
1979
1784
|
/** A number the page reported alongside the event. */
|
|
1980
|
-
value:
|
|
1785
|
+
value: z2.number(),
|
|
1981
1786
|
/**
|
|
1982
1787
|
* The currency that number is in, when it has one.
|
|
1983
1788
|
*
|
|
@@ -1985,9 +1790,9 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
1985
1790
|
* terms, a CRM reports a deal in euros — and without it the replay prints a
|
|
1986
1791
|
* bare `4200.5` beside a closed deal, which is a number nobody can act on.
|
|
1987
1792
|
*/
|
|
1988
|
-
valueCurrency:
|
|
1793
|
+
valueCurrency: z2.string().default(""),
|
|
1989
1794
|
/** The visitor's digest, when they had identified themselves by this point. */
|
|
1990
|
-
identityHash:
|
|
1795
|
+
identityHash: z2.string(),
|
|
1991
1796
|
/**
|
|
1992
1797
|
* The browser to attribute this row to, once the identity has been resolved.
|
|
1993
1798
|
*
|
|
@@ -2006,7 +1811,7 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
2006
1811
|
* session replay deliberately does not resolve, because an event that
|
|
2007
1812
|
* happened during no visit must not be placed inside one.
|
|
2008
1813
|
*/
|
|
2009
|
-
personAnonId:
|
|
1814
|
+
personAnonId: z2.string().default(""),
|
|
2010
1815
|
/**
|
|
2011
1816
|
* What this row knows the person by, when it does not know their browser:
|
|
2012
1817
|
* `email` | `phone` | `external` | `click` | `cookie`, or empty.
|
|
@@ -2016,7 +1821,7 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
2016
1821
|
* of Meta's cookies — is not a row about nobody, and rendering it as one is
|
|
2017
1822
|
* what made the server-sent half of the feed look unattached to the rest.
|
|
2018
1823
|
*/
|
|
2019
|
-
knownBy:
|
|
1824
|
+
knownBy: z2.string().default(""),
|
|
2020
1825
|
/**
|
|
2021
1826
|
* What this row counts as under the company's own conversion definitions, or
|
|
2022
1827
|
* empty when it counts as nothing.
|
|
@@ -2029,12 +1834,12 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
2029
1834
|
*
|
|
2030
1835
|
* Only `event_stream` fills it; empty everywhere else.
|
|
2031
1836
|
*/
|
|
2032
|
-
conversionKey:
|
|
1837
|
+
conversionKey: z2.string().default(""),
|
|
2033
1838
|
/**
|
|
2034
1839
|
* Which lines of a people search this row belongs to, by position in
|
|
2035
1840
|
* `peopleSearch`. Empty when nobody was searched for.
|
|
2036
1841
|
*/
|
|
2037
|
-
personTerms:
|
|
1842
|
+
personTerms: z2.array(z2.number()).optional(),
|
|
2038
1843
|
/**
|
|
2039
1844
|
* `email` | `phone` — which of the two they gave.
|
|
2040
1845
|
*
|
|
@@ -2042,7 +1847,7 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
2042
1847
|
* produces two `identify` rows in the same millisecond, and without the kind
|
|
2043
1848
|
* a replay renders the same sentence twice and reads as a duplicated event.
|
|
2044
1849
|
*/
|
|
2045
|
-
identityKind:
|
|
1850
|
+
identityKind: z2.string(),
|
|
2046
1851
|
/**
|
|
2047
1852
|
* The `user_data` block this event carried, exactly as it arrived.
|
|
2048
1853
|
*
|
|
@@ -2058,12 +1863,12 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
2058
1863
|
* overall. That is how a sender finds the field they forgot to map: the
|
|
2059
1864
|
* person has a postcode, and this event does not.
|
|
2060
1865
|
*/
|
|
2061
|
-
userData:
|
|
2062
|
-
sideEffectType:
|
|
2063
|
-
sideEffectName:
|
|
2064
|
-
sideEffectId:
|
|
2065
|
-
tagId:
|
|
2066
|
-
messageId:
|
|
1866
|
+
userData: z2.record(z2.string(), z2.string()).default({}),
|
|
1867
|
+
sideEffectType: z2.string(),
|
|
1868
|
+
sideEffectName: z2.string(),
|
|
1869
|
+
sideEffectId: z2.string(),
|
|
1870
|
+
tagId: z2.string(),
|
|
1871
|
+
messageId: z2.string(),
|
|
2067
1872
|
/**
|
|
2068
1873
|
* The submission this row belongs to.
|
|
2069
1874
|
*
|
|
@@ -2071,10 +1876,10 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
2071
1876
|
* together. Without it they read as two unrelated things that happened to
|
|
2072
1877
|
* occur in the same second.
|
|
2073
1878
|
*/
|
|
2074
|
-
eventId:
|
|
2075
|
-
runId:
|
|
2076
|
-
engagementMs:
|
|
2077
|
-
scrollDepth:
|
|
1879
|
+
eventId: z2.string(),
|
|
1880
|
+
runId: z2.string(),
|
|
1881
|
+
engagementMs: z2.number().int().nonnegative(),
|
|
1882
|
+
scrollDepth: z2.number().int().nonnegative(),
|
|
2078
1883
|
/**
|
|
2079
1884
|
* The A/B test this row was stamped into, and which side the edge served —
|
|
2080
1885
|
* `a` for the page as it is, `b` for the new variant.
|
|
@@ -2084,42 +1889,42 @@ var analyticsTimelineRowSchema = z4.object({
|
|
|
2084
1889
|
* knows nothing about the split, and the conversion it posts is attributed
|
|
2085
1890
|
* to a side by WHO did it (see `experiment_conversions`), never by a stamp.
|
|
2086
1891
|
*/
|
|
2087
|
-
experimentId:
|
|
2088
|
-
variant:
|
|
1892
|
+
experimentId: z2.string().default(""),
|
|
1893
|
+
variant: z2.string().default(""),
|
|
2089
1894
|
/** `success` | `failed` | `""` for a dispatch that has not settled yet. */
|
|
2090
|
-
outcome:
|
|
1895
|
+
outcome: z2.string(),
|
|
2091
1896
|
/** What the destination said when it refused. Empty on success. */
|
|
2092
|
-
error:
|
|
1897
|
+
error: z2.string(),
|
|
2093
1898
|
/** The destination's own id for the record it created, when it gave one. */
|
|
2094
|
-
providerRef:
|
|
1899
|
+
providerRef: z2.string(),
|
|
2095
1900
|
/** When the destination answered, so "it took eleven seconds" is sayable. */
|
|
2096
|
-
settledAt:
|
|
2097
|
-
});
|
|
2098
|
-
var analyticsSubmissionRowSchema =
|
|
2099
|
-
sessionId:
|
|
2100
|
-
flowSlug:
|
|
2101
|
-
startedAt:
|
|
2102
|
-
lastAt:
|
|
2103
|
-
anonId:
|
|
2104
|
-
identityHash:
|
|
2105
|
-
identityKind:
|
|
2106
|
-
landingId:
|
|
2107
|
-
path:
|
|
1901
|
+
settledAt: z2.string()
|
|
1902
|
+
});
|
|
1903
|
+
var analyticsSubmissionRowSchema = z2.object({
|
|
1904
|
+
sessionId: z2.string(),
|
|
1905
|
+
flowSlug: z2.string(),
|
|
1906
|
+
startedAt: z2.string(),
|
|
1907
|
+
lastAt: z2.string(),
|
|
1908
|
+
anonId: z2.string(),
|
|
1909
|
+
identityHash: z2.string(),
|
|
1910
|
+
identityKind: z2.string(),
|
|
1911
|
+
landingId: z2.string(),
|
|
1912
|
+
path: z2.string(),
|
|
2108
1913
|
/** Steps they saw. The denominator for "how far did they get". */
|
|
2109
|
-
stepsReached:
|
|
1914
|
+
stepsReached: z2.number().int().nonnegative(),
|
|
2110
1915
|
/** Steps they actually handed something over on. Zero means no attempt. */
|
|
2111
|
-
stepsSubmitted:
|
|
2112
|
-
submittedStepIds:
|
|
1916
|
+
stepsSubmitted: z2.number().int().nonnegative(),
|
|
1917
|
+
submittedStepIds: z2.array(z2.string()),
|
|
2113
1918
|
/** The furthest step they reached, for naming where they stopped. */
|
|
2114
|
-
lastStepId:
|
|
1919
|
+
lastStepId: z2.string(),
|
|
2115
1920
|
/** Whether the Form reached an ending, by any of its three routes. */
|
|
2116
|
-
finished:
|
|
2117
|
-
conversions:
|
|
2118
|
-
destinations:
|
|
1921
|
+
finished: z2.boolean(),
|
|
1922
|
+
conversions: z2.number().int().nonnegative(),
|
|
1923
|
+
destinations: z2.array(z2.string()),
|
|
2119
1924
|
/** Destinations that fired as a pixel in the page. */
|
|
2120
|
-
browserDestinations:
|
|
1925
|
+
browserDestinations: z2.array(z2.string()),
|
|
2121
1926
|
/** Destinations Baker dispatched from the server. */
|
|
2122
|
-
serverDestinations:
|
|
1927
|
+
serverDestinations: z2.array(z2.string()),
|
|
2123
1928
|
/**
|
|
2124
1929
|
* Server-side dispatch runs — the counterpart of `serverDestinations`, NOT of
|
|
2125
1930
|
* `destinations`.
|
|
@@ -2130,27 +1935,27 @@ var analyticsSubmissionRowSchema = z4.object({
|
|
|
2130
1935
|
* browser pixel. `destinations` is the union of both sides and is the column
|
|
2131
1936
|
* that answers "did this reach anything at all".
|
|
2132
1937
|
*/
|
|
2133
|
-
dispatched:
|
|
2134
|
-
succeeded:
|
|
2135
|
-
failed:
|
|
1938
|
+
dispatched: z2.number().int().nonnegative(),
|
|
1939
|
+
succeeded: z2.number().int().nonnegative(),
|
|
1940
|
+
failed: z2.number().int().nonnegative(),
|
|
2136
1941
|
/** Dispatched and never settled — "wait", as against "act". */
|
|
2137
|
-
pending:
|
|
2138
|
-
sampleError:
|
|
2139
|
-
providerRefs:
|
|
1942
|
+
pending: z2.number().int().nonnegative(),
|
|
1943
|
+
sampleError: z2.string(),
|
|
1944
|
+
providerRefs: z2.array(z2.string()),
|
|
2140
1945
|
/** The submission ids, which is how the panel opens the sealed payload. */
|
|
2141
|
-
eventIds:
|
|
2142
|
-
});
|
|
2143
|
-
var analyticsVisitorSessionSchema =
|
|
2144
|
-
sessionId:
|
|
2145
|
-
startedAt:
|
|
2146
|
-
endedAt:
|
|
2147
|
-
entryPath:
|
|
2148
|
-
entryLandingId:
|
|
2149
|
-
utmCampaign:
|
|
2150
|
-
referrerSource:
|
|
2151
|
-
deviceType:
|
|
2152
|
-
pageViews:
|
|
2153
|
-
conversions:
|
|
1946
|
+
eventIds: z2.array(z2.string())
|
|
1947
|
+
});
|
|
1948
|
+
var analyticsVisitorSessionSchema = z2.object({
|
|
1949
|
+
sessionId: z2.string(),
|
|
1950
|
+
startedAt: z2.string(),
|
|
1951
|
+
endedAt: z2.string(),
|
|
1952
|
+
entryPath: z2.string(),
|
|
1953
|
+
entryLandingId: z2.string(),
|
|
1954
|
+
utmCampaign: z2.string(),
|
|
1955
|
+
referrerSource: z2.string(),
|
|
1956
|
+
deviceType: z2.string(),
|
|
1957
|
+
pageViews: z2.number().int().nonnegative(),
|
|
1958
|
+
conversions: z2.number().int().nonnegative(),
|
|
2154
1959
|
/**
|
|
2155
1960
|
* True for the visits made BEFORE we knew who this was.
|
|
2156
1961
|
*
|
|
@@ -2158,29 +1963,29 @@ var analyticsVisitorSessionSchema = z4.object({
|
|
|
2158
1963
|
* that we recognised them all along, when in fact these visits were only
|
|
2159
1964
|
* attributed backwards through the browser after they identified themselves.
|
|
2160
1965
|
*/
|
|
2161
|
-
wasAnonymous:
|
|
2162
|
-
engagementMs:
|
|
2163
|
-
});
|
|
2164
|
-
var analyticsVisitProfileSchema =
|
|
2165
|
-
sessionId:
|
|
2166
|
-
startedAt:
|
|
2167
|
-
endedAt:
|
|
2168
|
-
entryPath:
|
|
2169
|
-
entryLandingId:
|
|
2170
|
-
country:
|
|
2171
|
-
region:
|
|
2172
|
-
city:
|
|
2173
|
-
timezone:
|
|
1966
|
+
wasAnonymous: z2.boolean(),
|
|
1967
|
+
engagementMs: z2.number().int().nonnegative()
|
|
1968
|
+
});
|
|
1969
|
+
var analyticsVisitProfileSchema = z2.object({
|
|
1970
|
+
sessionId: z2.string(),
|
|
1971
|
+
startedAt: z2.string(),
|
|
1972
|
+
endedAt: z2.string(),
|
|
1973
|
+
entryPath: z2.string(),
|
|
1974
|
+
entryLandingId: z2.string(),
|
|
1975
|
+
country: z2.string(),
|
|
1976
|
+
region: z2.string(),
|
|
1977
|
+
city: z2.string(),
|
|
1978
|
+
timezone: z2.string(),
|
|
2174
1979
|
/** The network the visit came from. What separates a datacentre from a person. */
|
|
2175
|
-
asOrganization:
|
|
2176
|
-
deviceType:
|
|
2177
|
-
browser:
|
|
2178
|
-
os:
|
|
2179
|
-
referrerSource:
|
|
2180
|
-
referrerDomain:
|
|
2181
|
-
utmSource:
|
|
2182
|
-
utmMedium:
|
|
2183
|
-
utmCampaign:
|
|
1980
|
+
asOrganization: z2.string(),
|
|
1981
|
+
deviceType: z2.string(),
|
|
1982
|
+
browser: z2.string(),
|
|
1983
|
+
os: z2.string(),
|
|
1984
|
+
referrerSource: z2.string(),
|
|
1985
|
+
referrerDomain: z2.string(),
|
|
1986
|
+
utmSource: z2.string(),
|
|
1987
|
+
utmMedium: z2.string(),
|
|
1988
|
+
utmCampaign: z2.string(),
|
|
2184
1989
|
/**
|
|
2185
1990
|
* Which platform the click id proves, in the `AD_PLATFORMS` vocabulary —
|
|
2186
1991
|
* `google` | `meta` | `tiktok` | `x` | `linkedin` | `microsoft` | `""`.
|
|
@@ -2189,42 +1994,42 @@ var analyticsVisitProfileSchema = z4.object({
|
|
|
2189
1994
|
* `google_ads` / `meta_ads` here alone, which meant every logo lookup on the
|
|
2190
1995
|
* People screen missed and a paid visit drew a neutral globe.
|
|
2191
1996
|
*/
|
|
2192
|
-
clickPlatform:
|
|
1997
|
+
clickPlatform: z2.string(),
|
|
2193
1998
|
/** Every ValueTrack-style parameter the URL carried, unresolved. */
|
|
2194
|
-
campaignParams:
|
|
1999
|
+
campaignParams: z2.record(z2.string(), z2.string()),
|
|
2195
2000
|
/** The browser's own cookie id. One person can have several. */
|
|
2196
|
-
anonId:
|
|
2197
|
-
identityHash:
|
|
2001
|
+
anonId: z2.string(),
|
|
2002
|
+
identityHash: z2.string(),
|
|
2198
2003
|
/** What the digest was made of — `email`, `phone`. Never the value. */
|
|
2199
|
-
identityKind:
|
|
2200
|
-
pageViews:
|
|
2201
|
-
conversions:
|
|
2202
|
-
engagementMs:
|
|
2004
|
+
identityKind: z2.string(),
|
|
2005
|
+
pageViews: z2.number().int().nonnegative(),
|
|
2006
|
+
conversions: z2.number().int().nonnegative(),
|
|
2007
|
+
engagementMs: z2.number().int().nonnegative()
|
|
2203
2008
|
});
|
|
2204
|
-
var analyticsPersonKeySchema =
|
|
2009
|
+
var analyticsPersonKeySchema = z2.object({
|
|
2205
2010
|
/** `email` | `phone` | `external` | `browser` | a click-id name | `fbp` | `fbc`. */
|
|
2206
|
-
kind:
|
|
2011
|
+
kind: z2.string(),
|
|
2207
2012
|
/** A digest for a contact detail, the value itself for a cookie or a click id. */
|
|
2208
|
-
value:
|
|
2209
|
-
firstSeen:
|
|
2210
|
-
lastSeen:
|
|
2013
|
+
value: z2.string(),
|
|
2014
|
+
firstSeen: z2.string(),
|
|
2015
|
+
lastSeen: z2.string(),
|
|
2211
2016
|
/** How many times it was observed beside another key — every submission repeats it. */
|
|
2212
|
-
observations:
|
|
2213
|
-
sessions:
|
|
2017
|
+
observations: z2.number().int().nonnegative(),
|
|
2018
|
+
sessions: z2.number().int().nonnegative(),
|
|
2214
2019
|
/** `client` | `edge` | `server` | `ingest` — which collector first saw it. */
|
|
2215
|
-
source:
|
|
2020
|
+
source: z2.string(),
|
|
2216
2021
|
/** The Form it was first seen on, where it came from one. */
|
|
2217
|
-
flowSlug:
|
|
2218
|
-
landingId:
|
|
2022
|
+
flowSlug: z2.string(),
|
|
2023
|
+
landingId: z2.string()
|
|
2219
2024
|
});
|
|
2220
|
-
var analyticsPersonProfileSchema =
|
|
2221
|
-
firstSeen:
|
|
2222
|
-
lastSeen:
|
|
2223
|
-
sessions:
|
|
2025
|
+
var analyticsPersonProfileSchema = z2.object({
|
|
2026
|
+
firstSeen: z2.string(),
|
|
2027
|
+
lastSeen: z2.string(),
|
|
2028
|
+
sessions: z2.number().int().nonnegative(),
|
|
2224
2029
|
/** How many browsers resolved to this person. More than one is cross-device. */
|
|
2225
|
-
devices:
|
|
2226
|
-
pageViews:
|
|
2227
|
-
conversions:
|
|
2030
|
+
devices: z2.number().int().nonnegative(),
|
|
2031
|
+
pageViews: z2.number().int().nonnegative(),
|
|
2032
|
+
conversions: z2.number().int().nonnegative(),
|
|
2228
2033
|
/**
|
|
2229
2034
|
* What they are worth, per currency — `{ EUR: 4753 }`.
|
|
2230
2035
|
*
|
|
@@ -2234,52 +2039,52 @@ var analyticsPersonProfileSchema = z4.object({
|
|
|
2234
2039
|
* Only a server event ever carries money, and a retried post is counted
|
|
2235
2040
|
* once, on `event_uid`.
|
|
2236
2041
|
*/
|
|
2237
|
-
money:
|
|
2238
|
-
engagementMs:
|
|
2042
|
+
money: z2.record(z2.string(), z2.number()),
|
|
2043
|
+
engagementMs: z2.number().int().nonnegative(),
|
|
2239
2044
|
/** How many of their events a client's own server posted. */
|
|
2240
|
-
serverEvents:
|
|
2241
|
-
country:
|
|
2242
|
-
region:
|
|
2243
|
-
city:
|
|
2244
|
-
deviceType:
|
|
2245
|
-
browser:
|
|
2246
|
-
os:
|
|
2247
|
-
utmSource:
|
|
2248
|
-
utmMedium:
|
|
2249
|
-
utmCampaign:
|
|
2250
|
-
referrerSource:
|
|
2251
|
-
entryLandingId:
|
|
2252
|
-
entryPath:
|
|
2045
|
+
serverEvents: z2.number().int().nonnegative(),
|
|
2046
|
+
country: z2.string(),
|
|
2047
|
+
region: z2.string(),
|
|
2048
|
+
city: z2.string(),
|
|
2049
|
+
deviceType: z2.string(),
|
|
2050
|
+
browser: z2.string(),
|
|
2051
|
+
os: z2.string(),
|
|
2052
|
+
utmSource: z2.string(),
|
|
2053
|
+
utmMedium: z2.string(),
|
|
2054
|
+
utmCampaign: z2.string(),
|
|
2055
|
+
referrerSource: z2.string(),
|
|
2056
|
+
entryLandingId: z2.string(),
|
|
2057
|
+
entryPath: z2.string(),
|
|
2253
2058
|
/**
|
|
2254
2059
|
* The customer-matching block, merged newest-wins across everything anyone
|
|
2255
2060
|
* has ever told us about them — `city`, `postal_code`, `country`,
|
|
2256
2061
|
* `first_name_sha256`, `fbp`. Keyed exactly as the store holds it, so a key
|
|
2257
2062
|
* ending `_sha256` says its value is a digest and cannot be shown.
|
|
2258
2063
|
*/
|
|
2259
|
-
matchKeys:
|
|
2260
|
-
});
|
|
2261
|
-
var analyticsVisitorRowSchema =
|
|
2262
|
-
anonId:
|
|
2263
|
-
firstSeen:
|
|
2264
|
-
lastSeen:
|
|
2265
|
-
sessions:
|
|
2266
|
-
pageViews:
|
|
2267
|
-
conversions:
|
|
2268
|
-
formTriggers:
|
|
2269
|
-
outboundClicks:
|
|
2270
|
-
engagementMs:
|
|
2064
|
+
matchKeys: z2.record(z2.string(), z2.string())
|
|
2065
|
+
});
|
|
2066
|
+
var analyticsVisitorRowSchema = z2.object({
|
|
2067
|
+
anonId: z2.string(),
|
|
2068
|
+
firstSeen: z2.string(),
|
|
2069
|
+
lastSeen: z2.string(),
|
|
2070
|
+
sessions: z2.number().int().nonnegative(),
|
|
2071
|
+
pageViews: z2.number().int().nonnegative(),
|
|
2072
|
+
conversions: z2.number().int().nonnegative(),
|
|
2073
|
+
formTriggers: z2.number().int().nonnegative(),
|
|
2074
|
+
outboundClicks: z2.number().int().nonnegative(),
|
|
2075
|
+
engagementMs: z2.number().int().nonnegative(),
|
|
2271
2076
|
/** The visit to open by default — the most recent one. */
|
|
2272
|
-
lastSessionId:
|
|
2273
|
-
entryPath:
|
|
2274
|
-
entryLandingId:
|
|
2275
|
-
lastPath:
|
|
2276
|
-
referrerSource:
|
|
2277
|
-
referrerDomain:
|
|
2278
|
-
utmSource:
|
|
2279
|
-
utmMedium:
|
|
2280
|
-
utmCampaign:
|
|
2281
|
-
clickPlatform:
|
|
2282
|
-
campaignParams:
|
|
2077
|
+
lastSessionId: z2.string(),
|
|
2078
|
+
entryPath: z2.string(),
|
|
2079
|
+
entryLandingId: z2.string(),
|
|
2080
|
+
lastPath: z2.string(),
|
|
2081
|
+
referrerSource: z2.string(),
|
|
2082
|
+
referrerDomain: z2.string(),
|
|
2083
|
+
utmSource: z2.string(),
|
|
2084
|
+
utmMedium: z2.string(),
|
|
2085
|
+
utmCampaign: z2.string(),
|
|
2086
|
+
clickPlatform: z2.string(),
|
|
2087
|
+
campaignParams: z2.record(z2.string(), z2.string()),
|
|
2283
2088
|
/**
|
|
2284
2089
|
* The click ids this person arrived on, by their own names — `gclid`,
|
|
2285
2090
|
* `fbclid`, `msclkid`, `li_fat_id`, `ttclid`, `twclid`, `wbraid`, `gbraid`,
|
|
@@ -2292,55 +2097,55 @@ var analyticsVisitorRowSchema = z4.object({
|
|
|
2292
2097
|
* therefore the value somebody is looking for when a conversion did not show
|
|
2293
2098
|
* up on the other side.
|
|
2294
2099
|
*/
|
|
2295
|
-
clickIds:
|
|
2296
|
-
country:
|
|
2297
|
-
region:
|
|
2298
|
-
city:
|
|
2299
|
-
timezone:
|
|
2300
|
-
asOrganization:
|
|
2301
|
-
deviceType:
|
|
2302
|
-
browser:
|
|
2303
|
-
os:
|
|
2304
|
-
identityHash:
|
|
2305
|
-
identityKind:
|
|
2306
|
-
});
|
|
2307
|
-
var analyticsMeasureScopeSchema =
|
|
2308
|
-
scope:
|
|
2100
|
+
clickIds: z2.record(z2.string(), z2.string()),
|
|
2101
|
+
country: z2.string(),
|
|
2102
|
+
region: z2.string(),
|
|
2103
|
+
city: z2.string(),
|
|
2104
|
+
timezone: z2.string(),
|
|
2105
|
+
asOrganization: z2.string(),
|
|
2106
|
+
deviceType: z2.string(),
|
|
2107
|
+
browser: z2.string(),
|
|
2108
|
+
os: z2.string(),
|
|
2109
|
+
identityHash: z2.string(),
|
|
2110
|
+
identityKind: z2.string()
|
|
2111
|
+
});
|
|
2112
|
+
var analyticsMeasureScopeSchema = z2.object({
|
|
2113
|
+
scope: z2.enum(["campaigns", "outcomes", "all", "unknown"]),
|
|
2309
2114
|
/** Every event the tag on the client's own site sent in this window. */
|
|
2310
|
-
websiteEvents:
|
|
2115
|
+
websiteEvents: z2.number(),
|
|
2311
2116
|
/** Browser ids it minted off-Baker. Any at all means the tag is on `all`. */
|
|
2312
|
-
websiteNewVisitors:
|
|
2117
|
+
websiteNewVisitors: z2.number()
|
|
2313
2118
|
});
|
|
2314
|
-
var analyticsQueryDataSchema =
|
|
2119
|
+
var analyticsQueryDataSchema = z2.object({
|
|
2315
2120
|
preset: analyticsPresetSchema,
|
|
2316
2121
|
window: analyticsWindowSchema,
|
|
2317
2122
|
totals: analyticsTotalsSchema,
|
|
2318
|
-
trend:
|
|
2319
|
-
topPages:
|
|
2320
|
-
topSources:
|
|
2321
|
-
topCampaigns:
|
|
2322
|
-
countries:
|
|
2323
|
-
devices:
|
|
2324
|
-
funnels:
|
|
2325
|
-
flowSummary:
|
|
2326
|
-
flowPaths:
|
|
2327
|
-
triggers:
|
|
2328
|
-
releases:
|
|
2329
|
-
paid:
|
|
2123
|
+
trend: z2.array(analyticsTrendPointSchema).optional(),
|
|
2124
|
+
topPages: z2.array(analyticsPageRowSchema).optional(),
|
|
2125
|
+
topSources: z2.array(analyticsSourceRowSchema).optional(),
|
|
2126
|
+
topCampaigns: z2.array(analyticsCampaignRowSchema).optional(),
|
|
2127
|
+
countries: z2.array(analyticsDimensionRowSchema).optional(),
|
|
2128
|
+
devices: z2.array(analyticsDimensionRowSchema).optional(),
|
|
2129
|
+
funnels: z2.array(analyticsFunnelSchema).optional(),
|
|
2130
|
+
flowSummary: z2.array(analyticsFlowSummarySchema).optional(),
|
|
2131
|
+
flowPaths: z2.array(analyticsFlowEdgeSchema).optional(),
|
|
2132
|
+
triggers: z2.array(analyticsTriggerRowSchema).optional(),
|
|
2133
|
+
releases: z2.array(analyticsReleaseRowSchema).optional(),
|
|
2134
|
+
paid: z2.array(analyticsPaidRowSchema).optional(),
|
|
2330
2135
|
measureScope: analyticsMeasureScopeSchema.optional(),
|
|
2331
|
-
deliveries:
|
|
2332
|
-
submissions:
|
|
2333
|
-
geo:
|
|
2334
|
-
bots:
|
|
2335
|
-
landings:
|
|
2336
|
-
tags:
|
|
2337
|
-
customEvents:
|
|
2338
|
-
eventBreakdown:
|
|
2339
|
-
customFunnel:
|
|
2340
|
-
deviceBreakdown:
|
|
2136
|
+
deliveries: z2.array(analyticsDeliveryRowSchema).optional(),
|
|
2137
|
+
submissions: z2.array(analyticsSubmissionRowSchema).optional(),
|
|
2138
|
+
geo: z2.array(analyticsGeoRowSchema).optional(),
|
|
2139
|
+
bots: z2.array(analyticsBotRowSchema).optional(),
|
|
2140
|
+
landings: z2.array(analyticsLandingRowSchema).optional(),
|
|
2141
|
+
tags: z2.array(analyticsTagRowSchema).optional(),
|
|
2142
|
+
customEvents: z2.array(analyticsCustomEventRowSchema).optional(),
|
|
2143
|
+
eventBreakdown: z2.array(analyticsEventBreakdownRowSchema).optional(),
|
|
2144
|
+
customFunnel: z2.array(analyticsCustomFunnelStepSchema).optional(),
|
|
2145
|
+
deviceBreakdown: z2.array(analyticsDeviceRowSchema).optional(),
|
|
2341
2146
|
realtime: analyticsRealtimeSchema.optional(),
|
|
2342
|
-
adDimensions:
|
|
2343
|
-
adParams:
|
|
2147
|
+
adDimensions: z2.array(analyticsAdDimensionRowSchema).optional(),
|
|
2148
|
+
adParams: z2.array(analyticsAdParamRowSchema).optional(),
|
|
2344
2149
|
/**
|
|
2345
2150
|
* Parameters arriving on visits no platform can be named for.
|
|
2346
2151
|
*
|
|
@@ -2353,29 +2158,29 @@ var analyticsQueryDataSchema = z4.object({
|
|
|
2353
2158
|
* map them under, so a reader who recognises one adds it by name to the
|
|
2354
2159
|
* platform they know it belongs to.
|
|
2355
2160
|
*/
|
|
2356
|
-
adParamsUnattributed:
|
|
2357
|
-
adPlatformTraffic:
|
|
2358
|
-
flowDestinations:
|
|
2161
|
+
adParamsUnattributed: z2.array(analyticsAdParamRowSchema).optional(),
|
|
2162
|
+
adPlatformTraffic: z2.array(analyticsAdPlatformTrafficSchema).optional(),
|
|
2163
|
+
flowDestinations: z2.array(analyticsFlowDestinationsSchema).optional(),
|
|
2359
2164
|
/** Present only on a report that was asked for by the page. */
|
|
2360
2165
|
pageInfo: analyticsPageInfoSchema.optional(),
|
|
2361
|
-
conversions:
|
|
2166
|
+
conversions: z2.array(analyticsConversionRowSchema).optional(),
|
|
2362
2167
|
/** Every event these pages produced, counted or not. The "add a conversion" picker. */
|
|
2363
|
-
eventCatalog:
|
|
2364
|
-
timeline:
|
|
2168
|
+
eventCatalog: z2.array(analyticsEventCatalogRowSchema).optional(),
|
|
2169
|
+
timeline: z2.array(analyticsTimelineRowSchema).optional(),
|
|
2365
2170
|
/**
|
|
2366
2171
|
* The raw feed. Same row shape as a replay, because it is the same rows —
|
|
2367
2172
|
* what changes is that this one is bounded by a window rather than by a visit.
|
|
2368
2173
|
*/
|
|
2369
|
-
stream:
|
|
2174
|
+
stream: z2.array(analyticsTimelineRowSchema).optional(),
|
|
2370
2175
|
/** How each line of a people search on `stream` was read — what `personTerms` points at. */
|
|
2371
|
-
peopleSearch:
|
|
2372
|
-
visitorSessions:
|
|
2176
|
+
peopleSearch: z2.array(peopleSearchTermSchema).optional(),
|
|
2177
|
+
visitorSessions: z2.array(analyticsVisitorSessionSchema).optional(),
|
|
2373
2178
|
/** Every key this person is known by — contact details, browsers, clicks, cookies. */
|
|
2374
|
-
personKeys:
|
|
2179
|
+
personKeys: z2.array(analyticsPersonKeySchema).optional(),
|
|
2375
2180
|
/** The same person, rolled up: their totals across every device, and what is known about them. */
|
|
2376
2181
|
personProfile: analyticsPersonProfileSchema.optional(),
|
|
2377
2182
|
visitProfile: analyticsVisitProfileSchema.optional(),
|
|
2378
|
-
visitors:
|
|
2183
|
+
visitors: z2.array(analyticsVisitorRowSchema).optional(),
|
|
2379
2184
|
/**
|
|
2380
2185
|
* The same totals for the window immediately before this one, when asked for.
|
|
2381
2186
|
*
|
|
@@ -2383,55 +2188,55 @@ var analyticsQueryDataSchema = z4.object({
|
|
|
2383
2188
|
* deltas, so a caller can show either side of it and does not have to trust
|
|
2384
2189
|
* our arithmetic to render "1,240 vs 980".
|
|
2385
2190
|
*/
|
|
2386
|
-
previous:
|
|
2191
|
+
previous: z2.object({
|
|
2387
2192
|
window: analyticsWindowSchema,
|
|
2388
2193
|
totals: analyticsTotalsSchema
|
|
2389
2194
|
}).optional()
|
|
2390
2195
|
});
|
|
2391
|
-
var analyticsQueryResponseSchema =
|
|
2392
|
-
ok:
|
|
2196
|
+
var analyticsQueryResponseSchema = z2.object({
|
|
2197
|
+
ok: z2.literal(true),
|
|
2393
2198
|
data: analyticsQueryDataSchema,
|
|
2394
|
-
warnings:
|
|
2395
|
-
hints:
|
|
2199
|
+
warnings: z2.array(analyticsWarningSchema).optional(),
|
|
2200
|
+
hints: z2.array(z2.string()).optional()
|
|
2396
2201
|
});
|
|
2397
|
-
var analyticsConversionsRequestSchema =
|
|
2398
|
-
set:
|
|
2399
|
-
|
|
2202
|
+
var analyticsConversionsRequestSchema = z2.object({
|
|
2203
|
+
set: z2.array(
|
|
2204
|
+
z2.object({
|
|
2400
2205
|
/** `form:<flow>:<step>:<trigger>` | `submit:<flow>` | `page:<name>` | `exit:<host>`. */
|
|
2401
|
-
eventKey:
|
|
2402
|
-
name:
|
|
2403
|
-
countMode:
|
|
2206
|
+
eventKey: z2.string().max(320),
|
|
2207
|
+
name: z2.string().max(MAX_CONVERSION_NAME),
|
|
2208
|
+
countMode: z2.enum(CONVERSION_COUNT_MODES).optional()
|
|
2404
2209
|
})
|
|
2405
2210
|
).max(60).optional(),
|
|
2406
|
-
remove:
|
|
2211
|
+
remove: z2.array(z2.string().max(320)).max(60).optional(),
|
|
2407
2212
|
/** Every key counted under `from` moves to `to`, and the sends under the name go with it. */
|
|
2408
|
-
rename:
|
|
2213
|
+
rename: z2.object({ from: z2.string().min(1).max(MAX_CONVERSION_NAME), to: z2.string().min(1).max(MAX_CONVERSION_NAME) }).optional()
|
|
2409
2214
|
});
|
|
2410
|
-
var analyticsConversionsResponseSchema =
|
|
2411
|
-
ok:
|
|
2412
|
-
data:
|
|
2215
|
+
var analyticsConversionsResponseSchema = z2.object({
|
|
2216
|
+
ok: z2.literal(true),
|
|
2217
|
+
data: z2.object({
|
|
2413
2218
|
/**
|
|
2414
2219
|
* What the company counts — inside a chat, with this chat's proposal on
|
|
2415
2220
|
* top: `staged` marks a definition that applies when the chat is published.
|
|
2416
2221
|
*/
|
|
2417
|
-
definitions:
|
|
2418
|
-
|
|
2419
|
-
eventKey:
|
|
2420
|
-
name:
|
|
2421
|
-
countMode:
|
|
2422
|
-
updatedAt:
|
|
2423
|
-
staged:
|
|
2222
|
+
definitions: z2.array(
|
|
2223
|
+
z2.object({
|
|
2224
|
+
eventKey: z2.string(),
|
|
2225
|
+
name: z2.string(),
|
|
2226
|
+
countMode: z2.string(),
|
|
2227
|
+
updatedAt: z2.number(),
|
|
2228
|
+
staged: z2.boolean().optional()
|
|
2424
2229
|
})
|
|
2425
2230
|
),
|
|
2426
2231
|
/** This chat's proposal, when it has one: counted from Publish, and gone if the chat is discarded. */
|
|
2427
|
-
staged:
|
|
2428
|
-
set:
|
|
2429
|
-
remove:
|
|
2232
|
+
staged: z2.object({
|
|
2233
|
+
set: z2.array(z2.object({ eventKey: z2.string(), name: z2.string() })),
|
|
2234
|
+
remove: z2.array(z2.string())
|
|
2430
2235
|
}).optional()
|
|
2431
2236
|
}),
|
|
2432
|
-
hints:
|
|
2237
|
+
hints: z2.array(z2.string()).optional()
|
|
2433
2238
|
});
|
|
2434
|
-
var analyticsMappingRequestSchema =
|
|
2239
|
+
var analyticsMappingRequestSchema = z2.object({
|
|
2435
2240
|
/**
|
|
2436
2241
|
* Which platform these operations are about. Required for a change.
|
|
2437
2242
|
*
|
|
@@ -2440,15 +2245,15 @@ var analyticsMappingRequestSchema = z4.object({
|
|
|
2440
2245
|
* and a keyword on Meta traffic is not a thing that can exist. Omit it only
|
|
2441
2246
|
* to read the mapping back.
|
|
2442
2247
|
*/
|
|
2443
|
-
platform:
|
|
2248
|
+
platform: z2.enum(AD_PLATFORMS).optional(),
|
|
2444
2249
|
/** Parameter name → role, on `platform`. Merged over what is stored. */
|
|
2445
|
-
set:
|
|
2250
|
+
set: z2.record(z2.string().max(64), adParamRoleSchema).optional(),
|
|
2446
2251
|
/** Parameter names to stop reading, on `platform`. Applied after `set`. */
|
|
2447
|
-
remove:
|
|
2252
|
+
remove: z2.array(z2.string().max(64)).max(64).optional()
|
|
2448
2253
|
});
|
|
2449
|
-
var analyticsMappingResponseSchema =
|
|
2450
|
-
ok:
|
|
2451
|
-
data:
|
|
2254
|
+
var analyticsMappingResponseSchema = z2.object({
|
|
2255
|
+
ok: z2.literal(true),
|
|
2256
|
+
data: z2.object({
|
|
2452
2257
|
/**
|
|
2453
2258
|
* This company's own entries after the change, keyed `<platform>/<name>`.
|
|
2454
2259
|
*
|
|
@@ -2456,7 +2261,7 @@ var analyticsMappingResponseSchema = z4.object({
|
|
|
2456
2261
|
* just mapped `cid` on TikTok is usually about to be asked the same
|
|
2457
2262
|
* question about Google, and the answer there is different.
|
|
2458
2263
|
*/
|
|
2459
|
-
params:
|
|
2264
|
+
params: z2.record(z2.string(), adParamRoleSchema),
|
|
2460
2265
|
/**
|
|
2461
2266
|
* Names that are understood without being configured.
|
|
2462
2267
|
*
|
|
@@ -2464,7 +2269,7 @@ var analyticsMappingResponseSchema = z4.object({
|
|
|
2464
2269
|
* shipping a copy of the built-in list, and so an agent does not spend a
|
|
2465
2270
|
* turn configuring `keyword` to mean keyword.
|
|
2466
2271
|
*/
|
|
2467
|
-
builtIn:
|
|
2272
|
+
builtIn: z2.array(z2.string()),
|
|
2468
2273
|
/**
|
|
2469
2274
|
* What the client's own ad account says about each parameter just staged.
|
|
2470
2275
|
*
|
|
@@ -2474,30 +2279,30 @@ var analyticsMappingResponseSchema = z4.object({
|
|
|
2474
2279
|
* else, so the answer just given would produce a report that is wrong and
|
|
2475
2280
|
* looks entirely plausible.
|
|
2476
2281
|
*/
|
|
2477
|
-
evidence:
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
status:
|
|
2481
|
-
macro:
|
|
2282
|
+
evidence: z2.record(
|
|
2283
|
+
z2.string(),
|
|
2284
|
+
z2.object({
|
|
2285
|
+
status: z2.enum(["confirmed", "contradicted", "unseen", "not_read"]),
|
|
2286
|
+
macro: z2.string().optional(),
|
|
2482
2287
|
suggestedRole: adParamRoleSchema.optional(),
|
|
2483
|
-
source:
|
|
2484
|
-
reason:
|
|
2288
|
+
source: z2.string().optional(),
|
|
2289
|
+
reason: z2.string().optional()
|
|
2485
2290
|
})
|
|
2486
2291
|
).optional(),
|
|
2487
|
-
updatedAt:
|
|
2292
|
+
updatedAt: z2.number().nullable()
|
|
2488
2293
|
}),
|
|
2489
|
-
hints:
|
|
2294
|
+
hints: z2.array(z2.string()).optional()
|
|
2490
2295
|
});
|
|
2491
|
-
var analyticsTrackingRequestSchema =
|
|
2492
|
-
platform:
|
|
2493
|
-
days:
|
|
2296
|
+
var analyticsTrackingRequestSchema = z2.object({
|
|
2297
|
+
platform: z2.enum(AD_PLATFORMS).optional(),
|
|
2298
|
+
days: z2.number().int().min(1).max(365).optional()
|
|
2494
2299
|
});
|
|
2495
|
-
var trackingDimensionSchema =
|
|
2300
|
+
var trackingDimensionSchema = z2.object({
|
|
2496
2301
|
role: adParamRoleSchema,
|
|
2497
2302
|
/** The platform's own macro for it — what goes in the URL. */
|
|
2498
|
-
macro:
|
|
2303
|
+
macro: z2.string(),
|
|
2499
2304
|
/** The account's own spelling where it has one, else the canonical name. */
|
|
2500
|
-
name:
|
|
2305
|
+
name: z2.string(),
|
|
2501
2306
|
/**
|
|
2502
2307
|
* What has to happen for this dimension to reach a report.
|
|
2503
2308
|
*
|
|
@@ -2508,34 +2313,34 @@ var trackingDimensionSchema = z4.object({
|
|
|
2508
2313
|
* `unknown` means no visit arrived and the account could not be read, which
|
|
2509
2314
|
* must never be reported as untagged.
|
|
2510
2315
|
*/
|
|
2511
|
-
state:
|
|
2512
|
-
evidence:
|
|
2513
|
-
note:
|
|
2316
|
+
state: z2.enum(["covered", "unmapped", "missing", "unknown"]),
|
|
2317
|
+
evidence: z2.string().optional(),
|
|
2318
|
+
note: z2.string().optional()
|
|
2514
2319
|
});
|
|
2515
|
-
var analyticsTrackingPlatformSchema =
|
|
2516
|
-
platform:
|
|
2517
|
-
label:
|
|
2518
|
-
sessions:
|
|
2320
|
+
var analyticsTrackingPlatformSchema = z2.object({
|
|
2321
|
+
platform: z2.enum(AD_PLATFORMS),
|
|
2322
|
+
label: z2.string(),
|
|
2323
|
+
sessions: z2.number(),
|
|
2519
2324
|
/** Whether the ad account itself could be read, and why not when it could not. */
|
|
2520
|
-
account:
|
|
2521
|
-
dimensions:
|
|
2325
|
+
account: z2.object({ read: z2.boolean(), templates: z2.number(), reason: z2.string().optional() }),
|
|
2326
|
+
dimensions: z2.array(trackingDimensionSchema),
|
|
2522
2327
|
/** Names the URLs already carry that Baker does not read yet. */
|
|
2523
|
-
unmapped:
|
|
2524
|
-
mapCommand:
|
|
2525
|
-
unexplained:
|
|
2328
|
+
unmapped: z2.record(z2.string(), adParamRoleSchema),
|
|
2329
|
+
mapCommand: z2.string(),
|
|
2330
|
+
unexplained: z2.array(z2.object({ name: z2.string(), value: z2.string() })),
|
|
2526
2331
|
/** The pairs to append to the account's tagging, or `""`. */
|
|
2527
|
-
suffix:
|
|
2528
|
-
whereItGoes:
|
|
2332
|
+
suffix: z2.string(),
|
|
2333
|
+
whereItGoes: z2.string(),
|
|
2529
2334
|
/** Which level to put them at, who can write it, and how an existing value is treated. */
|
|
2530
|
-
fix:
|
|
2335
|
+
fix: z2.string()
|
|
2531
2336
|
});
|
|
2532
|
-
var analyticsTrackingResponseSchema =
|
|
2533
|
-
ok:
|
|
2534
|
-
data:
|
|
2535
|
-
hints:
|
|
2337
|
+
var analyticsTrackingResponseSchema = z2.object({
|
|
2338
|
+
ok: z2.literal(true),
|
|
2339
|
+
data: z2.object({ days: z2.number(), platforms: z2.array(analyticsTrackingPlatformSchema) }),
|
|
2340
|
+
hints: z2.array(z2.string()).optional()
|
|
2536
2341
|
});
|
|
2537
|
-
var boundedReference = (max) =>
|
|
2538
|
-
var submissionRecordRequestSchema =
|
|
2342
|
+
var boundedReference = (max) => z2.string().transform((value) => cutToLength(value, max));
|
|
2343
|
+
var submissionRecordRequestSchema = z2.object({
|
|
2539
2344
|
/**
|
|
2540
2345
|
* Injected by the Worker from the host or the site key. Never from the page.
|
|
2541
2346
|
*
|
|
@@ -2544,9 +2349,9 @@ var submissionRecordRequestSchema = z4.object({
|
|
|
2544
2349
|
* would produce a row belonging to a company that does not exist, which is
|
|
2545
2350
|
* worse than refusing — this is the case where refusing is right.
|
|
2546
2351
|
*/
|
|
2547
|
-
companyId:
|
|
2352
|
+
companyId: z2.string().min(1),
|
|
2548
2353
|
/** Shared with every destination this submit was sent to, and with its event. */
|
|
2549
|
-
submissionId:
|
|
2354
|
+
submissionId: z2.string().min(1).pipe(boundedReference(128)),
|
|
2550
2355
|
/**
|
|
2551
2356
|
* The Form execution this step belongs to, or `""` from a page published
|
|
2552
2357
|
* before attempts existed.
|
|
@@ -2574,7 +2379,7 @@ var submissionRecordRequestSchema = z4.object({
|
|
|
2574
2379
|
* Degraded rather than refused, like everything else here: an unrecognised
|
|
2575
2380
|
* kind costs the copy one label, and refusing it would cost the copy.
|
|
2576
2381
|
*/
|
|
2577
|
-
identityKind:
|
|
2382
|
+
identityKind: z2.enum(["email", "phone"]).optional().catch(void 0),
|
|
2578
2383
|
/** Injected by the Worker's edge. Kept exactly here and as a /24 everywhere else. */
|
|
2579
2384
|
clientIp: boundedReference(64).nullish(),
|
|
2580
2385
|
/**
|
|
@@ -2585,302 +2390,553 @@ var submissionRecordRequestSchema = z4.object({
|
|
|
2585
2390
|
* pasted a paragraph into a free-text field lost the email and the budget
|
|
2586
2391
|
* beside it too. See {@link boundSubmissionAnswers}.
|
|
2587
2392
|
*/
|
|
2588
|
-
answers:
|
|
2393
|
+
answers: z2.record(z2.string(), z2.string()).transform(boundSubmissionAnswers)
|
|
2589
2394
|
});
|
|
2590
2395
|
|
|
2591
|
-
// ../api/src/analytics/
|
|
2592
|
-
|
|
2593
|
-
function isAnalyticsBusy(message) {
|
|
2594
|
-
return typeof message === "string" && message.includes(ANALYTICS_BUSY_MESSAGE);
|
|
2595
|
-
}
|
|
2596
|
-
var ANALYTICS_BUSY_FIX = "Nothing went wrong and nothing was lost \u2014 the analytics store was briefly at capacity. Wait a few seconds and ask for the same report again. If you were in the middle of a larger job, carry on with the rest of it and come back to this read; do not abandon the job.";
|
|
2597
|
-
|
|
2598
|
-
// ../api/src/analytics/conversionNames.ts
|
|
2599
|
-
function normalizeConversionName(name) {
|
|
2600
|
-
return name.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, " ").trim().split(" ").filter((word) => word !== "").map((word) => word.length > 3 && word.endsWith("s") ? word.slice(0, -1) : word).join(" ");
|
|
2601
|
-
}
|
|
2602
|
-
function findNameCollision(name, existing) {
|
|
2603
|
-
const normalized = normalizeConversionName(name);
|
|
2604
|
-
return existing.find((candidate) => candidate !== name && normalizeConversionName(candidate) === normalized) ?? null;
|
|
2605
|
-
}
|
|
2606
|
-
var STANDARD_CONVERSION_NAMES = [
|
|
2607
|
-
{ name: "Lead", meaning: "Somebody handed over contact details" },
|
|
2608
|
-
{ name: "Booked a call", meaning: "A meeting or demo was scheduled" },
|
|
2609
|
-
{ name: "Quote requested", meaning: "Somebody asked what it would cost" },
|
|
2610
|
-
{ name: "Purchase", meaning: "Money changed hands" },
|
|
2611
|
-
{ name: "Signed up", meaning: "An account or trial was created" },
|
|
2612
|
-
{ name: "Subscribed", meaning: "Somebody opted in to hear from them again" },
|
|
2613
|
-
{ name: "Downloaded", meaning: "A guide, price list or asset was taken" },
|
|
2614
|
-
{ name: "Contacted us", meaning: "A call, WhatsApp or email started from the page" }
|
|
2615
|
-
];
|
|
2396
|
+
// ../api/src/analytics/trackingPlan.ts
|
|
2397
|
+
import { z as z4 } from "zod";
|
|
2616
2398
|
|
|
2617
|
-
// ../api/src/
|
|
2618
|
-
|
|
2619
|
-
function isConversionSend(type) {
|
|
2620
|
-
return type.startsWith(CONVERSION_SEND_PREFIX);
|
|
2621
|
-
}
|
|
2622
|
-
var SERVER_SIDE_SENDER_TAG = {
|
|
2623
|
-
metaCapi: "meta",
|
|
2624
|
-
chatgptAdsCapi: "chatgptAds",
|
|
2625
|
-
googleAdsCapi: "googleAds",
|
|
2626
|
-
linkedinCapi: "linkedinInsightTag",
|
|
2627
|
-
twitterAdsCapi: "twitterAds",
|
|
2628
|
-
ga4Mp: "googleAnalytics"
|
|
2629
|
-
};
|
|
2630
|
-
var DESTINATION_NAMES = {
|
|
2631
|
-
email: "Email",
|
|
2632
|
-
httpWebhook: "HTTP Webhook",
|
|
2633
|
-
zapier: "Zapier",
|
|
2634
|
-
tiktok: "TikTok Pixel",
|
|
2635
|
-
pinterest: "Pinterest Tag",
|
|
2636
|
-
googleTagManager: "Google Tag Manager",
|
|
2637
|
-
amplitude: "Amplitude",
|
|
2638
|
-
hotjar: "Hotjar",
|
|
2639
|
-
clarity: "Microsoft Clarity",
|
|
2640
|
-
hubspot: "HubSpot Events",
|
|
2641
|
-
vwo: "VWO",
|
|
2642
|
-
posthog: "PostHog",
|
|
2643
|
-
datafast: "DataFast",
|
|
2644
|
-
code: "Custom Code",
|
|
2645
|
-
pipedrive: "Pipedrive",
|
|
2646
|
-
googleSpreadsheet: "Google Sheets",
|
|
2647
|
-
hubspotForm: "HubSpot Form",
|
|
2648
|
-
goHighlevelContact: "GoHighLevel",
|
|
2649
|
-
crmble: "Crmble"
|
|
2650
|
-
};
|
|
2651
|
-
function destinationKey(type) {
|
|
2652
|
-
const platform = isConversionSend(type) ? type.slice(CONVERSION_SEND_PREFIX.length) : type;
|
|
2653
|
-
return SERVER_SIDE_SENDER_TAG[platform] ?? platform;
|
|
2654
|
-
}
|
|
2655
|
-
function destinationName(type) {
|
|
2656
|
-
if (type === "") return "";
|
|
2657
|
-
const key = destinationKey(type);
|
|
2658
|
-
if (isSendPlatform(key)) return SEND_PLATFORM_SPECS[key].title;
|
|
2659
|
-
return DESTINATION_NAMES[key] ?? type;
|
|
2660
|
-
}
|
|
2399
|
+
// ../api/src/funnel/wire.ts
|
|
2400
|
+
import { z as z3 } from "zod";
|
|
2661
2401
|
|
|
2662
|
-
// ../api/src/
|
|
2663
|
-
var
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
lifecycle: true
|
|
2402
|
+
// ../api/src/funnel/stepTemplates.ts
|
|
2403
|
+
var FUNNEL_STEP_TEMPLATES = [
|
|
2404
|
+
{
|
|
2405
|
+
key: "saw_offer",
|
|
2406
|
+
displayName: "Saw the offer",
|
|
2407
|
+
meaning: "Someone opened one of your landing pages \u2014 where most journeys start",
|
|
2408
|
+
stepClass: "visited",
|
|
2409
|
+
classNote: "The only `visited` template: a landing being viewed is a step, never an outcome.",
|
|
2410
|
+
aliases: ["saw the offer", "visited", "landing viewed", "page viewed", "visit", "visitor"],
|
|
2411
|
+
// Never sent anywhere: every platform already counts its own page views,
|
|
2412
|
+
// and uploading a view as a conversion would teach it to optimise for
|
|
2413
|
+
// nothing.
|
|
2414
|
+
platformDefaults: {}
|
|
2676
2415
|
},
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2416
|
+
{
|
|
2417
|
+
key: "lead",
|
|
2418
|
+
displayName: "Lead",
|
|
2419
|
+
meaning: "Someone left their details \u2014 the starting point of most journeys",
|
|
2420
|
+
stepClass: "lead",
|
|
2421
|
+
aliases: ["lead", "new lead", "inbound lead", "enquiry", "inquiry", "form submission"],
|
|
2422
|
+
platformDefaults: {
|
|
2423
|
+
meta: { eventName: "Lead", standard: true },
|
|
2424
|
+
googleAds: { category: "Submit lead form" },
|
|
2425
|
+
linkedin: { type: "LEAD", verified: true }
|
|
2426
|
+
}
|
|
2681
2427
|
},
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2428
|
+
{
|
|
2429
|
+
key: "signed_up",
|
|
2430
|
+
displayName: "Signed up",
|
|
2431
|
+
meaning: "Someone created an account",
|
|
2432
|
+
stepClass: "lead",
|
|
2433
|
+
classNote: "Same fact as a lead reached a different way \u2014 we now know who they are.",
|
|
2434
|
+
aliases: ["signed up", "sign up", "registered", "registration", "account created", "new user"],
|
|
2435
|
+
platformDefaults: {
|
|
2436
|
+
meta: { eventName: "CompleteRegistration", standard: true },
|
|
2437
|
+
googleAds: { category: "Sign-up" },
|
|
2438
|
+
linkedin: { type: "SIGN_UP", verified: true }
|
|
2439
|
+
}
|
|
2685
2440
|
},
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2441
|
+
{
|
|
2442
|
+
key: "add_to_cart",
|
|
2443
|
+
displayName: "Added to cart",
|
|
2444
|
+
meaning: "Something went into the cart",
|
|
2445
|
+
stepClass: "engaged",
|
|
2446
|
+
aliases: ["added to cart", "add to cart", "cart"],
|
|
2447
|
+
platformDefaults: {
|
|
2448
|
+
meta: { eventName: "AddToCart", standard: true },
|
|
2449
|
+
googleAds: { category: "Add to cart" },
|
|
2450
|
+
linkedin: { type: "ADD_TO_CART", verified: true }
|
|
2451
|
+
}
|
|
2689
2452
|
},
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2453
|
+
{
|
|
2454
|
+
key: "checkout_started",
|
|
2455
|
+
displayName: "Started checkout",
|
|
2456
|
+
meaning: "The checkout began",
|
|
2457
|
+
stepClass: "engaged",
|
|
2458
|
+
aliases: ["started checkout", "checkout started", "checkout", "begin checkout"],
|
|
2459
|
+
platformDefaults: {
|
|
2460
|
+
meta: { eventName: "InitiateCheckout", standard: true },
|
|
2461
|
+
googleAds: { category: "Begin checkout" },
|
|
2462
|
+
// Written from the documentation and never checked against the live
|
|
2463
|
+
// enum, which is what `verified: false` is for — carried as a caveat
|
|
2464
|
+
// rather than quietly resolved.
|
|
2465
|
+
linkedin: { type: "START_CHECKOUT", verified: false, fallback: "OTHER" }
|
|
2466
|
+
}
|
|
2694
2467
|
},
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2468
|
+
{
|
|
2469
|
+
key: "trial_started",
|
|
2470
|
+
displayName: "Trial started",
|
|
2471
|
+
meaning: "A free trial began",
|
|
2472
|
+
stepClass: "engaged",
|
|
2473
|
+
classNote: "A trial is use, not payment \u2014 engaged, never customer.",
|
|
2474
|
+
aliases: ["trial", "trial started", "free trial", "in trial"],
|
|
2475
|
+
platformDefaults: {
|
|
2476
|
+
meta: { eventName: "StartTrial", standard: true },
|
|
2477
|
+
googleAds: { category: "Sign-up" },
|
|
2478
|
+
linkedin: { type: "OTHER", verified: true }
|
|
2479
|
+
}
|
|
2698
2480
|
},
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2481
|
+
{
|
|
2482
|
+
key: "qualified_lead",
|
|
2483
|
+
displayName: "Qualified lead",
|
|
2484
|
+
meaning: "The lead matches who you sell to",
|
|
2485
|
+
stepClass: "engaged",
|
|
2486
|
+
aliases: ["qualified lead", "qualified", "mql", "sql", "sales qualified lead", "marketing qualified lead"],
|
|
2487
|
+
platformDefaults: {
|
|
2488
|
+
meta: { eventName: "QualifiedLead", standard: false },
|
|
2489
|
+
googleAds: { category: "Qualified lead" },
|
|
2490
|
+
linkedin: { type: "QUALIFIED_LEAD", verified: true }
|
|
2491
|
+
}
|
|
2703
2492
|
},
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2493
|
+
{
|
|
2494
|
+
key: "contacted",
|
|
2495
|
+
displayName: "Contacted",
|
|
2496
|
+
meaning: "Your team reached out",
|
|
2497
|
+
stepClass: "engaged",
|
|
2498
|
+
classNote: "Engaged even though the move came from the seller: it is a real forward interaction.",
|
|
2499
|
+
aliases: ["contacted", "contact", "outreach", "follow up", "first contact", "attempting contact"],
|
|
2500
|
+
platformDefaults: {
|
|
2501
|
+
meta: { eventName: "Contact", standard: true },
|
|
2502
|
+
googleAds: { category: "Contact" },
|
|
2503
|
+
linkedin: { type: "CONTACT", verified: true }
|
|
2504
|
+
}
|
|
2707
2505
|
},
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2506
|
+
{
|
|
2507
|
+
key: "meeting_scheduled",
|
|
2508
|
+
displayName: "Meeting booked",
|
|
2509
|
+
meaning: "A meeting is on the calendar",
|
|
2510
|
+
stepClass: "engaged",
|
|
2511
|
+
aliases: [
|
|
2512
|
+
"meeting booked",
|
|
2513
|
+
"meeting scheduled",
|
|
2514
|
+
"demo scheduled",
|
|
2515
|
+
"demo booked",
|
|
2516
|
+
"appointment booked",
|
|
2517
|
+
"call booked"
|
|
2518
|
+
],
|
|
2519
|
+
platformDefaults: {
|
|
2520
|
+
meta: { eventName: "Schedule", standard: true },
|
|
2521
|
+
googleAds: { category: "Book appointment" },
|
|
2522
|
+
// LinkedIn has SCHEDULE and BOOK_APPOINTMENT separately; the second is the
|
|
2523
|
+
// one that means a reservation.
|
|
2524
|
+
linkedin: { type: "BOOK_APPOINTMENT", verified: true }
|
|
2525
|
+
}
|
|
2712
2526
|
},
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2527
|
+
{
|
|
2528
|
+
key: "meeting_held",
|
|
2529
|
+
displayName: "Meeting held",
|
|
2530
|
+
meaning: "The meeting actually happened \u2014 kept apart from booking because no-show is a real number",
|
|
2531
|
+
stepClass: "engaged",
|
|
2532
|
+
aliases: ["meeting held", "meeting done", "demo held", "demo done", "demo completed", "call held"],
|
|
2533
|
+
platformDefaults: {
|
|
2534
|
+
meta: { eventName: "MeetingHeld", standard: false },
|
|
2535
|
+
googleAds: { category: "Other" },
|
|
2536
|
+
linkedin: { type: "OTHER", verified: true }
|
|
2537
|
+
}
|
|
2717
2538
|
},
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2539
|
+
{
|
|
2540
|
+
key: "opportunity",
|
|
2541
|
+
displayName: "Opportunity open",
|
|
2542
|
+
meaning: "A deal is open \u2014 send the estimated value if you have one",
|
|
2543
|
+
stepClass: "engaged",
|
|
2544
|
+
classNote: "A number behind an intention is still no money, so engaged rather than customer.",
|
|
2545
|
+
aliases: ["opportunity", "proposal sent", "proposal", "negotiation", "in negotiation", "quote sent", "deal open"],
|
|
2546
|
+
platformDefaults: {
|
|
2547
|
+
meta: { eventName: "Opportunity", standard: false },
|
|
2548
|
+
googleAds: { category: "Request quote" },
|
|
2549
|
+
linkedin: { type: "REQUEST_QUOTE", verified: true }
|
|
2550
|
+
}
|
|
2722
2551
|
},
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2552
|
+
{
|
|
2553
|
+
key: "won",
|
|
2554
|
+
displayName: "Deal won",
|
|
2555
|
+
meaning: "The deal closed \u2014 the amount is required here",
|
|
2556
|
+
stepClass: "customer",
|
|
2557
|
+
aliases: ["won", "closed won", "deal won", "purchase", "sale"],
|
|
2558
|
+
platformDefaults: {
|
|
2559
|
+
meta: { eventName: "Purchase", standard: true },
|
|
2560
|
+
// Which of the two depends on whether the company reports a revenue
|
|
2561
|
+
// amount. It is a per-company answer, so it stays a fork, not a constant.
|
|
2562
|
+
googleAds: { category: "Purchase", alternative: "Converted lead" },
|
|
2563
|
+
linkedin: { type: "PURCHASE", verified: true }
|
|
2564
|
+
}
|
|
2726
2565
|
},
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2566
|
+
{
|
|
2567
|
+
key: "subscribed",
|
|
2568
|
+
displayName: "Subscription started",
|
|
2569
|
+
meaning: "A paying subscription began \u2014 the amount is the recurring one",
|
|
2570
|
+
stepClass: "customer",
|
|
2571
|
+
classNote: "Customer, not repeat: it is the first money. Repeat is what happens after \u2014 see the renewed template.",
|
|
2572
|
+
aliases: ["subscribed", "subscription started", "new subscription", "paying"],
|
|
2573
|
+
platformDefaults: {
|
|
2574
|
+
meta: { eventName: "Subscribe", standard: true },
|
|
2575
|
+
googleAds: { category: "Purchase" },
|
|
2576
|
+
linkedin: { type: "PURCHASE", verified: true }
|
|
2577
|
+
}
|
|
2730
2578
|
},
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2579
|
+
{
|
|
2580
|
+
key: "renewed",
|
|
2581
|
+
displayName: "Subscription renewed",
|
|
2582
|
+
meaning: "An existing customer paid again or expanded \u2014 the amount is what they paid this time",
|
|
2583
|
+
stepClass: "repeat",
|
|
2584
|
+
classNote: "The smallest honest member of `repeat`. Without it every SaaS funnel drawn from this library ends at `subscribed` and the stage has nothing to hold. The recurring lifecycle beyond renewal \u2014 upgrades, churn, refunds \u2014 is a bigger conversation than a template.",
|
|
2585
|
+
aliases: ["renewed", "renewal", "subscription renewed", "expansion", "upsell"],
|
|
2586
|
+
platformDefaults: {
|
|
2587
|
+
meta: { eventName: "Renewed", standard: false },
|
|
2588
|
+
googleAds: { category: "Purchase" },
|
|
2589
|
+
linkedin: { type: "PURCHASE", verified: true }
|
|
2590
|
+
}
|
|
2734
2591
|
},
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2592
|
+
{
|
|
2593
|
+
key: "application_submitted",
|
|
2594
|
+
displayName: "Application submitted",
|
|
2595
|
+
meaning: "Someone submitted an application \u2014 a course, a policy, a credit line",
|
|
2596
|
+
stepClass: "engaged",
|
|
2597
|
+
classNote: "For education, events, fintech and insurance. Strong intent, no money yet.",
|
|
2598
|
+
aliases: ["application submitted", "application", "applied", "application received"],
|
|
2599
|
+
platformDefaults: {
|
|
2600
|
+
meta: { eventName: "SubmitApplication", standard: true },
|
|
2601
|
+
googleAds: { category: "Submit lead form" },
|
|
2602
|
+
linkedin: { type: "SUBMIT_APPLICATION", verified: true }
|
|
2603
|
+
}
|
|
2738
2604
|
},
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2605
|
+
{
|
|
2606
|
+
key: "lost",
|
|
2607
|
+
displayName: "Lost",
|
|
2608
|
+
meaning: "It did not go ahead \u2014 the deal fell through, or the lead was never a fit",
|
|
2609
|
+
stepClass: "lost",
|
|
2610
|
+
classNote: "Terminal and never sent anywhere. It can happen at any depth, which is why the order check leaves it alone.",
|
|
2611
|
+
aliases: [
|
|
2612
|
+
"lost",
|
|
2613
|
+
"closed lost",
|
|
2614
|
+
"deal lost",
|
|
2615
|
+
"no budget",
|
|
2616
|
+
"not interested",
|
|
2617
|
+
"disqualified",
|
|
2618
|
+
"unqualified",
|
|
2619
|
+
"not a fit",
|
|
2620
|
+
"spam",
|
|
2621
|
+
"duplicate",
|
|
2622
|
+
"junk"
|
|
2623
|
+
],
|
|
2624
|
+
platformDefaults: {}
|
|
2742
2625
|
}
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2626
|
+
];
|
|
2627
|
+
var TEMPLATES_BY_KEY = new Map(
|
|
2628
|
+
FUNNEL_STEP_TEMPLATES.map((template) => [template.key, template])
|
|
2629
|
+
);
|
|
2630
|
+
var FUNNEL_VERTICALS = [
|
|
2631
|
+
"b2b_sales",
|
|
2632
|
+
"b2b_inbound",
|
|
2633
|
+
"saas_self_serve",
|
|
2634
|
+
"saas_sales_assisted",
|
|
2635
|
+
"ecommerce_purchase"
|
|
2636
|
+
];
|
|
2747
2637
|
|
|
2748
|
-
// ../api/src/
|
|
2749
|
-
var
|
|
2750
|
-
|
|
2751
|
-
"
|
|
2752
|
-
|
|
2753
|
-
"
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
return row.eventType === "form_trigger" && SUBMIT_TRIGGERS.has(row.triggerId);
|
|
2764
|
-
}
|
|
2638
|
+
// ../api/src/funnel/vocabulary.ts
|
|
2639
|
+
var FUNNEL_STEP_CLASSES = [
|
|
2640
|
+
/** Saw the offer: a landing opened, an ad clicked through. */
|
|
2641
|
+
"visited",
|
|
2642
|
+
/** We know who they are: a form sent, an account created. */
|
|
2643
|
+
"lead",
|
|
2644
|
+
/** Something real happened: a call booked, a trial started, a quote asked for, a cart filled. */
|
|
2645
|
+
"engaged",
|
|
2646
|
+
/** Paid, or signed. */
|
|
2647
|
+
"customer",
|
|
2648
|
+
/** Paid again, renewed, or grew. */
|
|
2649
|
+
"repeat",
|
|
2650
|
+
/** Terminal. Did not go ahead, or was never a fit. */
|
|
2651
|
+
"lost"
|
|
2652
|
+
];
|
|
2765
2653
|
|
|
2766
|
-
// ../api/src/
|
|
2767
|
-
var
|
|
2768
|
-
var
|
|
2769
|
-
var
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
for
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2654
|
+
// ../api/src/funnel/wire.ts
|
|
2655
|
+
var MAX_STEPS = 40;
|
|
2656
|
+
var MAX_PER_STEP = 20;
|
|
2657
|
+
var funnelTriggerSchema = z3.discriminatedUnion("kind", [
|
|
2658
|
+
z3.object({
|
|
2659
|
+
id: z3.string().min(1).max(64),
|
|
2660
|
+
kind: z3.literal("event"),
|
|
2661
|
+
/** The event's key, from `--moments`: `form:…`, `submit:…`, `page:…`, `exit:…`. */
|
|
2662
|
+
eventKey: z3.string().min(1).max(320)
|
|
2663
|
+
}),
|
|
2664
|
+
z3.object({
|
|
2665
|
+
id: z3.string().min(1).max(64),
|
|
2666
|
+
kind: z3.literal("landing"),
|
|
2667
|
+
/** The landing's internal id — what the page stamps on its rows, never its slug. */
|
|
2668
|
+
landingId: z3.string().min(1).max(120)
|
|
2669
|
+
}),
|
|
2670
|
+
/** Any landing being viewed — what a funnel's first step usually listens for. */
|
|
2671
|
+
z3.object({
|
|
2672
|
+
id: z3.string().min(1).max(64),
|
|
2673
|
+
kind: z3.literal("any_landing")
|
|
2674
|
+
})
|
|
2675
|
+
]);
|
|
2676
|
+
var funnelStepSchema = z3.object({
|
|
2677
|
+
/** Lowercase letters, digits and underscores. Stable — renaming never changes it. */
|
|
2678
|
+
key: z3.string().min(1).max(64),
|
|
2679
|
+
/** The client's own words for this step. Shown everywhere; unconstrained. */
|
|
2680
|
+
displayName: z3.string().min(1).max(120),
|
|
2681
|
+
stepClass: z3.enum(FUNNEL_STEP_CLASSES),
|
|
2682
|
+
/** Predecessor keys. Empty means people come in here. */
|
|
2683
|
+
after: z3.array(z3.string().max(64)).max(MAX_STEPS).default([]),
|
|
2684
|
+
/** What moves somebody onto this step. Any one of them is enough. */
|
|
2685
|
+
triggers: z3.array(funnelTriggerSchema).max(MAX_PER_STEP).default([])
|
|
2686
|
+
});
|
|
2687
|
+
var funnelRequestSchema = z3.object({
|
|
2688
|
+
steps: z3.array(funnelStepSchema).max(MAX_STEPS).optional(),
|
|
2689
|
+
/** One step, added or replaced by its key. Everything else is untouched. */
|
|
2690
|
+
step: funnelStepSchema.optional(),
|
|
2691
|
+
/** One step taken out by key; whatever came after it moves up to whatever came before it. */
|
|
2692
|
+
removeStep: z3.string().min(1).max(64).optional(),
|
|
2693
|
+
/**
|
|
2694
|
+
* ONE way in added to a step, leaving the rest of that step alone.
|
|
2695
|
+
*
|
|
2696
|
+
* `step` takes a whole step, so adding a way in through it means restating
|
|
2697
|
+
* the step's name, stage, `after[]` and every trigger it already had — and a
|
|
2698
|
+
* trigger left out of that restatement is silently removed. This is the door
|
|
2699
|
+
* for the thing that is actually being asked ("this Form's booking should
|
|
2700
|
+
* count here"), and it cannot drop anything.
|
|
2701
|
+
*/
|
|
2702
|
+
addTrigger: z3.object({ stepKey: z3.string().min(1).max(64), eventKey: z3.string().min(1).max(320) }).optional(),
|
|
2703
|
+
/** ONE way in taken off a step, by the event key it listens for. */
|
|
2704
|
+
removeTrigger: z3.object({ stepKey: z3.string().min(1).max(64), eventKey: z3.string().min(1).max(320) }).optional(),
|
|
2705
|
+
/** One of the ready-made graphs, instead of stating steps. */
|
|
2706
|
+
preset: z3.enum(FUNNEL_VERTICALS).optional(),
|
|
2707
|
+
/** Also return the suggestion library and the presets. */
|
|
2708
|
+
templates: z3.boolean().optional(),
|
|
2709
|
+
/**
|
|
2710
|
+
* Also return everything a trigger can name: every event this company's
|
|
2711
|
+
* Forms, pages and systems have actually produced, its sources, and its
|
|
2712
|
+
* landings. The list to pick a trigger FROM, so nobody has to guess.
|
|
2713
|
+
*/
|
|
2714
|
+
moments: z3.boolean().optional(),
|
|
2715
|
+
/** How many days the counts beside each step cover. Default 30. */
|
|
2716
|
+
days: z3.number().int().min(1).max(400).optional(),
|
|
2717
|
+
/**
|
|
2718
|
+
* The Forms, by slug, the caller names itself when no step counts them —
|
|
2719
|
+
* `baker funnel` reads its own workspace and names each with the key that
|
|
2720
|
+
* places it. The backend leaves them out of its own hint, so no Form is
|
|
2721
|
+
* named twice.
|
|
2722
|
+
*/
|
|
2723
|
+
namedByCaller: z3.array(z3.string().min(1).max(200)).max(1e3).optional()
|
|
2724
|
+
});
|
|
2725
|
+
var funnelResponseSchema = z3.object({
|
|
2726
|
+
ok: z3.literal(true),
|
|
2727
|
+
data: z3.object({
|
|
2728
|
+
/** The published version, or 0 when this company has never drawn a funnel. */
|
|
2729
|
+
version: z3.number(),
|
|
2730
|
+
/** Whether `steps` is a proposal waiting on this chat's publish rather than what is live. */
|
|
2731
|
+
staged: z3.boolean(),
|
|
2732
|
+
steps: z3.array(
|
|
2733
|
+
z3.object({
|
|
2734
|
+
key: z3.string(),
|
|
2735
|
+
displayName: z3.string(),
|
|
2736
|
+
stepClass: z3.string(),
|
|
2737
|
+
after: z3.array(z3.string()),
|
|
2738
|
+
triggers: z3.array(z3.record(z3.string(), z3.unknown())),
|
|
2739
|
+
/**
|
|
2740
|
+
* Where the people who reach this step are sent: the sends of every
|
|
2741
|
+
* system event among its triggers. Read-only here — a send belongs to
|
|
2742
|
+
* the event and is set with `baker analytics sends`.
|
|
2743
|
+
*/
|
|
2744
|
+
sends: z3.array(
|
|
2745
|
+
z3.object({
|
|
2746
|
+
id: z3.string(),
|
|
2747
|
+
eventKey: z3.string(),
|
|
2748
|
+
platform: z3.string(),
|
|
2749
|
+
event: z3.string(),
|
|
2750
|
+
/** What happened to it in the window, in one line. */
|
|
2751
|
+
outcome: z3.string().optional()
|
|
2752
|
+
})
|
|
2753
|
+
),
|
|
2754
|
+
/** How many people reached this step in the window. Counted in people, across visits and devices. */
|
|
2755
|
+
people: z3.number().optional(),
|
|
2756
|
+
/** How many reached this step or any step after it. */
|
|
2757
|
+
atLeast: z3.number().optional(),
|
|
2758
|
+
/** How many got as far as the step before it. Absent for a way in. */
|
|
2759
|
+
before: z3.number().optional(),
|
|
2760
|
+
/** `atLeast / before`, 0–1. Absent where there is no before. */
|
|
2761
|
+
share: z3.number().optional(),
|
|
2762
|
+
events: z3.number().optional(),
|
|
2763
|
+
money: z3.record(z3.string(), z3.number()).optional()
|
|
2764
|
+
})
|
|
2765
|
+
),
|
|
2766
|
+
/** The window `people` and friends were counted over. */
|
|
2767
|
+
window: z3.object({ startDate: z3.string(), endDate: z3.string(), days: z3.number() }).optional(),
|
|
2768
|
+
/** The step that loses the most people, by key. Absent while nothing is lost. */
|
|
2769
|
+
worstStep: z3.string().optional(),
|
|
2770
|
+
/**
|
|
2771
|
+
* The steps this write took off the funnel, by key. Present on every write,
|
|
2772
|
+
* empty when nothing was dropped — the answer to "did my restatement forget
|
|
2773
|
+
* one", given in the same turn.
|
|
2774
|
+
*/
|
|
2775
|
+
removed: z3.array(z3.string()).optional(),
|
|
2776
|
+
/**
|
|
2777
|
+
* What this company counts as page conversions, this chat's staged counts
|
|
2778
|
+
* included, by event key and name. Here so a Form's ending can say it is
|
|
2779
|
+
* already counted — the agent choosing a step's way in should use that
|
|
2780
|
+
* same key — and outside `moments` because the plain read's hints say it too.
|
|
2781
|
+
*/
|
|
2782
|
+
counted: z3.array(z3.object({ eventKey: z3.string(), name: z3.string() })).optional(),
|
|
2783
|
+
/** Everything a trigger can name, when asked for with `moments`. */
|
|
2784
|
+
moments: z3.object({
|
|
2785
|
+
events: z3.array(
|
|
2786
|
+
z3.object({
|
|
2787
|
+
eventKey: z3.string(),
|
|
2788
|
+
/** `site` for a page or Form, `systems` for the client's own server, `both` when both sent it. */
|
|
2789
|
+
origin: z3.string().optional(),
|
|
2790
|
+
/** The Form it belongs to, when it belongs to one. */
|
|
2791
|
+
flowSlug: z3.string().optional(),
|
|
2792
|
+
nodeType: z3.string().optional(),
|
|
2793
|
+
events: z3.number(),
|
|
2794
|
+
sessions: z3.number(),
|
|
2795
|
+
/** The name it is counted under as a page conversion, when the company counts it. Informational. */
|
|
2796
|
+
countedAs: z3.string().optional(),
|
|
2797
|
+
/**
|
|
2798
|
+
* The step of the Form this happens on, in the Form's own words —
|
|
2799
|
+
* never a node id. Present on a Form's ending read from the Form
|
|
2800
|
+
* itself, which is the only place the name is known.
|
|
2801
|
+
*/
|
|
2802
|
+
step: z3.string().optional(),
|
|
2803
|
+
/**
|
|
2804
|
+
* `false` on an ending a Form raises natively but nobody has fired
|
|
2805
|
+
* yet — derived from the Form, offered at zero, exactly as a
|
|
2806
|
+
* Source is offered before its first send. Absent means it came
|
|
2807
|
+
* from the event store and therefore happened.
|
|
2808
|
+
*/
|
|
2809
|
+
seen: z3.boolean().optional()
|
|
2810
|
+
})
|
|
2811
|
+
),
|
|
2812
|
+
/** The company's sources: a system of theirs that posts events to Baker, by the event name it raises. */
|
|
2813
|
+
sources: z3.array(z3.object({ eventKey: z3.string(), name: z3.string(), status: z3.string() })),
|
|
2814
|
+
landings: z3.array(z3.object({ landingId: z3.string(), title: z3.string(), slug: z3.string() }))
|
|
2815
|
+
}).optional(),
|
|
2816
|
+
templates: z3.array(
|
|
2817
|
+
z3.object({
|
|
2818
|
+
key: z3.string(),
|
|
2819
|
+
displayName: z3.string(),
|
|
2820
|
+
meaning: z3.string(),
|
|
2821
|
+
stepClass: z3.string()
|
|
2822
|
+
})
|
|
2823
|
+
).optional(),
|
|
2824
|
+
presets: z3.array(z3.object({ vertical: z3.string(), label: z3.string(), description: z3.string(), steps: z3.array(z3.string()) })).optional(),
|
|
2825
|
+
/**
|
|
2826
|
+
* What each stage means, the test to apply, and the same stage in three
|
|
2827
|
+
* shapes of business.
|
|
2828
|
+
*
|
|
2829
|
+
* The stage is the one thing in a funnel a company does not invent, so it
|
|
2830
|
+
* is the one thing the agent has to get right on the company's behalf —
|
|
2831
|
+
* and "engaged: did something real" cannot settle whether a trial is
|
|
2832
|
+
* engaged or customer. Same source as the dashboard's stage picker, so the
|
|
2833
|
+
* two cannot teach it differently.
|
|
2834
|
+
*/
|
|
2835
|
+
stages: z3.array(
|
|
2836
|
+
z3.object({
|
|
2837
|
+
stepClass: z3.string(),
|
|
2838
|
+
title: z3.string(),
|
|
2839
|
+
meaning: z3.string(),
|
|
2840
|
+
test: z3.string(),
|
|
2841
|
+
examples: z3.object({ shop: z3.string(), selfServe: z3.string(), salesLed: z3.string() })
|
|
2842
|
+
})
|
|
2843
|
+
).optional()
|
|
2844
|
+
}),
|
|
2845
|
+
hints: z3.array(z3.string()).optional()
|
|
2846
|
+
});
|
|
2804
2847
|
|
|
2805
|
-
// ../api/src/analytics/
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
var
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2848
|
+
// ../api/src/analytics/trackingPlan.ts
|
|
2849
|
+
var text = z4.string().trim().min(1).max(2e3);
|
|
2850
|
+
var key = z4.string().trim().min(1).max(100);
|
|
2851
|
+
var webUrl = z4.url().refine((value) => ["https:", "http:"].includes(new URL(value).protocol), "Use a website address");
|
|
2852
|
+
var trackingEventSchema = z4.object({
|
|
2853
|
+
eventKey: key.refine((value) => parseEventKey(value) !== null, "Use an existing Baker event key"),
|
|
2854
|
+
name: text,
|
|
2855
|
+
purpose: z4.enum(["conversion", "progress", "diagnostic", "uncounted"]),
|
|
2856
|
+
door: z4.enum(ANALYTICS_EVENT_DOORS),
|
|
2857
|
+
sourceEvent: key.optional(),
|
|
2858
|
+
emitterEvidence: text.optional(),
|
|
2859
|
+
status: z4.enum(["prepared", "waiting", "published", "verified"]),
|
|
2860
|
+
requirement: text.optional(),
|
|
2861
|
+
owner: text.optional(),
|
|
2862
|
+
verificationEvidence: text.optional()
|
|
2863
|
+
}).superRefine((event, ctx) => {
|
|
2864
|
+
if (event.status === "waiting") {
|
|
2865
|
+
if (!event.requirement || !event.owner) ctx.addIssue({ code: "custom", message: "A waiting event needs its requirement and owner" });
|
|
2866
|
+
} else if (!event.emitterEvidence) {
|
|
2867
|
+
ctx.addIssue({ code: "custom", message: "A prepared event needs evidence that the source emits it" });
|
|
2813
2868
|
}
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
const roles = {};
|
|
2817
|
-
for (const dimension of AD_PLATFORM_DEFINITIONS[platform].dimensions) {
|
|
2818
|
-
roles[placeholderKey(dimension.macro)] = dimension.role;
|
|
2819
|
-
}
|
|
2820
|
-
return { ...roles, ...EXTRA_PLACEHOLDER_ROLES[platform] ?? {} };
|
|
2821
|
-
}
|
|
2822
|
-
function paramsFromTemplate(template) {
|
|
2823
|
-
const start = template.indexOf("?");
|
|
2824
|
-
const query = start === -1 ? template : template.slice(start + 1);
|
|
2825
|
-
const params = [];
|
|
2826
|
-
for (const pair of query.split("&")) {
|
|
2827
|
-
const at = pair.indexOf("=");
|
|
2828
|
-
if (at < 1) continue;
|
|
2829
|
-
const name = pair.slice(0, at).trim();
|
|
2830
|
-
if (name === "") continue;
|
|
2831
|
-
params.push({ name, value: pair.slice(at + 1).trim() });
|
|
2869
|
+
if (["published", "verified"].includes(event.status) && !event.verificationEvidence) {
|
|
2870
|
+
ctx.addIssue({ code: "custom", message: "Published or verified tracking needs evidence; a staged tag is only prepared" });
|
|
2832
2871
|
}
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2872
|
+
});
|
|
2873
|
+
var trackingJourneySchema = z4.object({
|
|
2874
|
+
key,
|
|
2875
|
+
name: text,
|
|
2876
|
+
entryUrls: z4.array(webUrl).max(50),
|
|
2877
|
+
destinationUrl: webUrl,
|
|
2878
|
+
strategy: z4.enum(["native", "embed", "api", "link"]),
|
|
2879
|
+
status: z4.enum(["supported", "waiting"]),
|
|
2880
|
+
requiredFields: z4.array(key).max(100),
|
|
2881
|
+
attribution: text,
|
|
2882
|
+
acceptanceEvidence: text.optional(),
|
|
2883
|
+
continuationEvidence: text.optional(),
|
|
2884
|
+
requirement: text.optional(),
|
|
2885
|
+
owner: text.optional()
|
|
2886
|
+
}).superRefine((journey, ctx) => {
|
|
2887
|
+
if (journey.strategy === "link" && journey.requiredFields.length > 0) ctx.addIssue({ code: "custom", message: "A link handoff must not capture details that the destination asks for again" });
|
|
2888
|
+
if (journey.status === "waiting" && (!journey.requirement || !journey.owner)) ctx.addIssue({ code: "custom", message: "A waiting journey needs its requirement and owner" });
|
|
2889
|
+
if (journey.status === "supported" && journey.strategy === "api" && (!journey.acceptanceEvidence || !journey.continuationEvidence)) ctx.addIssue({ code: "custom", message: "An API replacement needs accepted-submission and continuation evidence" });
|
|
2890
|
+
});
|
|
2891
|
+
var trackingPlanSchema = z4.object({
|
|
2892
|
+
journeys: z4.array(trackingJourneySchema).max(30),
|
|
2893
|
+
events: z4.array(trackingEventSchema).max(100)
|
|
2894
|
+
}).superRefine((plan, ctx) => {
|
|
2895
|
+
for (const entries of [plan.journeys.map((journey) => journey.key), plan.events.map((event) => event.eventKey)]) {
|
|
2896
|
+
if (new Set(entries).size !== entries.length) ctx.addIssue({ code: "custom", message: "Each journey and event must appear once" });
|
|
2849
2897
|
}
|
|
2850
|
-
|
|
2851
|
-
}
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2898
|
+
});
|
|
2899
|
+
var variableName = z4.string().trim().min(1).max(200).refine((value) => !/[{}<>"'\\\r\n]/.test(value), "Use a plain container variable name");
|
|
2900
|
+
var trackingInstallationSchema = z4.object({
|
|
2901
|
+
containerId: key,
|
|
2902
|
+
baseTagName: key,
|
|
2903
|
+
folderId: key.optional(),
|
|
2904
|
+
consent: z4.enum(["auto", "strict"]).default("auto"),
|
|
2905
|
+
measure: z4.enum(["campaigns", "outcomes", "all"]).default("campaigns"),
|
|
2906
|
+
events: z4.array(z4.object({
|
|
2907
|
+
eventKey: key.refine((value) => parseEventKey(value) !== null, "Use an existing Baker event key"),
|
|
2908
|
+
tagName: key,
|
|
2909
|
+
triggerId: key,
|
|
2910
|
+
properties: z4.record(key, variableName).default({}),
|
|
2911
|
+
eventIdVariable: variableName.optional()
|
|
2912
|
+
})).max(50)
|
|
2913
|
+
});
|
|
2914
|
+
var trackingPlanRequestSchema = z4.object({ chatId: z4.string().optional(), plan: trackingPlanSchema.optional(), wireConversions: z4.boolean().default(false), steps: z4.array(funnelStepSchema).max(30).optional(), installation: trackingInstallationSchema.optional() }).superRefine((request, ctx) => {
|
|
2915
|
+
if (!request.plan && (request.installation || request.wireConversions || request.steps)) ctx.addIssue({ code: "custom", message: "Preparation needs the agreed tracking plan" });
|
|
2916
|
+
});
|
|
2917
|
+
var trackingPlanResponseSchema = z4.object({ ok: z4.literal(true), data: z4.object({ plan: trackingPlanSchema.nullable(), staged: z4.boolean() }), hints: z4.array(z4.string()).optional() });
|
|
2857
2918
|
|
|
2858
2919
|
export {
|
|
2920
|
+
formEventKey,
|
|
2921
|
+
isLandingViewKey,
|
|
2922
|
+
parseEventKey,
|
|
2923
|
+
FUNNEL_VERTICALS,
|
|
2924
|
+
funnelRequestSchema,
|
|
2859
2925
|
AD_PARAM_ROLE_SPECS,
|
|
2926
|
+
RESERVED_PARAM_NAMES,
|
|
2860
2927
|
isAdPlatform,
|
|
2928
|
+
AD_PLATFORM_DEFINITIONS,
|
|
2861
2929
|
essentialAdDimensions,
|
|
2862
|
-
|
|
2863
|
-
ANALYTICS_BUSY_FIX,
|
|
2864
|
-
findNameCollision,
|
|
2865
|
-
STANDARD_CONVERSION_NAMES,
|
|
2930
|
+
builtinAdParamMapping,
|
|
2866
2931
|
CONVERSION_COUNT_MODES,
|
|
2867
|
-
|
|
2868
|
-
isLandingViewKey,
|
|
2869
|
-
parseEventKey,
|
|
2870
|
-
SEND_PLATFORMS,
|
|
2871
|
-
isSendPlatform,
|
|
2872
|
-
sendEventProblem,
|
|
2873
|
-
destinationName,
|
|
2874
|
-
isBookkeepingRow,
|
|
2875
|
-
rowMatchKeys,
|
|
2932
|
+
STEP_SUBMIT_TRIGGERS,
|
|
2876
2933
|
PEOPLE_SEARCH_MAX_TERMS,
|
|
2877
2934
|
parsePeopleQuery,
|
|
2878
2935
|
peopleLookupRequestSchema,
|
|
2879
|
-
sendsRequestSchema,
|
|
2880
|
-
proposeMappingFromTemplate,
|
|
2881
|
-
mappingCommandFor,
|
|
2882
|
-
ANALYTICS_UNSTAGE_KINDS,
|
|
2883
2936
|
SEND_FILTERS,
|
|
2884
|
-
ANALYTICS_EVENT_DOORS
|
|
2937
|
+
ANALYTICS_EVENT_DOORS,
|
|
2938
|
+
trackingPlanSchema,
|
|
2939
|
+
trackingPlanRequestSchema,
|
|
2940
|
+
trackingPlanResponseSchema
|
|
2885
2941
|
};
|
|
2886
|
-
//# sourceMappingURL=chunk-
|
|
2942
|
+
//# sourceMappingURL=chunk-HR6IWNKE.js.map
|