इंट्रा-कैंपेन एक्सपेरिमेंट का इस्तेमाल, किसी एक कैंपेन में किसी खास सुविधा की जांच करने के लिए किया जाता है. सिस्टम-मैनेज किए जाने वाले एक्सपेरिमेंट में, ट्रैफ़िक को कंट्रोल और ट्रीटमेंट कैंपेन के बीच बांटा जाता है. वहीं, इंट्रा-कैंपेन एक्सपेरिमेंट में, ट्रैफ़िक को कैंपेन में ही बांटा जाता है. यह बंटवारा, सुविधा चालू है या नहीं, इस पर निर्भर करता है.
यह वर्कफ़्लो, निम्नलिखित
ExperimentType वैल्यू के लिए उपलब्ध है:
ADOPT_AI_MAXADOPT_BROAD_MATCH_KEYWORDS
सेटअप
Experimentतय करें. इसके लिए, एक्सपेरिमेंट का टाइप, कंट्रोलExperimentArm, और ट्रीटमेंटExperimentArmतय करें. हर ग्रुप को एक ही कैंपेन से रेफ़रंस करना चाहिए.- फ़ील्ड मास्क का इस्तेमाल करके, एक्सपेरिमेंट के लिए टेस्ट सुविधा चालू करें.
ADOPT_BROAD_MATCH_KEYWORDSके लिए, यह ज़रूरी नहीं है. इसके बजाय, एक्सपेरिमेंट बनाने पर ब्रॉड मैच कैंपेन की सेटिंग अपने-आप चालू हो जाएगी. GoogleAdsService.Mutateअनुरोध भेजें. इसमें एक्सपेरिमेंट और एक्सपेरिमेंट ग्रुप बनाने के लिए, म्यूटेट करने की कार्रवाइयां शामिल हों. साथ ही, इसमें टेस्ट सुविधा चालू करने की कार्रवाई भी शामिल हो (अगर लागू हो).
सेटअप होने के बाद, ट्रैफ़िक को कैंपेन में इस तरह बांटा जाता है कि 50% ट्रैफ़िक, चालू की गई सुविधा (ट्रीटमेंट ग्रुप) को दिखे और 50% ट्रैफ़िक को न दिखे (कंट्रोल ग्रुप).
Java
// Create the experiment resource name using a temporary ID. String experimentResourceName = ResourceNames.experiment(customerId, -1L); // Create the experiment. Experiment experiment = Experiment.newBuilder() .setResourceName(experimentResourceName) .setName("ADOPT_AI_MAX Experiment #" + UUID.randomUUID()) .setType(ExperimentType.ADOPT_AI_MAX) .build(); MutateOperation experimentOperation = MutateOperation.newBuilder() .setExperimentOperation(ExperimentOperation.newBuilder().setCreate(experiment).build()) .build(); // Create the control arm. Both arms in an intra-campaign experiment reference the same base // campaign. ExperimentArm controlArm = ExperimentArm.newBuilder() .setExperiment(experimentResourceName) .setName("Control Arm") .setControl(true) .setTrafficSplit(50) .addCampaigns(ResourceNames.campaign(customerId, campaignId)) .build(); MutateOperation controlArmOperation = MutateOperation.newBuilder() .setExperimentArmOperation( ExperimentArmOperation.newBuilder().setCreate(controlArm).build()) .build(); // Create the treatment arm. ExperimentArm treatmentArm = ExperimentArm.newBuilder() .setExperiment(experimentResourceName) .setName("Treatment Arm") .setControl(false) .setTrafficSplit(50) .addCampaigns(ResourceNames.campaign(customerId, campaignId)) .build(); MutateOperation treatmentArmOperation = MutateOperation.newBuilder() .setExperimentArmOperation( ExperimentArmOperation.newBuilder().setCreate(treatmentArm).build()) .build(); // Create a campaign operation with an update mask to enable AI Max and configure asset // automation settings. // Note: For intra-campaign experiments, these settings are applied to the base campaign but are // only active for the treatment traffic split. Campaign campaign = Campaign.newBuilder() .setResourceName(ResourceNames.campaign(customerId, campaignId)) .setAiMaxSetting(AiMaxSetting.newBuilder().setEnableAiMax(true).build()) .addAssetAutomationSettings( AssetAutomationSetting.newBuilder() .setAssetAutomationType(AssetAutomationType.TEXT_ASSET_AUTOMATION) .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN) .build()) .addAssetAutomationSettings( AssetAutomationSetting.newBuilder() .setAssetAutomationType( AssetAutomationType.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION) .setAssetAutomationStatus(AssetAutomationStatus.OPTED_IN) .build()) .build(); CampaignOperation campaignOp = CampaignOperation.newBuilder() .setUpdate(campaign) .setUpdateMask(FieldMasks.allSetFieldsOf(campaign)) .build(); MutateOperation campaignMutateOperation = MutateOperation.newBuilder().setCampaignOperation(campaignOp).build(); // Send all mutate operations in a single Mutate request. List<MutateOperation> mutateOperations = ImmutableList.of( experimentOperation, controlArmOperation, treatmentArmOperation, campaignMutateOperation); try (GoogleAdsServiceClient googleAdsServiceClient = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) { MutateGoogleAdsRequest request = MutateGoogleAdsRequest.newBuilder() .setCustomerId(Long.toString(customerId)) .addAllMutateOperations(mutateOperations) .build(); MutateGoogleAdsResponse response = googleAdsServiceClient.mutate(request);
C#
// Create the experiment resource name using a temporary ID. string experimentResourceName = ResourceNames.Experiment(customerId, -1); // Create the experiment. MutateOperation experimentOperation = new MutateOperation() { ExperimentOperation = new ExperimentOperation() { Create = new Experiment() { ResourceName = experimentResourceName, Name = $"ADOPT_AI_MAX Experiment #{ExampleUtilities.GetRandomString()}", Type = ExperimentType.AdoptAiMax } } }; // Create the control arm. Both arms in an intra-campaign experiment // reference the same base campaign. MutateOperation controlArmOperation = new MutateOperation() { ExperimentArmOperation = new ExperimentArmOperation() { Create = new ExperimentArm() { Experiment = experimentResourceName, Name = "Control Arm", Control = true, TrafficSplit = 50, Campaigns = { ResourceNames.Campaign(customerId, campaignId) } } } }; // Create the treatment arm. MutateOperation treatmentArmOperation = new MutateOperation() { ExperimentArmOperation = new ExperimentArmOperation() { Create = new ExperimentArm() { Experiment = experimentResourceName, Name = "Treatment Arm", Control = false, TrafficSplit = 50, Campaigns = { ResourceNames.Campaign(customerId, campaignId) } } } }; // Create a campaign operation with an update mask to enable AI Max and // configure asset automation settings. // Note: For intra-campaign experiments, these settings are applied to the // base campaign but are only active for the treatment traffic split. Campaign campaign = new Campaign() { ResourceName = ResourceNames.Campaign(customerId, campaignId), AiMaxSetting = new Campaign.Types.AiMaxSetting { EnableAiMax = true } }; campaign.AssetAutomationSettings.Add(new Campaign.Types.AssetAutomationSetting { AssetAutomationType = AssetAutomationType.TextAssetAutomation, AssetAutomationStatus = AssetAutomationStatus.OptedIn }); campaign.AssetAutomationSettings.Add(new Campaign.Types.AssetAutomationSetting { AssetAutomationType = AssetAutomationType.FinalUrlExpansionTextAssetAutomation, AssetAutomationStatus = AssetAutomationStatus.OptedIn }); MutateOperation campaignOperation = new MutateOperation() { CampaignOperation = new CampaignOperation() { Update = campaign, UpdateMask = FieldMasks.AllSetFieldsOf(campaign) } }; // Send all mutate operations in a single Mutate request. List<MutateOperation> mutateOperations = new List<MutateOperation> { experimentOperation, controlArmOperation, treatmentArmOperation, campaignOperation }; MutateGoogleAdsResponse response = googleAdsService.Mutate( customerId.ToString(), mutateOperations);
PHP
This example is not yet available in PHP; you can take a look at the other languages.
Python
# Create the experiment resource name using a temporary ID. experiment_resource_name = googleads_service.experiment_path( customer_id, "-1" ) # Create the experiment. experiment_operation = client.get_type("MutateOperation") experiment = experiment_operation.experiment_operation.create experiment.resource_name = experiment_resource_name experiment.name = f"ADOPT_AI_MAX Experiment #{uuid4()}" experiment.type_ = client.enums.ExperimentTypeEnum.ADOPT_AI_MAX # Create the control arm. Both arms in an intra-campaign experiment # reference the same base campaign. control_arm_operation = client.get_type("MutateOperation") control_arm = control_arm_operation.experiment_arm_operation.create control_arm.experiment = experiment_resource_name control_arm.name = "Control Arm" control_arm.control = True control_arm.traffic_split = 50 control_arm.campaigns.append( googleads_service.campaign_path(customer_id, campaign_id) ) # Create the treatment arm. treatment_arm_operation = client.get_type("MutateOperation") treatment_arm = treatment_arm_operation.experiment_arm_operation.create treatment_arm.experiment = experiment_resource_name treatment_arm.name = "Treatment Arm" treatment_arm.control = False treatment_arm.traffic_split = 50 treatment_arm.campaigns.append( googleads_service.campaign_path(customer_id, campaign_id) ) # Create a campaign operation with an update mask to enable AI Max and # configure asset automation settings. # Note: For intra-campaign experiments, these settings are applied to the # base campaign but are only active for the treatment traffic split. campaign_operation = client.get_type("MutateOperation") campaign = campaign_operation.campaign_operation.update campaign.resource_name = googleads_service.campaign_path( customer_id, campaign_id ) campaign.ai_max_setting.enable_ai_max = True for asset_automation_type_enum in [ client.enums.AssetAutomationTypeEnum.TEXT_ASSET_AUTOMATION, client.enums.AssetAutomationTypeEnum.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION, ]: asset_automation_setting = client.get_type( "Campaign" ).AssetAutomationSetting() asset_automation_setting.asset_automation_type = ( asset_automation_type_enum ) asset_automation_setting.asset_automation_status = ( client.enums.AssetAutomationStatusEnum.OPTED_IN ) campaign.asset_automation_settings.append(asset_automation_setting) client.copy_from( campaign_operation.campaign_operation.update_mask, protobuf_helpers.field_mask(None, campaign._pb), ) # Send all mutate operations in a single Mutate request. mutate_operations = [ experiment_operation, control_arm_operation, treatment_arm_operation, campaign_operation, ] response = googleads_service.mutate( customer_id=customer_id, mutate_operations=mutate_operations, )
Ruby
This example is not yet available in Ruby; you can take a look at the other languages.
Perl
This example is not yet available in Perl; you can take a look at the other languages.
curl
एक्सपेरिमेंट की रिपोर्ट
कंट्रोल और ट्रीटमेंट ग्रुप का ट्रैफ़िक, एक ही कैंपेन में मिक्स होता है. इसलिए, कंट्रोल और ट्रीटमेंट ग्रुप के बीच मेट्रिक की तुलना करने के लिए, आपको एक्सपेरिमेंट की डायरेक्ट रिपोर्टिंग का इस्तेमाल करना होगा. कैंपेन-लेवल की स्टैंडर्ड रिपोर्टिंग में, सिर्फ़ पूरे कैंपेन के लिए इकट्ठा की गई मेट्रिक दिखती हैं. इसमें दोनों ग्रुप के बीच अंतर नहीं किया जा सकता.
इंट्रा-कैंपेन एक्सपेरिमेंट ADOPT_AI_MAX के लिए, क्लिक के आंकड़े पाने के लिए, GAQL की इस क्वेरी का इस्तेमाल किया जा सकता है.
SELECT
experiment.resource_name,
experiment.name,
metrics.clicks,
metrics.control_clicks,
metrics.clicks_point_estimate,
metrics.clicks_p_value
FROM experiment
WHERE experiment.type = 'ADOPT_AI_MAX'
एक्सपेरिमेंट को प्रमोट करना या खत्म करना
नतीजों का आकलन करने के बाद, एक्सपेरिमेंट को खत्म किया जा सकता है या प्रमोट किया जा सकता है
ExperimentService.
- खत्म करना: अगर आपको नतीजे पसंद नहीं आए, तो
EndExperimentका इस्तेमाल करें. इससे सुविधा बंद हो जाएगी. साथ ही, कैंपेन में एक्सपेरिमेंट की सुविधा के बिना, सारा ट्रैफ़िक दिखने लगेगा. यह एक सिंक्रोनस ऑपरेशन है. - प्रमोट करना: अगर आपको नतीजे पसंद आए, तो
PromoteExperimentका इस्तेमाल करें. इससे एक्सपेरिमेंट के लिए किया गया बदलाव, कैंपेन की नई परमानेंट स्थिति के तौर पर लागू हो जाएगा. यह एक एसिंक्रोनस ऑपरेशन है. ज़्यादा जानकारी के लिए, एसिंक्रोनस गड़बड़ियां देखें.
इंट्रा-कैंपेन एक्सपेरिमेंट के लिए, ग्रैजुएट ऑपरेशन उपलब्ध नहीं है. इसकी वजह यह है कि ग्रैजुएट करने के लिए, कोई अलग ट्रीटमेंट कैंपेन नहीं होता.