- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi community,
# Requirement
i want to track the internal search of a website.
There are two article numbers 12345678 and 12345678k for the same product, the article number with the k is just a distinction, if the customer typed it from the catalog.
This is what we want to track, if a customer typed the article number from a catalog or the website.
# Problem
If customer types in the article number in the search field and gets directly to the product page.
Since there is no search page in between there is no query string to parse the search value from.
First idea was to fire a page impression (PI) with KeyUp, SetTimeOut() and Regex.
But if the SetTimeOut() is too short, it wont recognize the k and fires the PI withouth a k at the end.
If the SetTimeOut() is too long, it will be broken by the page load of the new site.
Is there another idea how to send the search query to Webtrekk, perhaps after the new page load?
thank you and greetings
David
Solved! Go to Solution.
06-27-2016 03:54 PM
The best answer to this question and the one least likely to break is to have your web developer call one of the Tealium tracking functions when the user does a search. You can read more here:
https://community.tealiumiq.com/t5/uTag/utag-link-and-utag-view/ta-p/11888
If this is not helpful for your situation, I would encourage you to open a support case as each website is different and the answer to your question is going to be based on how your website is setup.
https://community.tealiumiq.com/t5/custom/page/page-id/support-contact-form
06-27-2016 11:48 PM
thanks Brian for you information.
Could it also be done by using a cookie as a storage (persistent data value) and read out the value after the new page load? If not, it have to consider your first answer as the best option.
06-28-2016 02:30 AM
Looking at your site this might be the way forward:
For search tracking:
$('#search_id_form').on("submit", function(){ utag.loader.SC("search", $("#search_id_input").val()); });
To clear the search tracking:
if (b["cp.search"]) { utag.loader.SC("search","","da"); //Delete the set cookie }
At this point you can map "cp.search" toWebtrekk on the next page view.
Hope this helps.
Adrian
06-29-2016 12:56 AM
thank you Adrian, you helped me alot.
Copyright All Rights Reserved © 2008-2023