Skip to content

Commit

Permalink
measurement plan update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkirtzel committed Sep 16, 2022
1 parent dc0b30c commit 8b86c5c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
36 changes: 26 additions & 10 deletions 220916-code_talks/measurementplan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,26 @@ const plan: Measurement.Plan = {
view: {
name: "Pageview",
description: "The well known pageview on each route change",
properties: [],
sources: { web: { required: true } },
properties: [{ id: "id", required: true }],
trigger: { type: "load" },
type: "core",
},
read: {
name: "Pageread",
description:
"On reaching the end of a page by seeing the footer",
properties: [{ id: "id", required: true }],
trigger: { type: "visible" },
type: "core",
},
},
properties: {
id: {
name: "Path as id",
type: "string",
example: "/",
},
},
properties: {},
owners: ["alexander"],
},
cta: {
Expand All @@ -35,18 +48,26 @@ const plan: Measurement.Plan = {
{ id: "title", required: true },
{ id: "position", required: true },
],
sources: { web: { required: true } },
trigger: { type: "visible" },
type: "core",
},
call: {
name: "CTA call",
description: "Click 'Schedule a call' button",
properties: [
{ id: "title", required: true },
{ id: "position", required: true },
],
trigger: { type: "click" },
type: "core",
},
start: {
name: "CTA start",
description: "Click 'get started' button",
properties: [
{ id: "title", required: true },
{ id: "position", required: true },
],
sources: { web: { required: true } },
trigger: { type: "click" },
type: "core",
},
Expand All @@ -57,7 +78,6 @@ const plan: Measurement.Plan = {
{ id: "title", required: true },
{ id: "position", required: true },
],
sources: { web: { required: true } },
trigger: { type: "click" },
type: "core",
},
Expand All @@ -84,15 +104,13 @@ const plan: Measurement.Plan = {
name: "Article impression",
description: "",
properties: [{ id: "id", required: true }],
sources: { web: { required: true } },
trigger: { type: "visible" },
type: "additional",
},
click: {
name: "Article click",
description: "",
properties: [{ id: "id", required: true }],
sources: { web: { required: true } },
trigger: { type: "click" },
type: "additional",
},
Expand All @@ -107,7 +125,6 @@ const plan: Measurement.Plan = {
{ id: "author", required: true },
{ id: "readingTime", required: true },
],
sources: { web: { required: true } },
trigger: { type: "load" },
type: "core",
},
Expand All @@ -116,7 +133,6 @@ const plan: Measurement.Plan = {
description:
"As soon as the last paragraph of an article is visible to the user",
properties: [{ id: "id", required: true }],
sources: { web: { required: true } },
trigger: { type: "visible" },
type: "core",
},
Expand Down
5 changes: 0 additions & 5 deletions 220916-code_talks/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,11 @@ export namespace Measurement {
name: string;
description: string;
properties: Array<PropertyLink>;
sources: ActionSources;
trigger: Trigger;
type: ActionType;
}
type ActionType = "core" | "additional";

interface ActionSources {
[sourceId: string]: SourceLink;
}

type ConsentList = Array<ConsentId>;
type ConsentId = string;

Expand Down

0 comments on commit 8b86c5c

Please sign in to comment.