Add experiments examples#887
Conversation
| * the treatment arm automatically generates a draft campaign), modify the system-generated draft | ||
| * campaign, and schedule the experiment. | ||
| * | ||
| * <p>Note: This standard draft-based workflow does not apply to all experiment types (e.g., |
There was a problem hiding this comment.
nit: avoid e.g., per https://developers.google.com/style/word-list#eg
| GoogleAdsServiceClient.SearchPagedResponse response = googleAdsServiceClient.search(request); | ||
|
|
||
| boolean experimentFound = false; | ||
| for (GoogleAdsRow row : response.iterateAll()) { |
There was a problem hiding this comment.
Can you get multiple rows back, given you're filtering by experiment_id? If not, it's a little confusing to have a for loop here. You could use something like https://guava.dev/releases/snapshot-jre/api/docs/com/google/common/collect/Iterables.html#getOnlyElement(java.lang.Iterable) instead.
| } | ||
|
|
||
| // [START get_experiment_performance_1] | ||
| private void evaluateExperiment(GoogleAdsClient googleAdsClient, long customerId, GoogleAdsRow row) { |
There was a problem hiding this comment.
Please add javadocs for each method
| * This example illustrates how to retrieve performance metrics for an experiment. | ||
| * | ||
| * <p>It shows how to query statistical significance metrics for the experiment, | ||
| * and how to execute actions such as promoting, ending, or graduating an experiment. |
There was a problem hiding this comment.
The name and description of this example don't make it obvious that running this will potentially modify the state of the experiment.
| } | ||
|
|
||
| private void graduateExperiment(GoogleAdsClient googleAdsClient, long customerId, String experimentResourceName) { | ||
| String budgetResourceName; |
There was a problem hiding this comment.
Some line-level comments would be helpful since this method performs multiple steps
| * copies. | ||
| */ | ||
| public class CreateExperiment { | ||
| public class CreateSearchCustomExperiment { |
There was a problem hiding this comment.
This has the term "Custom" but lines 50 and 56 suggest this is a standard experiment. Are we using "Custom" here because it's customizing a standard experiment, maybe?
No description provided.