Thrift module: componentevent

ModuleServicesData typesConstants
componentevent Action
ComponentEvent
ComponentType
ComponentV2

Enumerations

Enumeration: Action

Specific actions that can be taken against a Component. Aim to use one of the existing entries here, or create a new one. The examples in the comments are not intended to be exhaustive. If a general "click" event is enough, consider using the "value" field in ComponentEvent to hold any additional information relating to the click.

INSERT1 The component was inserted into its container (e.g. a web page or view in an app)
VIEW2 The component was in view on screen
EXPAND3 The component was expanded (e.g. "see more"). Not a navigation away to another page
LIKE4 A "like", thumbs up, etc.
DISLIKE5 A "dislike", thumbs down, etc.
SUBSCRIBE6 A subscription to a service, newsletter, etc.
ANSWER7 Selection of an answer in a quiz
VOTE8 A vote in a poll
CLICK9 A single click on the component which is not covered by any of the existing Actions.

Enumeration: ComponentType

The different types of component that can be rendered

READERS_QUESTIONS_ATOM1
QANDA_ATOM2
PROFILE_ATOM3
GUIDE_ATOM4
TIMELINE_ATOM5
NEWSLETTER_SUBSCRIPTION6
SURVEYS_QUESTIONS7
ACQUISITIONS_EPIC8
ACQUISITIONS_ENGAGEMENT_BANNER9
ACQUISITIONS_THANK_YOU_EPIC10
ACQUISITIONS_HEADER11
ACQUISITIONS_FOOTER12
ACQUISITIONS_INTERACTIVE_SLICE13
ACQUISITIONS_NUGGET14
ACQUISITIONS_STANDFIRST15
ACQUISITIONS_THRASHER16
ACQUISITIONS_EDITORIAL_LINK17
ACQUISITIONS_MANAGE_MY_ACCOUNT18
ACQUISITIONS_BUTTON19
ACQUISITIONS_OTHER20

Data structures

Struct: ComponentV2

KeyFieldTypeDescriptionRequirednessDefault value
1componentTypeComponentTyperequired
2idstringAn ID that can be used to distinguish different instances of a given ComponentType optional
3productsset<product.Product>The products related to the component e.g. a banner with two buttons, one asking for people to become Supporters and one asking for contributions would contain `CONTRIBUTION` and `SUPPORTER` required
4campaignCodestringAn optional identifier for the campaign the component was used in optional
5labelsset<string>Additional labels relating to the component required

Struct: ComponentEvent

KeyFieldTypeDescriptionRequirednessDefault value
1componentComponentV2The component where the action happened required
2actionActionThe action that took place required
3valuestringAny additional data on the event, e.g. further information on a "click" event optional
4idstringA unique identifier for the component event e.g. a UUID optional
5abTestabtest.AbTestIf the event was triggered as part of an A/B test, this identifies the test and variant. Though a given pageview may have multiple A/B test participations, a component event can only be associated with a single test. optional

An event representing an action taken against a component on the web or apps.