/// <summary> /// Main method, to run this code example as a standalone application. /// </summary> /// <param name="args">The command line arguments.</param> public static void Main(string[] args) { // The external upload ID can be any number that you use to keep track of your uploads. long externalUploadId = long.Parse("INSERT_EXTERNAL_UPLOAD_ID"); // Insert the conversion type name that you'd like to attribute this upload to. string conversionName = "INSERT_CONVERSION_NAME"; // Insert email addresses below for creating user identifiers. string[] emailAddresses = { "EMAIL_ADDRESS_1", "EMAIL_ADDRESS_2" }; UploadOfflineData codeExample = new UploadOfflineData(); Console.WriteLine(codeExample.Description); try { codeExample.Run(new AdWordsUser(), conversionName, externalUploadId, emailAddresses); } catch (Exception e) { Console.WriteLine("An exception occurred while running this code example. {0}", ExampleUtilities.FormatException(e)); } }
/// <summary> /// Main method, to run this code example as a standalone application. /// </summary> /// <param name="args">The command line arguments.</param> public static void Main(string[] args) { // The external upload ID can be any number that you use to keep track of your uploads. long externalUploadId = long.Parse("INSERT_EXTERNAL_UPLOAD_ID"); // Insert the conversion type name that you'd like to attribute this upload to. string conversionName = "INSERT_CONVERSION_NAME"; // Insert email addresses below for creating user identifiers. string[] emailAddresses = { "EMAIL_ADDRESS_1", "EMAIL_ADDRESS_2" }; // Insert advertiser upload time. // For times, use the format yyyyMMdd HHmmss tz. For // more details on formats, see: // https://developers.google.com/adwords/api/docs/appendix/codes-formats#date-and-time-formats // For time zones, see: // https://developers.google.com/adwords/api/docs/appendix/codes-formats#timezone-ids string advertiserUploadTime = "INSERT_ADVERTISER_UPLOAD_TIME"; // Insert bridge map version ID. string bridgeMapVersionId = "INSERT_BRIDGEMAP_VERSION_ID"; // Insert partner ID. int partnerId = int.Parse("INSERT_PARTNER_ID"); // Specify the upload type (STORE_SALES_UPLOAD_FIRST_PARTY or STORE_SALES_UPLOAD_THIRD_PARTY) OfflineDataUploadType uploadType = (OfflineDataUploadType)Enum.Parse( typeof(OfflineDataUploadType), "INSERT_UPLOAD_TYPE"); UploadOfflineData codeExample = new UploadOfflineData(); Console.WriteLine(codeExample.Description); try { codeExample.Run(new AdWordsUser(), conversionName, externalUploadId, emailAddresses, advertiserUploadTime, bridgeMapVersionId, uploadType, partnerId); } catch (Exception e) { Console.WriteLine("An exception occurred while running this code example. {0}", ExampleUtilities.FormatException(e)); } }