Upload CSV Google Analytics Data File c# -
i'm trying upload csv file google analytics using c#. theirs example on google developers site here:
https://developers.google.com/analytics/solutions/articles/cost-data-import#custom_data_source
however, uses python. im trying rewrite using c#, isn't turning out easy thought. help?
don't know how implement media code sample site either, "csvtoupload" isn't doing anything. (csvtoupload csv file directory).
code snippet:
public void uploadcsvfile(string csvtoupload, string uploaddate, string accountid, string webpropertyid, string datasourceid) { filestream stream2 = new filestream(csvtoupload, filemode.open); managementresource.dailyuploadsresource.uploadmediaupload dailyuploads = service.management.dailyuploads.upload(accountid, webpropertyid, datasourceid, uploaddate, 1, managementresource.dailyuploadsresource.uploadmediaupload.typeenum.cost, stream2, "data test"); dailyuploads.reset = true; //dailyuploads.uploadasync(); dailyuploads.upload(); stream2.close(); } wanted update code, , post see if me out, here's updated code quest.
any appreciated.

upload has second 1 lets send stream. load csv file stream , try , send way.
Comments
Post a Comment