Page 1 of 1
buyer search statistics
Posted: Thu May 15, 2008 9:16 pm
by spencer321
anyway to see what the terms buyers are searching for on my site?
Re: buyer search statistics
Posted: Fri May 16, 2008 6:42 am
by m_plugables
A simple way is to write keywords to some text file for each search made by user. For this just get the entered text information on search control and put it in some text file.
Re: buyer search statistics
Posted: Fri May 16, 2008 6:47 am
by m_plugables
Create a text file with name
SearchInformation.txt in
App_Data
folder of website.
Now edit the
ConLib/SimpleSearch.ascx.cs file. Locate follwoing
function in it
Code: Select all
protected void SearchButton_Click(object sender, EventArgs e)
and make it look like
Code: Select all
protected void SearchButton_Click(object sender, EventArgs e)
{
string fileName =
Server.MapPath("~/App_Data/SearchInformation.txt");
if(File.Exists(fileName))
{
FileStream fileStream = null;
StreamWriter streamWriter = null;
try
{
fileStream = new FileStream(fileName, FileMode.Append,
FileAccess.Write);
streamWriter = new StreamWriter(fileStream);
streamWriter.Write(Environment.NewLine);
streamWriter.Write(SearchPhrase.Text);
streamWriter.Flush();
}
catch
{}
finally
{
streamWriter.Close();
fileStream.Close();
}
}
string safeSearchPhrase = StringHelper.StripHtml(SearchPhrase.Text);
if (!string.IsNullOrEmpty(safeSearchPhrase))
Response.Redirect("~/Search.aspx?k=" +
Server.UrlEncode(safeSearchPhrase));
Response.Redirect("~/Search.aspx");
}
Add following statement in the other
using statements at top of the file
Now you can find each searched keyword in the
App_Data/SearchInformation.txt
Re: buyer search statistics
Posted: Mon May 19, 2008 8:26 am
by rdevarona
Spenser321,
The easiest way to do this is to use Google Analytics' Site Search function (
http://analytics.blogspot.com/2007/11/s ... lable.html).
Regards,
rdv
Re: buyer search statistics
Posted: Wed May 21, 2008 11:36 am
by spencer321
the google site search tracking will work great for the search box on the home page of the ablecommerce site. thanks. however, i don't think it will work with the advanced search page. the url doesn't change on this site. there isn't a search paramenter that google analytics can look for to parce out search results. unless I'm mistaken?
- Spencer
Re: buyer search statistics
Posted: Wed Jul 21, 2010 10:55 pm
by meer2005
What did you guys enter for the Query Parameter in google analytics to track the search terms?
Re: buyer search statistics
Posted: Thu Jul 22, 2010 7:10 am
by jmestep
I think I might have entered k , but I can't find it now. I'm not sure GA will pick them all up if the k is in a form post and not the querystring, but that is just a vague feeling I have from the past and might not be true.
Re: buyer search statistics
Posted: Thu Jul 22, 2010 9:37 am
by meer2005
Yeah, I had k in there. I guess it just took a couple days to start receiving data. Looks like it's working now with the value k
Re: buyer search statistics
Posted: Thu Jul 22, 2010 11:10 am
by igavemybest
Yeah, we utilize google analytics with ecommerce integration. By far the best option to not only see search terms, but conversion rates, aferage sale amounts, revenue, etc. Not to mention it's free!