File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 9191}
9292```
9393
94+ ### 2.1. Example - Setting a campaign-specific conversion goal
95+
96+ ```
97+ Backstage backstage = Backstage.builder().build();
98+ BackstageAuthentication auth = backstage.authenticationService().clientCredentials("clientId_example", "clientSecret_example");
99+
100+ CampaignUnipRuleOptimizations conversionRules = new CampaignUnipRuleOptimizations();
101+ UnipRuleConfiguration unipRule = new UnipRuleConfiguration();
102+ unipRule.setId(1L); //-> The ID which you would like the campaign to optimize towards
103+ conversionRules.setRules(Collections.singletonList(unipRule));
104+
105+ CampaignOperation createCampaignOperation = CampaignOperation.create()
106+ .setName("My Campaign")
107+ .setStartDate(new Date())
108+ .setCpc(1.0D)
109+ .setBrandingText("My Branding Text")
110+ .setSpendingLimit(100D)
111+ .setSpendingLimitModel(SpendingLimitModel.ENTIRE)
112+ .setConversionRules(conversionRules);
113+
114+ Campaign campaign = backstage.campaignsService().create(auth, "demo_account_id", createCampaignOperation);
115+ //-> do something with the campaign...
116+ ```
117+
94118### 3. Authentication
95119
96120Supports:
You can’t perform that action at this time.
0 commit comments