# new mongolab creds:

username: sitetrackerv2
password: joOj8Ok8ditH7o

URI: ds035500-a0.mongolab.com:35500/site_tracker_prod

To connect using the shell:
mongo ds035500-a0.mongolab.com:35500/site_tracker_prod -u sitetrackerv2 -p joOj8Ok8ditH7o

  
# find recent website visits to test site:
db.visits.find( { site: ObjectId("53e10db9988bbc0800768d1d") } ).sort({_id:-1}).limit(10)

# find recent website visits to billion site:
db.visits.find( { site: ObjectId("539f290d94e0c90e002d4304") } ).sort({_id:-1}).limit(10)

# to find a specific visit:
db.visits.find( { page: "http://www.billionauto.com/NewAndUsed-AdvancedVehicleSearch-0-to-0-Volkswagen-40-PricedFrom-0-PriceTo-99999999-0-None-2000000-0-0-0"}).sort({_id:-1}).limit(10)

# to find visits with a keyword:
db.visits.find( { query: { $ne: 'N/A' }, page: /.*keyword.*/i } ).sort({_id:-1}).limit(10)

# to find visits with a keyword on billion:
db.visits.find( { site: ObjectId("539f290d94e0c90e002d4304"), query: { $ne: 'N/A' }, page: /.*keyword.*/i } ).sort({_id:-1}).limit(10)

# to find visit from a specific gclid:
db.visits.find( { query: { $ne: 'N/A' }, page: /.*gclid=CO2cpOLFosACFWoR7AodEBUAGA.*/i } ).sort({_id:-1}).limit(10)

db.visits.find( { query: { $ne: 'N/A' }, page: /.*gclid=CN_fhLXFosACFZTm7Aod9xkACg.*/i } ).sort({_id:-1}).limit(10)

db.visits.find( { query: { $ne: 'N/A' }, page: /.*gclid=CLWll43LosACFStk7AodV3IAFg.*/i } ).sort({_id:-1}).limit(10)


# export phones (still old URL)
mongoexport -h ds049538.mongolab.com:49538 -d heroku_app25424482 -u heroku_app25424482 -p e9a1jadk4v8d0t77jbolsmv5g2 -c phones -o /Users/petersperry/Desktop/phones.json
