e-comm: Product Viewed
The "Product Viewed" event forms the top of the e-commerce funnel in many Adobe Analytics implementations. It is typically sent when the user is viewing details about a product. For Adobe Analytics we must set (at a minimum) the prodView event, and a single productID in s.products.
Overview
Starting with this event that the application pushes to the data layer (window.appEventData in this case)...
...we will create a rule in Launch that will build and send a beacon to record the event Adobe Analytics. The steps that we will detail are:
Create a rule triggered by the Data Layer Manager : Data Layer Push for "Product Viewed"
Add an Adobe Analytics Action to set prodView and event21 in the events string.
Add an AA Product String Builder Action to set the product string Category and ProductID fields.
Add an Adobe Analytics Action to Send a Beacon
Test this event in the browser console.
After all is said and done, our rule will look like this:
Step 1 - Event Trigger: Data Layer Push - Product Viewed
The event that triggers our rule is provided by the Data Layer Manager extension. Select from the options or type in "Product Viewed" for Event Name. We get this value from the event key in the data layer push code shown above.
Step 2 - Adobe Analytics - Set Vars
Using the Adobe Analytics extension's Set Variables action, we set prodView and event21 (our AA Custom event for reporting outside of "products").
Step 3 - AA Product String Builder - Set Variables
This action works in concert with the Adobe Analytics Set Variables action. For this simple case we only need to set four values.
Product Collection Path - This tells the Product String Builder how to find the product collection. A product Collection is an Array of objects containing product information.
Category - This populates the first part of the product string. Setting it to "product" is one way of telling Adobe Analytics that this is a "real product". In advanced scenarios we use the product string to represent things like "payments" or "shipments" (and set the Category value accordingly).
Product ID - This is the unique identifier of the product that is being viewed. In this example, the path within the product collection to the Product ID is productInfo.productID.
Step 4 - Adobe Analytics - Send Beacon
This step is pretty basic, but included here to be complete. We are using a Custom Link beacon here and setting the Link Name to "Product Viewed". There is nothing special about this; use any value that you like.
Step 5 - Testing in the console
Last updated
Was this helpful?