LogoLogo
Support
Product Discovery Developer Guide
Product Discovery Developer Guide
  • Product Discovery Developer Guide
  • 🛒Item catalog management
    • What is the Items API?
    • How to work with Items
      • Item Schema
        • Attributes
        • Nested Item Schemas
        • Using the Item Schema API
        • DefaultLocale API
        • Onboarding on/migrating to Fredhopper
        • List of Reserved Attributes
      • Category Tree
        • Using the Category Tree API
        • Onboarding on XO
      • Item Catalog
        • Using the Catalog API
      • Items
        • Using the streaming Items API
        • Using the batch Items API
    • Step by Step guide
      • Step by step guide for Fredhopper customers
    • Feedback
      • Using the Feedback API
    • Authorization to APIs
    • Troubleshooting API errors
  • 🎯XO Recommendations
    • Introduction
    • Using the Recommendations API
    • Setting up the Chrome extension
    • Micro-segmentation
    • XO Legacy APIs
  • 🔎XO Search
    • Introduction
    • Getting started
    • API Reference
      • Search API
      • Autocomplete API (Beta)
      • Product Suggest API
    • API Parameters
      • Search
      • Pagination
      • Faceting
      • Sorting
      • Grouping
      • Filtering
      • Disable features
      • Response mask
      • Context
    • Configuration limitation
  • 🧪A/B testing
    • Fredhopper A/B testing
      • Integration steps for a non-caching solution
      • Integration steps for a caching solution
        • Java SDK Integration
          • Setup
          • Retrieve running A/B tests - Java SDK
          • Filter and request variant - Java SDK
          • Extending the SDK
        • Manual A/B tests integration
          • Retrieve running A/B tests
          • Filter out irrelevant A/B tests
          • Assign variants to user
          • Request variant for page
        • Limitations and Best Practices
  • 📚Resources
    • Glossary
    • Best Practices
      • Tracker Best Practices
      • Items API Best Practices
      • Fredhopper Data Configuration Best Practices
      • Fredhopper Query Response Best Practices
      • Fredhopper Merchandising Studio Best Practices
    • Privacy Notice
  • Archived Pages
    • FHR Tracking plan
    • XO Tracking plan
    • The Tracking API and JS Library
      • What to Track
        • Generic Actions
          • View
          • Click
          • Add to Cart
          • Remove from Cart
          • Purchase
        • Custom Actions
      • Initializing the JavaScript Library
      • REST API Technical Documentation
Powered by GitBook

Copyright @ 2024 Crownpeak Technology, Inc. All rights reserved.

On this page
  • Impressions vs Views.
  • Views on Navigation Results
  • Views on Search Results
  • Views on products - PDPs powered by FHR
  • Views on products - PDPs NOT powered by FHR
  1. Archived Pages
  2. The Tracking API and JS Library
  3. What to Track
  4. Generic Actions

View

Views are one of the most basic actions your user can do. Views should be sent whenever your customer navigates to a page, whether that's from the navigation menu, a search result, or a product detail page. View actions are used within our services in order to track impressions, and product views.

Impressions vs Views.

When your customer navigates through your website or performs a search, results are displayed and our system tracks this as an impression. If you customer then decides to click on a product, that translates into a view, so then we can ultimately calculate the view conversion rate.

Views on Navigation Results

If your website's navigation is powered by Attraqt's services, you should send a navigation view event whenever your users navigate to a page and a query is made (in case of an infinite scroll implementation you can send multiple events while on the same page). Check the structure of the event below.

const viewActionOnNavigationResult = {
    "action":"view",
    "target": {
        "page": "path/to/page"
    },
    "sourceId":"f9caf9db-7549-4498-8c2a-3be977ce48d9",
    "metadata": {
        "locale": "en_GB"
    }
}

xo.activity.send(viewActionOnNavigationResult);

The properties needed for sending a view event on a navigation result are as follows:

  • action - you need to specify the action as view

  • target.page - you need to specify the path of your page in your web shop

  • sourceId - if you are implementing an FHR integration, you need to specify sourceId which is equal to the responseId you get from the FAS response.

  • locale - the locale selected by the user.

If you have any extra details you wish to send you can include them in the metadata _**_object.

Views on Search Results

If your website's search is powered by Attraqt's services, you should send a navigation view event whenever your users navigate to a page. Check the structure of the event below.

const viewActionOnSearchResult = {
    "action":"view",
    "target": {
        "page": "path/to/page"
        "search-terms": "trousers"
    },
    "sourceId":"8efbbef2-6640-4c16-b263-1f5a84813a1c",
    "metadata": {
        "locale": "en_GB"
    }
}

xo.activity.send(viewActionOnSearchResult);

The properties needed for sending a view event on a search result are as follows:

  • action - you need to specify the action as view

  • target.page - you need to specify the path of your page in your web shop

  • target.search-terms - you need to specify the search terms. If you are implementing an FHR integration they would be available in the FHR query response.

  • sourceId - if you are implementing an FHR integration, you need to specify sourceId which is equal to the responseId you get from the FHR query response.

  • locale - the locale selected by the user.

If you have any extra details you wish to send you can include them in the metadata _**_object.

Views on products - PDPs powered by FHR

If your Product Detail Pages(PDPs) are powered by Attraqt's services, you should send a product view event when your users land on your product details page.

const viewActionOnProduct = {
    "action":"view",
    "target": {
        "product":"83647582"
    },
    "sourceId":"6266c5de-6a3c-4299-af78-3fd17dc3e787",
    "metadata": {
        "locale": "en_GB"
    }
}

xo.activity.send(viewActionOnProduct);

The properties needed for sending a view event on a product detail page are as follows:

  • action - you need to specify the action as view

  • target.product - you need to specify the product id of the product on the page. For an FHR integration, this corresponds to the secondId **provided in the FHR query** response.

  • sourceId- if you are implementing an FHR integration you need to specify a sourceId which is equal to the responseId you get from the FHR query response. If you are implementing an XO integration, you need to specify a sourceId which corresponds to the recommendationId.

  • locale - the locale selected by the user.

If you have any extra details you wish to send you can include them in the metadata _**_object.

Views on products - PDPs NOT powered by FHR

If your Product Detail Pages(PDPs) are not powered by FHR, you should still send a product view event when your users land on a product detail page.

const viewActionOnProduct = {
    "action":"view",
    "target": {
        "product":"83647582"
    },
    "metadata": {
        "locale": "en_GB"
    }
}

xo.activity.send(viewActionOnProduct);

The properties needed for sending a view event on a product detail page when not powered by FHR are as follows:

  • action - you need to specify the action as view

  • target.product - you need to specify the product id of the product on the page. For an FHR integration, this corresponds to the secondId **provided in the FHR query** response.

  • locale - the locale selected by the user.

If you have any extra details you wish to send you can include them in the metadata _**_object.

PreviousGeneric ActionsNextClick

Last updated 3 years ago