: Track google search keyword in asp classic I want to track google search keyword for site in asp classic. Any user which use any word in google search to reach on my site, I want to track
I want to track google search keyword for site in asp classic. Any user which use any word in google search to reach on my site, I want to track this word.
More posts by @Si4351233
2 Comments
Sorted by latest first Latest Oldest Best
You should be looking at the referer header in the HTTP request and see if your user was coming from the Google search engine. You could match it against a regular expression to match any google domain:
(www.)?google.[a-z]{2,4}
If it does, you can extract the query string parameters from the referer and look for the q parameter. It's value will be the search term the user used before it clicked on the link to your site.
You can get the referer header in ASP with:
Request.ServerVariables("HTTP_REFERER")
(and yes, it's "referer", famously spelled incorrectly)
You can get the referring URL from the ASP Server object and parse out the search term from the string.
The problem with doing this is that Google is going to remove referrer information from some searches. See this link for more info on the change: www.seroundtable.com/google-ssl-drops-query-data-14188.html
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.