@artsy/cohesion 4.289.0 → 4.291.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ # v4.291.0 (Tue Jul 29 2025)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - feat: Add ClickedGraphCTA [#625](https://github.com/artsy/cohesion/pull/625) ([@xander-pero](https://github.com/xander-pero))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@xander-pero](https://github.com/xander-pero)
10
+
11
+ ---
12
+
13
+ # v4.290.0 (Mon Jul 28 2025)
14
+
15
+ #### 🚀 Enhancement
16
+
17
+ - feat: CMS Analytics Page tracking [#624](https://github.com/artsy/cohesion/pull/624) ([@xander-pero](https://github.com/xander-pero))
18
+
19
+ #### Authors: 1
20
+
21
+ - [@xander-pero](https://github.com/xander-pero)
22
+
23
+ ---
24
+
1
25
  # v4.289.0 (Wed Jul 23 2025)
2
26
 
3
27
  #### 🚀 Enhancement
@@ -0,0 +1,130 @@
1
+ /**
2
+ * Schemas describing CMS Analytics events
3
+ * @packageDocumentation
4
+ */
5
+ import { CmsContextModule } from "../Values/CmsContextModule";
6
+ import { CmsOwnerType } from "../Values/CmsOwnerType";
7
+ import { CmsActionType } from "./index";
8
+ /**
9
+ * A partner has changed the time period for a graph.
10
+ *
11
+ * @example
12
+ * ```
13
+ * {
14
+ * action: "changedTimePeriod",
15
+ * context_module: "mostViewed" | "publishedArtworks" | "views" | "inquiries" | "sales" | "audience",
16
+ * context_page_owner_type: "analytics",
17
+ * time_period_start: -28 | -112 | -365,
18
+ * time_period_end: 0
19
+ * }
20
+ * ```
21
+ */
22
+ export interface CmsAnalyticsPageChangedTimePeriod {
23
+ action: CmsActionType.changedTimePeriod;
24
+ context_module: CmsContextModule;
25
+ context_page_owner_type: CmsOwnerType.analytics;
26
+ time_period_start: number;
27
+ time_period_end: number;
28
+ }
29
+ /**
30
+ * A partner clicks on the CTA below a graph
31
+ *
32
+ * @example
33
+ * ```
34
+ * {
35
+ * action: "clickedGraphCTA",
36
+ * context_module: "publishedArtworks" | "inquiries" | "sales",
37
+ * context_page_owner_type: "analytics",
38
+ * destination_page_owner_type: "artworks" | "conversations" | "orders"
39
+ * }
40
+ * ```
41
+ */
42
+ export interface CmsAnalyticsPageClickedGraphCTA {
43
+ action: CmsActionType.clickedGraphCTA;
44
+ context_module: CmsContextModule;
45
+ context_page_owner_type: CmsOwnerType.analytics;
46
+ destination_page_owner_type: string;
47
+ }
48
+ /**
49
+ * A partner clicks on an entity in the "Most Viewed" section
50
+ *
51
+ * @example
52
+ * ```
53
+ * {
54
+ * action: "clickedMostViewed",
55
+ * context_module: "mostViewed"
56
+ * context_page_owner_type: "analytics",
57
+ * destination_page_owner_type: "artworks" | "show" | "artist" | "viewing-room",
58
+ * position: 0 | 1 | ... | 9
59
+ * }
60
+ * ```
61
+ */
62
+ export interface CmsAnalyticsPageClickedMostViewed {
63
+ action: CmsActionType.clickedMostViewed;
64
+ context_module: CmsContextModule;
65
+ context_page_owner_type: CmsOwnerType.analytics;
66
+ destination_page_owner_type: string;
67
+ position: number;
68
+ }
69
+ /**
70
+ * A partner views a graph on the analytics page
71
+ *
72
+ * @example
73
+ * ```
74
+ * {
75
+ * action: "viewedGraph",
76
+ * context_module: "mostViewed" | "publishedArtworks" | "views" | "inquiries" | "sales" | "audience",
77
+ * context_page_owner_type: "analytics",
78
+ * graph_type: "cumulative_line" | "donut"
79
+ * }
80
+ * ```
81
+ */
82
+ export interface CmsAnalyticsPageViewedGraph {
83
+ action: CmsActionType.viewedGraph;
84
+ context_module: CmsContextModule;
85
+ context_page_owner_type: CmsOwnerType.analytics;
86
+ graph_type: string;
87
+ }
88
+ /**
89
+ * A partner views a datapoint on a graph on the analytics page
90
+ *
91
+ * @example
92
+ * ```
93
+ * {
94
+ * action: "viewedGraphDatapoint",
95
+ * context_module: "mostViewed" | "publishedArtworks" | "views" | "inquiries" | "sales" | "audience",
96
+ * context_page_owner_type: "analytics",
97
+ * graph_type: "cumulative_line" | "donut"
98
+ * datapoint_bucket_size?: "daily" | "weekly" | "monthly" | null
99
+ * datapoint_is_other?: true | false | null
100
+ * }
101
+ * ```
102
+ */
103
+ export interface CmsAnalyticsPageViewedGraphDatapoint {
104
+ action: CmsActionType.viewedGraphDatapoint;
105
+ context_module: CmsContextModule;
106
+ context_page_owner_type: CmsOwnerType.analytics;
107
+ graph_type: string;
108
+ datapoint_bucket_size?: string;
109
+ datapoint_is_other?: boolean;
110
+ }
111
+ /**
112
+ * A partner views a tooltip on the analytics page
113
+ *
114
+ * @example
115
+ * ```
116
+ * {
117
+ * action: "viewedTooltip",
118
+ * context_module: "mostViewed"
119
+ * context_page_owner_type: "analytics",
120
+ * type: "explanatory" | "response-time" | "response-time-score"
121
+ * }
122
+ * ```
123
+ */
124
+ export interface CmsAnalyticsPageViewedTooltip {
125
+ action: CmsActionType.viewedTooltip;
126
+ context_module: CmsContextModule.analyticsMostViewed;
127
+ context_page_owner_type: CmsOwnerType.analytics;
128
+ type: string;
129
+ }
130
+ export type CmsAnalyticsPage = CmsAnalyticsPageChangedTimePeriod | CmsAnalyticsPageClickedGraphCTA | CmsAnalyticsPageClickedMostViewed | CmsAnalyticsPageViewedGraph | CmsAnalyticsPageViewedGraphDatapoint | CmsAnalyticsPageViewedTooltip;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,3 +1,4 @@
1
+ import { CmsAnalyticsPage } from "./AnalyticsPage";
1
2
  import { CmsArtworkFilter } from "./ArtworkFilter";
2
3
  import { CmsBatchImportFlow } from "./BatchImportFlow";
3
4
  import { CmsBulkEditFlow } from "./BulkEditFlow";
@@ -9,7 +10,7 @@ import { CmsUploadArtworkFlow } from "./UploadArtworkFlow";
9
10
  *
10
11
  * Each event describes one ActionType
11
12
  */
12
- export type CmsEvent = CmsArtworkFilter | CmsBulkEditFlow | CmsBatchImportFlow | CmsUploadArtworkFlow | CmsSettingsFlow | CmsShowFlow;
13
+ export type CmsEvent = CmsAnalyticsPage | CmsArtworkFilter | CmsBulkEditFlow | CmsBatchImportFlow | CmsUploadArtworkFlow | CmsSettingsFlow | CmsShowFlow;
13
14
  /**
14
15
  * List of all CMS actions
15
16
  *
@@ -32,6 +33,18 @@ export declare enum CmsActionType {
32
33
  * Corresponds to {@link CmsBulkEditFlow}
33
34
  */
34
35
  bulkEditFailed = "bulkEditFailed",
36
+ /**
37
+ * Corresponds to {@link CmsAnalyticsPage}
38
+ */
39
+ changedTimePeriod = "changedTimePeriod",
40
+ /**
41
+ * Corresponds to {@link CmsAnalytics}
42
+ */
43
+ clickedGraphCTA = "clickedGraphCTA",
44
+ /**
45
+ * Corresponds to {@link CmsAnalytics}
46
+ */
47
+ clickedMostViewed = "clickedMostViewed",
35
48
  /**
36
49
  * Corresponds to {@link CmsArtworkFilter}
37
50
  */
@@ -79,5 +92,17 @@ export declare enum CmsActionType {
79
92
  /**
80
93
  * Corresponds to {@link BatchImportFlow}
81
94
  */
82
- shownMissingInformation = "shownMissingInformation"
95
+ shownMissingInformation = "shownMissingInformation",
96
+ /**
97
+ * Corresponds to {@link CmsAnalytics}
98
+ */
99
+ viewedGraph = "viewedGraph",
100
+ /**
101
+ * Corresponds to {@link CmsAnalytics}
102
+ */
103
+ viewedGraphDatapoint = "viewedGraphDatapoint",
104
+ /**
105
+ * Corresponds to {@link CmsAnalytics}
106
+ */
107
+ viewedTooltip = "viewedTooltip"
83
108
  }
@@ -24,6 +24,9 @@ exports.CmsActionType = CmsActionType;
24
24
  CmsActionType["artistNeedsMatching"] = "artistNeedsMatching";
25
25
  CmsActionType["batchImportTableContentSummary"] = "batchImportTableContentSummary";
26
26
  CmsActionType["bulkEditFailed"] = "bulkEditFailed";
27
+ CmsActionType["changedTimePeriod"] = "changedTimePeriod";
28
+ CmsActionType["clickedGraphCTA"] = "clickedGraphCTA";
29
+ CmsActionType["clickedMostViewed"] = "clickedMostViewed";
27
30
  CmsActionType["clickedOnDuplicateArtwork"] = "clickedonduplicateartwork";
28
31
  CmsActionType["createdArtwork"] = "created artwork";
29
32
  CmsActionType["csvImportError"] = "csvImportError";
@@ -36,4 +39,7 @@ exports.CmsActionType = CmsActionType;
36
39
  CmsActionType["shownMaxEditLimitReached"] = "shownMaxEditLimitReached";
37
40
  CmsActionType["shownResolvedAllConflicts"] = "shownResolvedAllConflicts";
38
41
  CmsActionType["shownMissingInformation"] = "shownMissingInformation";
42
+ CmsActionType["viewedGraph"] = "viewedGraph";
43
+ CmsActionType["viewedGraphDatapoint"] = "viewedGraphDatapoint";
44
+ CmsActionType["viewedTooltip"] = "viewedTooltip";
39
45
  })(CmsActionType || (exports.CmsActionType = CmsActionType = {}));
@@ -6,6 +6,12 @@
6
6
  */
7
7
  export declare enum CmsContextModule {
8
8
  addArtworkToShow = "Add artwork to show",
9
+ analyticsAudience = "analyticsAudience",
10
+ analyticsInquiries = "analyticsInquiries",
11
+ analyticsMostViewed = "analyticsMostViewed",
12
+ analyticsPublishedArtworks = "analyticsPublishedArtworks",
13
+ analyticsSales = "analyticsSales",
14
+ analyticsViews = "analyticsViews",
9
15
  artworkFilterFilterArtworks = "Artworks - filter artworks",
10
16
  artworkFilterSearch = "Artworks - search",
11
17
  artworkFilterQuickEdit = "Artworks - quick edit",
@@ -16,6 +16,12 @@ exports.CmsContextModule = CmsContextModule;
16
16
 
17
17
  (function (CmsContextModule) {
18
18
  CmsContextModule["addArtworkToShow"] = "Add artwork to show";
19
+ CmsContextModule["analyticsAudience"] = "analyticsAudience";
20
+ CmsContextModule["analyticsInquiries"] = "analyticsInquiries";
21
+ CmsContextModule["analyticsMostViewed"] = "analyticsMostViewed";
22
+ CmsContextModule["analyticsPublishedArtworks"] = "analyticsPublishedArtworks";
23
+ CmsContextModule["analyticsSales"] = "analyticsSales";
24
+ CmsContextModule["analyticsViews"] = "analyticsViews";
19
25
  CmsContextModule["artworkFilterFilterArtworks"] = "Artworks - filter artworks";
20
26
  CmsContextModule["artworkFilterSearch"] = "Artworks - search";
21
27
  CmsContextModule["artworkFilterQuickEdit"] = "Artworks - quick edit";
@@ -4,6 +4,7 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  export declare enum CmsOwnerType {
7
+ analytics = "analytics",
7
8
  bulkEdit = "bulkEdit",
8
9
  batchImport = "batchImport",
9
10
  batchImportArtistMatching = "batchImportArtistMatching"
@@ -14,6 +14,7 @@ var CmsOwnerType;
14
14
  exports.CmsOwnerType = CmsOwnerType;
15
15
 
16
16
  (function (CmsOwnerType) {
17
+ CmsOwnerType["analytics"] = "analytics";
17
18
  CmsOwnerType["bulkEdit"] = "bulkEdit";
18
19
  CmsOwnerType["batchImport"] = "batchImport";
19
20
  CmsOwnerType["batchImportArtistMatching"] = "batchImportArtistMatching";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/cohesion",
3
- "version": "4.289.0",
3
+ "version": "4.291.0",
4
4
  "description": "Analytics schema",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {