Skip to content

Commit

Permalink
Merge pull request #466 from artsy/leo_dmz_artist_page
Browse files Browse the repository at this point in the history
DIA-207 Adding tracking for genes clicks and Highlights on the artist page
  • Loading branch information
leodmz authored Oct 10, 2023
2 parents 435e816 + 7968431 commit b2dfb5a
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
57 changes: 57 additions & 0 deletions src/Schema/Events/Click.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1742,4 +1742,61 @@ export interface ClickedVerifiedRepresentative {
context_page_owner_id: string
destination_page_owner_type: PageOwnerType
destination_page_owner_id: string
}

/**
* A user clicks one of the related categories(genes) in the artist about tab
*
* This schema describes events sent to Segment from [[clickedGene]]
*
* @example
* ```
* {
* action: "clickedGene",
* context_module : "Young British Artists",
* context_page_owner_type: "Artwork",
* context_page_owner_id: "58de681f275b2464fcdde097",
* context_page_owner_slug: "damien-hirst",
* destination_page_owner_type: "Gene"
* destination_page_owner_id: "58de681f275b2464fcdde097"
* subject: ""
* }
* ```
*/
export interface ClickedGene {
action: ActionType.clickedGene
context_module: ContextModule
context_page_owner_type: PageOwnerType
context_page_owner_id: string
context_page_owner_slug?: string
destination_page_owner_type: PageOwnerType
destination_page_owner_id: string
subject?: string
}

/**
* A user clicks one of the Highlight and Achievement toggles in the artist header
*
* This schema describes events sent to Segment from [[clickedHighlightAchievement]]
*
* @example
* ```
* {
* action: "clickedHighlightAchievement",
* context_module : "Active Secondary Market",
* context_page_owner_type: "Artwork",
* context_page_owner_id: "58de681f275b2464fcdde097",
* context_page_owner_slug: "damien-hirst",
* destination_page_owner_type: "Gene"
* destination_page_owner_id: "58de681f275b2464fcdde097"
* subject: ""
* }
* ```
*/
export interface ClickedHighlightAchievement {
action: ActionType.clickedHighlightAchievement
context_module: ContextModule
context_page_owner_type: PageOwnerType
context_page_owner_id: string
context_page_owner_slug?: string
}
58 changes: 58 additions & 0 deletions src/Schema/Events/Tap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,4 +985,62 @@ export interface TappedVerifiedRepresentative {
context_screen_owner_id: string
destination_screen_owner_type: ScreenOwnerType
destination_screen_owner_id: string
}

/**
* A user taps one of the related categories (genes) in the artist about tab
*
* This schema describes events sent to Segment from [[tappedGene]]
*
* @example
* ```
* {
* action: "tappedGene",
* context_module : "Young British Artists",
* context_screen_owner_type: "Artwork",
* context_screen_owner_id: "58de681f275b2464fcdde097",
* context_screen_owner_slug: "damien-hirst",
* destination_screen_owner_type: "Gene"
* destination_screen_owner_id: "58de681f275b2464fcdde097"
* subject: ""
* }
* ```
*/
export interface TappedGene {
action: ActionType.tappedGene
context_module: ContextModule
context_screen_owner_type: ScreenOwnerType
context_screen_owner_id: string
context_screen_owner_slug?: string
destination_screen_owner_type: ScreenOwnerType
destination_screen_owner_id: string
/** The text of the tapped button */
subject: string
}

/**
* A user taps one of the Highlight and Achievement toggles in the artist header
*
* This schema describes events sent to Segment from [[tappedHighlightAchievement]]
*
* @example
* ```
* {
* action: "tappedHighlightAchievement",
* context_module : "Active Secondary Market",
* context_screen_owner_type: "Artwork",
* context_screen_owner_id: "58de681f275b2464fcdde097",
* context_screen_owner_slug: "damien-hirst",
* destination_screen_owner_type: "Gene"
* destination_screen_owner_id: "58de681f275b2464fcdde097"
* subject: ""
* }
* ```
*/
export interface TappedHighlightAchievement {
action: ActionType.tappedHighlightAchievement
context_module: ContextModule
context_screen_owner_type: ScreenOwnerType
context_screen_owner_id: string
context_screen_owner_slug?: string
}
16 changes: 16 additions & 0 deletions src/Schema/Events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,14 @@ export enum ActionType {
* Corresponds to {@link ClickedVerifiedRepresentative}
*/
clickedVerifiedRepresentative = "clickedVerifiedRepresentative",
/**
* Corresponds to {@link ClickedGene}
*/
clickedGene = "clickedGene",
/**
* Corresponds to {@link ClickedHighlightAchievement}
*/
clickedHighlightAchievement = "clickedHighlightAchievement",
/**
* Corresponds to {@link CommercialFilterParamsChanged}
*/
Expand Down Expand Up @@ -1244,6 +1252,14 @@ export enum ActionType {
* Corresponds to {@link TappedVerifiedRepresentative}
*/
tappedVerifiedRepresentative = "tappedVerifiedRepresentative",
/**
* Corresponds to {@link TappedGene}
*/
tappedGene = "tappedGene",
/**
* Corresponds to {@link TappedHighlightAchievement}
*/
tappedHighlightAchievement = "tappedHighlightAchievement",
/**
* Corresponds to {@link TimeOnPage}
*/
Expand Down

0 comments on commit b2dfb5a

Please sign in to comment.