For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
  • GraphQL
    • Overview
      • Playground
      • Explorer
          • MUTcreateCart
          • MUTdeleteCart
          • MUTaddCartLineItems
          • MUTupdateCartLineItem
          • MUTdeleteCartLineItem
          • MUTupdateCartCurrency
          • MUTassignCartToCustomer
          • MUTunassignCartFromCustomer
          • MUTcreateCartMetafield
          • MUTupdateCartMetafield
          • MUTdeleteCartMetafield
          • MUTcreateCartRedirectUrls
          • MUTcreateCheckout
          • MUTupdateCheckout
          • MUTaddCheckoutBillingAddress
          • MUTupdateCheckoutBillingAddress
          • MUTupdateCheckoutCustomerMessage
          • MUTselectCheckoutShippingOption
          • MUTapplyCheckoutCoupon
          • MUTunapplyCheckoutCoupon
          • MUTapplyCheckoutGiftCertificate
          • MUTunapplyCheckoutGiftCertificate
          • MUTapplyCheckoutSpamProtection
          • MUTaddCheckoutShippingConsignments
          • MUTupdateCheckoutShippingConsignment
          • MUTdeleteCheckoutConsignment
          • MUTcompleteCheckout
          • MUTlogin
          • MUTlogout
          • MUTcreateWishlist
          • MUTaddWishlistItems
          • MUTdeleteWishlistItems
          • MUTupdateWishlist
          • MUTdeleteWishlists
          • MUTloginWithCustomerLoginJwt
          • MUTsubmitContactUs
          • MUTgenerateSessionSyncJwt
          • MUTvalidateSessionSyncJwt
          • MUTproductViewedEvent
          • MUTpageViewedEvent
          • MUTvisitStartedEvent
          • MUTsearchProductEvent
          • MUTpreviewGiftCertificate
          • MUTregisterCompany
          • MUTaddProductReview
          • MUTchangePassword
          • MUTrequestResetPassword
          • MUTresetPassword
          • MUTregisterCustomer
          • MUTupdateCustomer
          • MUTaddCustomerAddress
          • MUTupdateCustomerAddress
          • MUTdeleteCustomerAddress
          • MUTpayment
          • MUTsubscribe
          • MUTunsubscribe
  • MCP
    • Overview
Dev Portal
LogoLogo
GraphQLStorefrontMutations

productViewedEvent

Example Query
1mutation ExampleMutation($input: ProductViewedEventInput) {
2 productViewedEvent(input: $input) {
3 executed
4 }
5}
Variables
1{
2 "input": {
3 "commonInput": {
4 "initiator": {
5 "visitId": "example",
6 "visitorId": "example"
7 },
8 "request": {
9 "url": "URL",
10 "userAgent": "example",
11 "refererUrl": "URL",
12 "ip": "IpAddress",
13 "acceptLanguage": "example"
14 },
15 "consent": {
16 "targeting": true,
17 "analytics": true,
18 "functional": true
19 }
20 },
21 "productInput": {
22 "productEntityId": 0,
23 "searchKeyword": "example"
24 }
25 }
26}
Example response
1{
2 "data": {
3 "productViewedEvent": {
4 "executed": true
5 }
6 }
7}
Mutation to record a product view event in the analytics system.
Was this page helpful?
Previous

validateSessionSyncJwt

Next

pageViewedEvent

Built with

Arguments

inputProductViewedEventInputRequired
Input data required to log a product view event, including product details and common analytics context.

Returns

a ProductViewedEventResult
executedBoolean

Indicates whether the product-viewed event was successfully executed.