UNPKG

json-object-editor

Version:

JOE the Json Object Editor | Platform Edition

34 lines (29 loc) 1.59 kB
var schema = { title: "Engagement Event | ${eventType}", info: "Tracks visitor interactions across email campaigns, landing pages, and CTAs for analytics and engagement insight.", menuicon: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path d="..."/></svg>`, // optional: stylized icon idprop: "_id", sorter: ["-created", "eventType", "eventTarget"], listView: { title: "<joe-title>${eventType}</joe-title><joe-subtitle>${eventLabel}</joe-subtitle><joe-subtitle>${visitor}</joe-subtitle>", listWindowTitle: "Engagement Events" }, fields: function(){ var fields = [ {section_start:'objects'}, { name: "campaign", type: "objectReference", ref: "campaign", label: "Campaign" }, {section_end:'objects'}, { name: "eventType", type: "select", options: ["email_open", "email_click", "landing_visit", "click_cta", "form_submit"], required: true }, { name: "eventTarget", type: "text", label: "Target Element", placeholder: "e.g. CTA 1, Header Link" }, { name: "name", type: "text", label: "Event Label", placeholder: "Descriptive text of action" }, { name: "eventLocation", type: "select", options: ["email", "landingPage", "external"], label: "Location" }, { name: "visitor", type: "text", label: "Visitor ID or Email" }, { name: "session", type: "text", label: "Session ID" }, {section_start:'system',collapsed:true}, '_id','created','itemtype', {section_end:'system'}, ] return fields; } }; module.exports = schema;