Monday, May 12, 2014

Google Webmaster tools - import into mysql

For a research project I am integrating all data I can get my hands on in regards to a site (

Majestic, seoclarity, omniture, maxamine, etc. . and for sure, Google webmaster data (and Bing).

I get this data from the 'top pages' in GWT:

Page Impressions Change Clicks Change CTR Change Avg. position Change
http://pageurl/          22,577 19% 3,959 15% 18% -0.5 11 -0.1

So far, so good (and great numbers, team!). When setting up the table, I am not able to use any number format, but end up with using varchar(10) instead of int or decimal, because if I use a number format, I get always 'data truncated' errors. And even with quite some online research, could not find a better way to do this. I change the number format in impressions to not have the comma, and then use string fields. Any idea how I could make this work with number formats?
Likely int for impressions, ???  for Change in % , int for clicks, and decimal for the CTR change, but how?

These are the other scripts to create the table and to load the data:

No comments:

Post a Comment

Bookmark and Share