-
Notifications
You must be signed in to change notification settings - Fork 0
Internal search engine 1eb5c0
Before starting implementation of internal search engine plugin, please ensure that you have initialised the AT Internet JavaScript tracker and selected the plugin from the Tag Composer interface.
The objective of this plugin is to allow the measurement of internal searches on your site.
The internal search engine plugin can be set up from within the Tag Composer interface:
- Query string variables for keywords entered: Automatically retrieves the keywords entered during the search in this variable
- Query string variable for the page number: Automatically retrieves the results page number in this variable
- Query string variable for the position of clicked result: Automatically retrieves the position of the clicked result found in this variable
- Automatic click management: : When a click triggers navigation or a redirection, browsers prevent the measurement of these links. This automatic management enables measurement to be forced.
- Automatic click management timeout: : Time after which automatic click management will force the navigation, even if measurement could not be completed (in milliseconds).
To tag your searches, the tracker exposes an internalSearch object which in turn provides 2 methods::
- ***set :***used with the dispatch method of the tracker. Used to track search results page information
- send : sporadic measurement during an event. Used to track search result clicks information
These methods are described in more detail in the Tracker’s operating principles
Parameters
| Property | Description |
|---|---|
| keyword | Keywords entered during the search |
| resultPageNumber | Page number of the results page (‘0’ if no result available) |
| resultPosition | Position of the element on which the user clicked |
Optional parameters (only for send method)
| Property | Description |
|---|---|
| elem | Tagged DOM element |
| event | JavaScript event (prevent event propagation) – since v5.7.0 |
| callback | Function to execute – since v5.7.0 |
var tag = new ATInternet.Tracker.Tag();
tag.internalSearch.set({
keyword:'mySearch',
resultPageNumber:'2'
});
tag.page.set({name:'Search_result_page'});
tag.dispatch();If the tagging information is available during the click (keyword/page number of the results page/position of the element clicked within the results).
<script type="text/javascript">
var tag = new ATInternet.Tracker.Tag();
</script>
<a href="http://www.site.com" onclick="return tag.internalSearch.send({elem:this,keyword:'mySearch',resultPageNumber:'2',resultPosition:'11'});">
Product
</a>If this information is only available on the landing page, just add the following tagging to the page in question:
var tag = new ATInternet.Tracker.Tag();
tag.internalSearch.send({
keyword:'mySearch',
resultPageNumber:'2',
resultPosition:'11'
});- Set up the variables which must be automatically retrieved in the URL (2 possibilities)
- Via the Tag Composer interface (preferred when different search pages are available on the site)
- Variable query string for the keywords entered (eg.: indicate “kw” for keyword)
- Variable query string for the page number (eg.: indicate “pagenum” for the page number)
- Via the initialisation of the tag (preferred when only one search page is measured)
- Via the Tag Composer interface (preferred when different search pages are available on the site)
var myConfig = {
InternalSearch : {
urlKeyword:'kw',
urlResultPageNumber:'pagenum'
}
}
var tag = new ATInternet.Tracker.Tag(myConfig);- Tag the page with the query string variables
Example URL for the above configuration:
http://www.site.com/?**kw**=mySearch&**pagenum**=2
Research data is automatically sent when the page is hit:
tag.page.set({name:'Search Page'});
tag.page.dispatch();The data tagged via the internalSearch.set/internalSearch.send methods takes priority over the data retrieved from the URL
It is possible to replace the “?” with a “#” to avoid referencing the searches
Last update: 09/10/2019
-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android