/// <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) {
      string conversionName = "INSERT_CONVERSION_NAME_HERE";
      // GCLID needs to be newer than 30 days.
      string gClId = "INSERT_GOOGLE_CLICK_ID_HERE";
      //  The conversion time should be higher than the click time.
      string conversionTime = "INSERT_CONVERSION_TIME_HERE";
      double conversionValue = double.Parse("INSERT_CONVERSION_VALUE_HERE");

      UploadOfflineConversions codeExample = new UploadOfflineConversions();
      Console.WriteLine(codeExample.Description);
      try {
        codeExample.Run(new AdWordsUser(), conversionName, gClId, conversionTime, conversionValue);
      } catch (Exception e) {
        Console.WriteLine("An exception occurred while running this code example. {0}",
            ExampleUtilities.FormatException(e));
      }
    }
Exemple #2
0
        /// <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)
        {
            string conversionName = "INSERT_CONVERSION_NAME_HERE";
            // GCLID needs to be newer than 30 days.
            string gClId = "INSERT_GOOGLE_CLICK_ID_HERE";
            //  The conversion time should be higher than the click time.
            string conversionTime  = "INSERT_CONVERSION_TIME_HERE";
            double conversionValue = double.Parse("INSERT_CONVERSION_VALUE_HERE");

            UploadOfflineConversions codeExample = new UploadOfflineConversions();

            Console.WriteLine(codeExample.Description);
            try {
                codeExample.Run(new AdWordsUser(), conversionName, gClId, conversionTime, conversionValue);
            } catch (Exception e) {
                Console.WriteLine("An exception occurred while running this code example. {0}",
                                  ExampleUtilities.FormatException(e));
            }
        }