This code analyzes search referral data from Google Webmaster Tools.
To run the analysis on your site, first download a data set of search data:
- Go to "Traffic > Search Queries"
- Select a date range
- Select "Show [500] rows"
- In the URL, replace "grid.s=500" with "grid.s=10000" (or some very large number)
- Click "Download this table" to download the CSV file.
Then, define the branded keywords for your site in run_keyword_analysis.py
.
You need to modify the regular expression re_branded
.
Finally, run python run_keyword_analysis.py -c CSVFILE -o OUTPUT_DIRECTORY
to run the analysis. This writes a few plots plus a list of all branded
keywords to the output directory.
This was developed in Python 2.6/7 and built on top of numpy
and matplotlib
.