Mobile app version of vmapp.org
Login or Join
Si4351233

: 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

@Si4351233

Posted in: #Javascript

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.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

2 Comments

Sorted by latest first Latest Oldest Best

 

@Frith620

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)

10% popularity Vote Up Vote Down


 

@Murphy175

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme