Question

A client wants to track after a user searches for store location, which stores are displayed to the user. Is this something omniture can track? On the client's website, after filling out zip code and click on "search for store", the page URL doesn't change. Any advice would be greatly appreciated!

Was it helpful?

Solution

Yes, you can track this, even if the page doesn't reload (sounds like an ajax call is done for the search).

However, tracking which stores were displayed to the visitor probably isn't a practical thing to track, unless you only have a couple of stores...if you have dozens or hundreds etc. then there's no practical way to track that, and the client should also reconsider why they would even want to track that in the first place.

The more feasible and actionable thing to track is just that the user performed the search event itself, and maybe even the zipcode the user enters.

In any case, to track something after page load, you will need to pop the following:

s.linkTrackVars : Any variables you want to track must be "registered" with linkTrackVars. This will ensure that other variables previously set on page load are not also sent in to Omniture and over-counted. You do not use the 's.' prefix in the list, no spaces between the commas, and the variables are case-sensitive. Put whatever variables you intend on populating for the call. If you want to track an event (and you should), 'events' should go in here too (the actual variable name, not the event number).

s.linkTrackEvents : Any events you want to track will need to be added to this variable to register the event. Basically this should be the same value as you use for s.events

Also populate any variable you want to track in the call.

s.tl(true,'o','store location search') : This is the Omniture click tracking method. It takes 3 arguments. The first is used for if you are tracking a link, you should pass the object reference of the link, but since you aren't doing that here, you can just pass true. The 2nd arg specifies the type of tracking. You can do 'd' for download, 'e' for exit, or 'o' for other. The 3rd argument is a description of the tracking call. I just put 'store location search' in there, you can put whatever you want. But it doesn't really matter because that value will show up in the link tracking reports and those reports are useless anyways; you'll be looking at your variable and event reports.

Here is an example of what it would look like put together:

In this example, I am using eVar1 to track the zipcode entered, and event1 to track the search event.

s.linkTrackVars = 'events,eVar1';
s.linkTrackEvents = 'event1';
s.events = 'event1';
s.eVar1 = '12345';
s.tl(true,'o','store location search');

With this example you will be able to see how many store location searches were performed by looking at event1 metric. You will also be able to see what zipcodes were used in the search, from the eVar1 report.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top