PageSourceSearch

https://app.campaignhq.co/_next/static/chunks/pages/data-management/user-events-68084b8d2cd9d603.js

js campaignhq.co collected 2026-09-24 09:43:31 UTC 13,184 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2844],{89500:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-management/user-events",function(){return a(13504)}])},33425:function(e,t,a){"use strict";a.d(t,{Z:function(){return Tab}});var s=a(85893),r=a(41664),n=a.n(r),i=a(11163);function Tab(e){let{tabs:t=[],className:a="",RightChild:r}=e,l=(0,i.useRouter)(),isTabActive=e=>{if(e.activePathPrefix){let t=l.asPath.split("?")[0],a=e.activePathPrefix;return t===a||t.startsWith(`${a}/`)}let t=e.href;return"object"==typeof t?t.pathname==l.pathname&&JSON.stringify(Object.values(l.query))==JSON.stringify(Object.values(t.query)):l.asPath.includes(t)};if(0!=t.length)return(0,s.jsxs)("div",{className:a,children:[(0,s.jsx)("div",{className:"sm:hidden",children:(0,s.jsx)("label",{htmlFor:"tabs",className:"sr-only",children:"Select a tab"})}),(0,s.jsx)("div",{className:"hidden sm:block",children:(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-200",children:[(0,s.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:t.map(e=>(0,s.jsx)(n(),{href:e.href,className:function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter(Boolean).join(" ")}(isTabActive(e)?"border-indigo-500 text-indigo-600":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700","whitespace-nowrap border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":isTabActive(e)?"page":void 0,children:e.name},e.name))}),r?(0,s.jsx)(r,{}):""]})})]})}a(67294)},90406:function(e,t,a){"use strict";a.d(t,{q:function(){return DataManagementLayout}});var s=a(85893),r=a(5447),n=a(33425),i=a(11163),l=a(41664),c=a.n(l),m=a(89618),d=a(17524);function DataManagementLayout(e){let{children:t}=e,a=(0,i.useRouter)(),l=[{name:"User Imports",href:"/data-management/user-imports",current:a.pathname.includes("/user-imports")},{name:"User attributes",href:"/data-management/user-attributes",current:a.pathname.includes("/user-attributes")},{name:"User events",href:"/data-management/user-events",current:a.pathname.includes("/user-events")},{name:"Company tags",href:"/data-management/company-tags",current:a.pathname.includes("/company-tags")},{name:"Media assets",href:"/data-management/media-assets",current:a.pathname.includes("/media-assets")}];return(0,s.jsx)(r.c,{Header:()=>(0,s.jsx)(Header,{}),children:(0,s.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,s.jsx)("div",{className:"mb-8",children:(0,s.jsx)(n.Z,{tabs:l})}),(0,s.jsx)("div",{className:"mt-6 mb-16",children:t})]})})}let Header=function(){let e=[{name:"Data Management",href:"/data-management",current:!1}],t=(0,i.useRouter)();return t.pathname.includes("/user-imports")?e.push({name:"User Imports",href:"/data-management/user-imports",current:!0}):t.pathname.includes("/user-attributes")?e.push({name:"User Attributes",href:"/data-management/user-attributes",current:!0}):t.pathname.includes("/user-events")?e.push({name:"User Events",href:"/data-management/user-events",current:!0}):t.pathname.includes("/company-tags")?e.push({name:"Company tags",href:"/data-management/company-tags",current:!0}):t.pathname.includes("/media-assets")?e.push({name:"Media Assets",href:"/data-management/media-assets",current:!0}):e.push({name:"User Attributes",href:"#",current:!0}),(0,s.jsx)("div",{children:(0,s.jsx)("div",{className:"px-4 py-4 sm:flex sm:items-center sm:justify-between",children:(0,s.jsx)("div",{className:"min-w-0 flex-1",children:(0,s.jsx)("div",{className:"px-4 py-4 sm:flex sm:items-center sm:justify-between",children:(0,s.jsx)("div",{className:"min-w-0 flex-1",children:(0,s.jsx)("h1",{className:"text-base font-medium leading-6 text-gray-900 sm:truncate",children:(0,s.jsx)("nav",{className:"flex","aria-label":"Breadcrumb",children:(0,s.jsxs)("ol",{role:"list",className:"flex items-center space-x-4",children:[(0,s.jsx)("li",{children:(0,s.jsx)("div",{children:(0,s.jsxs)("div",{className:"text-gray-400",children:[(0,s.jsx)(m.Z,{className:"h-5 w-5 flex-shrink-0","aria-hidden":"true"}),(0,s.jsx)("span",{className:"sr-only",children:"Home"})]})})}),e.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(d.Z,{className:"h-5 w-5 flex-shrink-0 text-gray-400","aria-hidden":"true"}),(0,s.jsx)(c(),{href:e.href,className:`${e.current?"text-indigo-600":"text-gray-900"} ml-4 text-base font-medium hover:text-gray-500`,"aria-current":e.current?"page":void 0,children:e.name})]})},e.name))]})})})})})})})})}},13504:function(e,t,a){"use strict";a.r(t);var s=a(85893),r=a(9008),n=a.n(r),i=a(41664),l=a.n(i),c=a(11163),m=a(67294),d=a(9473),o=a(90406),u=a(94892),x=a(88894),h=a(39377),p=a(56166),f=a(65585),g=a(95243),v=a(18992);let y=[{id:"shopify",name:"Shopify",href:"/data-management/user-events/?source=shopify"}
1,{id:"custom",name:"Custom",href:"/data-management/user-events/?source=custom"}],UserEvents=function(){let e=(0,c.useRouter)(),t=(0,d.v9)(e=>e.sessions.currentUser),a=(0,f.F5)(t),[r,i]=(0,m.useState)(!0),[o,b]=(0,m.useState)(null),[j,w]=(0,m.useState)([]),N=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=e||function(e){let t=e.match(/[?&]source=([^&/?#]+)/);return t?decodeURIComponent(t[1]):void 0}(t);return"custom"===a?"custom":"shopify"}(e.query.source,e.asPath),E="custom"===N&&!a;(0,m.useEffect)(()=>{let e=!1;return(async()=>{i(!0),b(null);let[t,a]=await (0,x.W)(u.Z.eventTypeDefinitions.index());if(e)return;if(t){b("Could not load event types. Try again later."),w([]),i(!1);return}let s=(0,g.OX)(a);w(s),i(!1)})(),()=>{e=!0}},[]);let _=(0,m.useMemo)(()=>{let e="custom"===N?(0,g.Tk)(j):(0,g.mx)(j).filter(e=>"published"===String(e.status).toLowerCase());return[...e].sort((e,t)=>(0,g._h)(e).localeCompare((0,g._h)(t)))},[N,j]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n(),{children:(0,s.jsx)("title",{children:"User events - Data management - CampaignHQ"})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-8 sm:flex-auto",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold leading-6 text-gray-900",children:"User events"}),(0,s.jsx)("p",{className:"mt-1 max-w-3xl text-sm text-gray-500",children:"custom"===N?a?"Custom event types your account can use for automations.":"Custom events are not on your plan. Use them to automate, engage, scale, and understand revenue.":"Published Shopify event types your account can use for journeys, automations, and reporting."}),"custom"===N&&a&&(0,s.jsx)(l(),{href:"/developer/events/?tab=types",className:"mt-3 inline-flex text-sm font-medium text-indigo-600 hover:text-indigo-500",children:"Manage custom events"}),"shopify"===N&&(0,s.jsx)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-slate-200 bg-slate-50 px-2.5 py-0.5 text-xs font-medium text-slate-700",children:[(0,s.jsx)(v.Z,{className:"h-3.5 w-3.5","aria-hidden":!0}),"Shopify events (",_.length,")"]})})]}),(0,s.jsx)("div",{className:"mb-8 border-b border-gray-200",children:(0,s.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Event sources",children:y.map(e=>(0,s.jsx)(l(),{href:e.href,className:N===e.id?"whitespace-nowrap border-b-2 border-indigo-500 px-1 py-4 text-sm font-medium text-indigo-600":"whitespace-nowrap border-b-2 border-transparent px-1 py-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700","aria-current":N===e.id?"page":void 0,children:e.name},e.id))})}),o&&!E&&(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900",role:"alert",children:o}),E?(0,s.jsx)(p.Z,{}):r?(0,s.jsx)("div",{className:"py-16",children:(0,s.jsx)(h.Z,{})}):(0,s.jsx)("div",{className:"overflow-hidden bg-white shadow-sm ring-1 ring-gray-900/5 sm:rounded-xl",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"min-w-full divide-y divide-gray-200 text-left text-sm",children:[(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{scope:"col",className:"whitespace-nowrap px-4 py-3 font-semibold text-gray-900 sm:px-6",children:"Event type"}),(0,s.jsx)("th",{scope:"col",className:"whitespace-nowrap px-4 py-3 font-semibold text-gray-900 sm:px-6",children:"Name"}),(0,s.jsx)("th",{scope:"col",className:"min-w-[12rem] px-4 py-3 font-semibold text-gray-900 sm:px-6",children:"Description"}),(0,s.jsx)("th",{scope:"col",className:"whitespace-nowrap px-4 py-3 font-semibold text-gray-900 sm:px-6",children:"Status"}),(0,s.jsx)("th",{scope:"col",className:"whitespace-nowrap px-4 py-3 text-right font-semibold text-gray-900 sm:px-6",children:"Properties"}),(0,s.jsx)("th",{scope:"col",className:"whitespace-nowrap px-4 py-3 text-right font-semibold text-gray-900 sm:px-6",children:"Revenue attr."})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-gray-100 bg-white",children:0===_.length?(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:6,className:"px-4 py-10 text-center text-sm text-gray-500 sm:px-6",children:"custom"===N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"block",children:"No custom event types yet."}),(0,s.jsx)(l(),{href:"/developer/events/?tab=types",className:"mt-2 inline-flex font-medium text-indigo-600 hover:text-indigo-500",children:"Manage custom events"})]}):(0,s.jsx)(s.Fragment,{children:"No published Shopify event types were returned. Connect Shopify or check that catalog types are available for your workspace."})})}):_.map((e,t)=>{let a=(0,g._h)(e)||`row-${t}`,r=(0,g.zR)(e),n=(e.description??e.Description??"").trim()||"—";return(0,s.jsxs)("tr",{className:"hover:bg-gray-50/80",children:[(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 font-mono text-xs text-gray-800 sm:px-6",children:(0,g._h)(e)||"—"}),(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-gray-900 sm:px-6",children:r}),(0,s.jsx)("td",{className:"max-w-md px-4 py-3 text-gray-600 sm:px-6",children:(0,s.jsx)("span",{className:"line-clamp-2",title:n,children:n})}),(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-gray-700 sm:px-6",children:String(e.status??e.Status??"—")}),(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-right tabular-nums text-gray-900 sm:px-6",children:function(e){let t=e.attribute_definitions??e.attributeDefinitions??[];return Array.isArray(t)?t.length:0}(e)}),(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-right sm:px-6",children:e.revenue_attribution_enabled??e.revenueAttributionEnabled?(0,s.jsx)("span",{className:"inline-flex rounded-full bg-emerald-50 px-2 py-0.5 text-xs font-medium text-emerald-800 ring-1 ring-inset ring-emerald-600/20",children:"Yes"}):(0,s.jsx)("span",{className:"text-gray-400",children:"—"})})]},a)})})]})})})]})]})};UserEvents.Layout=o.q,t.default=UserEvents},9008:function(e,t,a){e.exports=a(79201)},17524:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))});t.Z=r},89618:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M9.293 2.293a1 1 0 0 1 1.414 0l7 7A1 1 0 0 1 17 11h-1v6a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1v-3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-6H3a1 1 0 0 1-.707-1.707l7-7Z",clipRule:"evenodd"}))});t.Z=r},18992:function(e,t,a){"use strict";var s=a(67294);let r=s.forwardRef(function({title:e,titleId:t,...a},r){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},a),e?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 21v-7.5a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 .75.75V21m-4.5 0H2.36m11.14 0H18m0 0h3.64m-1.39 0V9.349M3.75 21V9.349m0 0a3.001 3.001 0 0 0 3.75-.615A2.993 2.993 0 0 0 9.75 9.75c.896 0 1.7-.393 2.25-1.016a2.993 2.993 0 0 0 2.25 1.016c.896 0 1.7-.393 2.25-1.015a3.001 3.001 0 0 0 3.75.614m-16.5 0a3.004 3.004 0 0 1-.621-4.72l1.189-1.19A1.5 1.5 0 0 1 5.378 3h13.243a1.5 1.5 0 0 1 1.06.44l1.19 1.189a3 3 0 0 1-.621 4.72M6.75 18h3.75a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H6.75a.75.75 0 0 0-.75.75v3.75c0 .414.336.75.75.75Z"}))});t.Z=r}},function(e){e.O(0,[9921,5675,2814,7536,7811,445,3410,1796,5447,5752,9774,2888,179],function(){return e(e.s=89500)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.