Recos Tag enables you to code your own recommendation banners and send automagically events to your analytics based on HTML attributes.
Setup
To start seeing analytics events flowing with Recos Tag and be able to monitor your Recos performances in the upcoming days :
- Be sure that your Recos Tag is up and running by testing that recos exist in your global context by typing in your console
recos
- Enrich the HTML of your recommendation banners data attributes as explained below
Enriching Recommendations Banner HTML to send events to DataLayer through Recos Tag
- Setup your Tag Manager to send Recos events to the analytics tool
Setting up GTM to send Recos Datalayer Events
- Check that Recos Event are sent to GA4
Check that Recos events are sent to GA4 through GTM
How it works
Recos Tag
- captures the events of:
- the appearance of any element with a
-
data-reco-id=[RECO_ID] attribute
where RECO_ID is the id you can find in the top right corner of your experience configure tab - the click of any element with a
-
data-reco-click=[ACTION_ID] attribute
where ACTION_ID is one of the following actions
-
data-reco-click=[ACTION_ID] attribute
-
data-reco-id=[RECO_ID] attribute
- the appearance of any element with a
Recos Analytic Events Actions
go_to_page |
go_to_page when an item is clicked |
add_to_cart_item | add_to_cart_item when an item is added to cart in a recommendation |
add_to_cart_items | add_to_cart_items when all the items recommended are added to cart (likes in bundles) |
close | when an experience is closed |
convert_XXX | when a conversion button is clicked (XXX can be anything) |
- enriches the event with all the data contained in the attributes of the element’s surrounding :
- reco_id : from the first data-reco-id value detected in a parent element
- item_id : from the first data-item-id value detected in a parent element
- item_ids : from all the data-item-id in the children of the first parent element that has an reco-id
- debug_mode : if data-reco-debug attribute is set to true
- pushes it to the dataLayer
- those events then trigger events sent to the Analyttics Tool (this trigger is settup in GTM)