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