Skip to content

Instantly share code, notes, and snippets.

@woahdae
Created March 16, 2011 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woahdae/873252 to your computer and use it in GitHub Desktop.
Save woahdae/873252 to your computer and use it in GitHub Desktop.
# Relevant for http://local.seomoz.org:3000/campaigns/1/rankings
Keyword.all.each do |keyword|
[ Week.current.previous,
Week.current.previous.previous,
Week.current.previous.previous.previous ].each do |week|
GA::KeywordMetric.create({
"google_analytics_connection_id"=>2,
"google_analytics_engine_id"=> 96,
"week"=> week,
"organic_visits"=>rand(100),
"keyword"=> keyword})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment