You can create an experience that tracks clicks or other interactions with products on sale on your site by creating a custom event in Event Builder to track these clicks. This use case includes creating a custom event and then adding it to an experience to track clicks on sale items on a retailer's site.
Creating the Custom Event
Click COMPONENTS in the top navigation bar, select Events, and then click CREATE EVENT.
The client navigates to an index page or a search page that contains products tagged with a "Sale" badge.
In Event Builder click Click on the Interaction tab.
Find the element selector. The client clicks one of the product containers on the page to get the rough selector to be refined on the Details tab.
The client launches Chrome's Developer tools to find the element needed for the event.
The Developer tools reveals that the class need is
Expanding the code in Developer tools reveals the element
product-tag of the class
The event should count this element only if it contains the text "Sale." With that said, the selector must be written to find the class
product-card if it has the element
product-tag that contains the text "Sale." Therefore, the selector is as follows:
Click the forward arrow to move to the Details tab, on which the selector now appears in Element. 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.
Click the forward arrow to move to the Conditions tab. This event should only track on index and search pages, so it requires an action condition. Click ADD CONDITION, expand Page type, and then select Page type =. The client completes the first action condition by typing
index into the field. Repeat the process to create a second Page type = action condition, this time with
search as the value. Because this event should track on index pages or on search pages, click to change the logic from AND to OR.
Click the forward arrow. Give the event a title (for this use case, the event title is "Track Sales Clicks") and a description, and then click CREATE & EXIT.
Configuring the Experience
Create a new experience. Click WHY, select To serve everyone the same experience and then click NEXT.
Select a goal metric and then click NEXT.
Click ADD METRIC.
Select the click event built in Event Builder (in this use case, Track Sale Clicks), and then click CHOOSE SELECTED.
Make any additional adjustments to the secondary metrics as necessary, and then click NEXT.
Confirm that you've configured the WHY settings as required and then click SAVE.
The experience for this use case targets all visitors, so the WHO settings require no changes.
This experience collects data on the client's site and doesn't make any actual changes. Therefore, it uses the Data Collect action. Click WHAT, click ADD ACTION, click Other, and then click Data Collect. The action requires no action conditions, so click CREATE to finish adding the action to the experience.
Activating the Experience
Because you test the event when creating it in Event Builder and the experience only collects data, the experience requires no further quality assurance testing. Click ACTIVATE.