Track Clicks on Sale Items

You can create a Web experience that tracks clicks or other interactions with products on sale by creating a custom event in Event Builder to track these clicks.

Creating the Custom Event

Follow these steps to create the click-tracking custom event in Event Builder.

  1. Load your site in a browser, navigate to a page that contains products tagged with a "Sale" badge, and then launch your browser's developer tools to find the element needed for the event.

    Callout of the Inspect option to launch Google Chrome's DevTools in a contextual menu that's displayed over a product on sale on a retail site

  2. As necessary, expand the code to determine if and how you may need to revise the selector so that the custom event counts clicks only when the element contains the text "Sale." (In this example, the selector must be written to find the class product-card if it has the <div> element with the class product-tag that contains the text "Sale.")

    Sample of HTML code for a sale item on a retail site's product list page, as seen in Google Chrome DevTools

  3. Click COMPONENTS in the top navigation bar of the Monetate platform, and then click Events.

    Callout of the Events option in the COMPONENTS menu

  4. Click CREATE EVENT.

    Callout of the CREATE EVENT button on the Events list page

  5. Navigate to a page that contains products tagged with a "Sale" badge, and then click Click on the Interaction tab.

    The Event Builder tool overlays a product category page on which a product has a 'Sale' badge

  6. Find a rough element selector for a product container with a sale product.

    The Element Selector tool in Event Builder, with a container selected for a product on a product list page

  7. On the Details tab, revise the select as needed. To test the selector is accurate, press and hold the Shift key, click an element, and then verify that the click count increases when clicking an item that has the "Sale" badge.

    Callout of a product entry that has a 'Sale' badge and callout of the click count in Event Builder

  8. If necessary, on the Conditions tab, add conditions to limit when the event should track clicks. (In this example, the event should only track clicks on index and search pages, so it requires a Page type = condition with the values index and search.)

    The Conditions tab of Event Builder, with the ADD ACTION selector expanded to show its category options

  9. Give the event a title and a description, and then click CREATE & EXIT.

    The final panel of Event Builder, with the Event Title field, the Description field, and the CREATE & EXIT button

The event is now ready to be used in a Web experience.

Creating the Experience

Follow these steps to create a Web experience to deploy the click-tracking event on your site.

  1. Click EXPERIENCES in the top navigation bar, and then select Web.

    Callout of the Web option in the EXPERIENCES menu of the top navigation bar

  2. Click CREATE EXPERIENCE.

    Callout of the CREATE EXPERIENCE button

  3. Click WHY, select To serve everyone the same experience, and then click NEXT.

    Callout of the WHY settings, the 'To serve everyone the same experience' option, and the NEXT button

  4. Select a goal metric and then click NEXT.

    Callout of the goal metric options and the NEXT button

  5. Click ADD METRIC.

    Callout of the ADD METRIC button

  6. Select the click event you created in Event Builder, and then click CHOOSE SELECTED.

    Tthe Add Metrics modal, with a callout of the CHOOSE SELECTED button

  7. Make any additional adjustments to the secondary metrics as necessary, and then click NEXT.

    Callout of the NEXT button for the secondary metrics configuration

  8. Confirm that you've configured the WHY settings as required and then click SAVE.

    Callout of the SAVE button for the WHY settings

  9. Configure the WHO settings, if necessary. For this use case, the experience should target all site visitors, so there's no need to change the WHO settings.
  10. Configure the WHAT settings with a Data Collect action.
    1. Click WHAT and then click ADD ACTION.

      Callout of the WHAT settings and of the ADD ACTION button

    2. Click Other.

      Callout of the Other option on the Action Type panel of the WHAT settings

    3. Click Data Collect.

      Callout of the Data Collect action template on the Other panel

    4. The action requires no action conditions, so click CREATE.

      Callout of the CREATE button on the Data Collect action template

  11. Because you tested the event when creating it in Event Builder and the experience only collects data, you don't need to preview it. Click ACTIVATE.

    Callout of the ACTIVATE button