Ejemplo n.º 1
0
def getArguments():
  dateList = collectArguments.getDates()
  date1 = dateList[0]
  date2 = dateList[1]
  filename = collectArguments.getFilename()
#filename = 'C:\\Users\\thambapillair\\Documents\\'+ raw_input('Enter preferred filename')+'.txt'
  dimensionString = collectArguments.collectArguments(dimensions_and_metrics.dimensions)
  metricString = collectArguments.collectArguments(dimensions_and_metrics.metrics)
  #print metricString
  dimensionList = collectArguments.collectLists(dimensionString)
#metricList = metricString.split(',')
  metricList = collectArguments.collectLists(metricString)
  #print dimensionList,metricList
  segment_id = collectArguments.getSegments()
  #for z in range (0,len(dimensionList)-1):
    #print metricList[z]
    #print z
  returnList = [date1,date2,dimensionString,metricString,dimensionList,metricList,filename,segment_id]
  return returnList
Ejemplo n.º 2
0
    "UA-59323-58": "Zaavi.es",
    "UA-59323-76": "Zavvi.nl",
    "UA-9345964-1": "LookFantastic",
    "UA-18807547-1": "Lookfantastic.net",
    "UA-10211190-1": "lookmantastic",
    "UA-19257214-1": "http://www.myprotein.com/de/pages/home",
    "UA-19256573-1": "http://www.myprotein.com/es/pages/home",
    "UA-19256640-1": "http://www.myprotein.com/fr/pages/home",
    "UA-19256474-1": "http://www.myprotein.com/ie/pages/home",
    "UA-19256561-1": "http://www.myprotein.com/it/pages/home",
    "UA-479953-1": "http://www.myprotein.com/uk",
    "UA-2620226-2": "http://www.beautyexpert.co.uk",
    "UA-2620226-1": "http://www.mankind.co.uk",
    "UA-18594156-35": "http://www.myvitamins.com",
}
dimensionString = collectArguments.collectArguments(dimensions_and_metrics.dimensions)
metricString = collectArguments.collectArguments(dimensions_and_metrics.metrics)
dimensionList = dimensionString.split(",")
metricList = metricString.split(",")
# myNewFile.write('Profile\tDesktop Transactions\tDesktop Visits\tDesktop Revenue\tDesktop Conversion Rate\tMobile Transactions\tMobile Visits\tMobile Revenue\tMobile Conversion Rate\tMobile Percentage of Revenue\n')


def main(argv):

    # Step 1. Get an analytics service object.
    service = hello_analytics_api_v3_auth.initialize_service()

    accounts = service.management().accounts().list().execute()
    # accounts is a dictionary that includes some administrative
    # info such as username and email (in this case thehutinsight), but also includes a mapping
    # of 'items' to a list of dictionaries. The list has an entry for
Ejemplo n.º 3
0
def get_arguments():
    dimensionString = ca.collectArguments(dimensions_and_metrics.dimensions)
    metricString = ca.collectArguments(dimensions_and_metrics.metrics)
    return [dimensionString,metricString]
Ejemplo n.º 4
0
def get_arguments():
    dimensionString = ca.collectArguments(dimensions_and_metrics.dimensions)
    metricString = ca.collectArguments(dimensions_and_metrics.metrics)
    return [dimensionString, metricString]