UNPKG

@artsy/cohesion

Version:
35 lines (31 loc) 891 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.timeOnPage = void 0; var _Schema = require("../../Schema"); /** * Action fired when a user views a page for 15 seconds * * @example * ``` * timeOnPage({ * contextPageOwnerId: "4d8b92b34eb68a1b2c0003f4", * contextPageOwnerSlug: "andy-warhol", * contextPageOwnerType: OwnerType.artist, * }) * ``` */ var timeOnPage = function timeOnPage(_ref) { var contextPageOwnerId = _ref.contextPageOwnerId, contextPageOwnerSlug = _ref.contextPageOwnerSlug, contextPageOwnerType = _ref.contextPageOwnerType; return { action: _Schema.ActionType.timeOnPage, category: "15 seconds", context_page_owner_id: contextPageOwnerId, context_page_owner_slug: contextPageOwnerSlug, context_page_owner_type: contextPageOwnerType }; }; exports.timeOnPage = timeOnPage;