Adobe Analytics Integration
Enable Adobe Analytics in SearchBlox Search Template
Analytics is enabled when the field 'enableAnalytics' is made true in the custom UI template facet.js file
"enableAnalytics":true
Facet.js file path: https://{server-domain}/{search_UI_name}/facet.js
Or
Enabled through widget code in index.html by input hidden tag
<input type="hidden" id="sb_enable_analytics" value="true"/>
This integration can be supported with SearchBlox custom UI search templates upon request. Please contact [email protected] to know more.
To Track Analytics when User Performs Search
Once a user performs a search, we will track keywords all the time and if the search is successful we will pass with search result events 'event1'
window.marTech.trackState({
pageName: "SB|search_results",
searchType: "internal_search",
searchTerm: search_term,
events: "event1"
});
And if the search is unsuccessful (when no results displayed) we will pass without search result events 'event1,event2'
window.marTech.trackState({
pageName: "SB|search_results",
searchType: "internal_search",
searchTerm: search_term,
events: "event1,event2"
});
- Here, the 'searchTerm' is a search query that is captured with all lowercase and space replaced with an underscore.
Note: We will pass these values only when the actual search happens and a new search term is added, not on the page reload or if the same search term is used consecutively.
To Track Analytics when User clicks on any Search UI Tab
Once a user lands on the search results page and clicks on tabs, we will track fields to the 'trackAction' function of the Martech Object.
window.marTech.trackAction({
pageName: "SB|search_results",
linkType: "interaction",
linkPage: "SB|search_results",
linkPosition: "search_results",
events: "event49,event52",
linkName: tab_name
});
- Here, 'linkName' property stores a user-clicked tab name that is captured with all lowercase and space, & is replaced with an underscore.
To Track Analytics when a User clicks on Featured Results
We have Featured Results supported with or without tabs.
Once a user clicks on the Featured Result title, we will track fields to the 'trackAction' function of the 'marTech' Object.
window.marTech.trackAction({
pageName: "SB|search_results",
linkType: "navigation",
linkPage: "SB|search_results",
events: "event11,event52",
linkName: featured_result_title,
linkURL: featureresulturl,
linkPosition: tab_name+"|featured_results”
});
-
Here, linkName is a Featured Result title with all lowercase and space replaced with an underscore.
linkURL is Featured Result URL -
The property 'linkPosition' stores 'tab_name|featured_results'. Here, the tab name is the tab where the User gets Featured Result. Tab names are all lowercase and space, & replaced with underscores.
To Track Analytics when a User clicks on Top Results
We have Top results that come in all Tabs or without Tabbed search display.
Once a user clicks on the Top result title, we will track fields to the 'trackAction' function of the 'marTech' Object.
window.marTech.trackAction({
pageName: "SB|search_results",
linkType: "navigation",
linkPage: "SB|search_results",
events: "event11,event52",
linkName: top_result_title,
linkURL: topresulturl,
linkPosition: "all|top_results"
});
-
Here, 'linkName' property stores the Top Result title with all lowercase and space replaced with an underscore.
-
The property 'linkURL' stores the Top Result URL.
To Track Analytics when the User apply or Reset Filter
Once a user applies or resets filters, we will track fields to the 'trackAction' function of the 'marTech' Object.
window.marTech.trackAction({
pageName:"SB|search_results",
linkType:"interaction",
linkPage:"SB|search_results",
events:"event49,event52",
linkName:"apply" OR "reset_filter",
linkPosition:"search_results|"+tab_name,
linkExtraInfo: [facetname:filtervalue]
});
-
Here, the property 'linkName' stores value 'apply' if the user is applying a filter for search results.
-
The property 'linkName' stores value 'reset_filter' if the user is resetting the filter for search results.
-
In 'linkPosition', 'tab_name' is the tab where the User gets Results. Tab names are all lowercase and space, & replaced with underscores.
-
The property 'linkExtraInfo' is an array of applied OR reset 'facetname': 'filtervalue'
To Track Analytics when user clicks on the Search result Title in Tab Sections
If the user interacts with any link across the tabs on the search results page will track the following fields:
window.marTech.trackAction({
pageName:"SB|search_results",
linkPage:"SB|search_results",
linkType: "download" OR "navigation" OR "social" OR "exit",
linkPosition: tab_name|section_name,
linkName: result_title,
linkURL: resulturl,
events: "event12,event52" OR "event11,event52" OR "event13,event52" OR "event51,event52" OR "event56,event52" (based on linkType)
});
- The property 'linkPosition' as 'tab_name|section_name' based on the specific interaction. Both tab 'name' and 'section' should be generated based on the user interaction.
Eg: If the user interacts with any link on the ALL tab under section we will be triggering this as all|.
We will see the same link under tab too, say if the user interacts with the link here we will pass the value as |.
All lower case with space,& replaced with underscores.
-
The property 'linkName' is the Search Result title with all lowercase and space replaced with an underscore.
-
The property 'linkURL' is the search result URL.
-
The property 'linkType' is tracked on the condition mentioned below:
-- If the result content type is pdf, Docx, Word, Excel then 'linkType' is 'download'
-- If the result URL contains any extensions that are mentioned in the 'navigationDomains' field of the facet.js file then the 'linkType' is 'navigation'
-- If the search result URL contains keywords like Facebook, YouTube, Twitter then 'linkType' is 'social'
-- If the search result title or URL contains a mobile number then 'linkType' is 'mobile'
-- If the above cases fail then 'linkType' is 'exit'
- Events are based on 'linkType'.
events="event12,event52"
- If 'Download' link type is used
events="event11,event52"
- If 'Navigation' link type is used
events="event13,event52"
- If 'Exit' link type is used
events="event51,event52"
- If 'Social' link type is used
events="event56,event52"
- If 'Phone' link type is used
Updated over 2 years ago