@artsy/cohesion
Version:
Analytics schema
49 lines (45 loc) • 1.69 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.clickedCollectionGroup = void 0;
var _Schema = require("../../Schema");
/**
* A user clicks a grouping of artist series (web)
*
* @example
* ```
* clickedCollectionGroup({
* contextModule: ContextModule.featuredCollectionsRail
* contextPageOwnerType: OwnerType.collection,
* contextPageOwnerId: "5359794d2a1e86c3741001f8",
* contextPageOwnerSlug: "contemporary",
* destinationPageOwnerId: "5359794d1a1e86c3740001f7",
* destinationPageOwnerSlug: "andy-warhol-skulls",
* horizontalSlidePosition: 3
* })
* ```
*/
var clickedCollectionGroup = function clickedCollectionGroup(_ref) {
var contextModule = _ref.contextModule,
contextPageOwnerType = _ref.contextPageOwnerType,
contextPageOwnerId = _ref.contextPageOwnerId,
contextPageOwnerSlug = _ref.contextPageOwnerSlug,
destinationPageOwnerId = _ref.destinationPageOwnerId,
destinationPageOwnerSlug = _ref.destinationPageOwnerSlug,
horizontalSlidePosition = _ref.horizontalSlidePosition,
type = _ref.type;
return {
action: _Schema.ActionType.clickedCollectionGroup,
context_module: contextModule,
context_page_owner_id: contextPageOwnerId,
context_page_owner_slug: contextPageOwnerSlug,
context_page_owner_type: contextPageOwnerType,
destination_page_owner_id: destinationPageOwnerId,
destination_page_owner_slug: destinationPageOwnerSlug,
destination_page_owner_type: _Schema.OwnerType.collection,
horizontal_slide_position: horizontalSlidePosition,
type: type || "thumbnail"
};
};
exports.clickedCollectionGroup = clickedCollectionGroup;