Using two different campaigns in single game

Greetings,

I’ve implemented Chartboost plugin with a campaign but now we needed to adjust the ads shown and decided to use 2 separate campaigns (static and video) for our game. For example, it’ll show a static interstitial ad after 2 deaths and a video interstitial after 10 deaths.

Before I start trying out the possibilities, I wanted to ask for a sample code for how I’m going to handle the situation.

Chartboost doesn’t distinguish between static interstitials and video interstitials as they both are displayed using chartboost.show(“interstitial”). Once you activate both campaigns Chartboost will select video or static interstitials based on their availability. You don’t know in advance which one it will be.

I have to admit that I haven’t tried this myself, but if you need to be able to choose between video and static I’d recommend setting up a Rewarded Video campaign instead. You can then call chartboost.show(“rewardedVideo”) when you want to display a video. In this case it’s important to turn off “Pre-roll confirmation” and “Post-roll confirmation” for the campaign in the “Advanced Settings” option of the Chartboost dashboard so that the video will seamlessly display without user interaction.

I assumed rewarded videos pay less so I needed a workaround. Do they pay the same?

Also, am I going to initialize different campaign keys if I want to distinguish between static and video ads? Is it possible to initialize different campaigns each time or can we initialize just the first time? 

Hi again!

The keys are per application, not per campaign. So you can have as many campaigns as you want for an app. When you have multiple campaigns for an app they will be traversed by their priority. 

I don’t know if static video ads pay more than rewarded videos. It may be the case.

I can think of a very complicated way to force static video ads by using a custom location. The problem is that locations are not intended to be used for that purpose and it’s not future proof as Chartboost may decide to only allow their official locations as per the documentation. It’s also messy to maintain, so I highly recommend not to go down that route.

Hi ingemar,

I confuse application and campaign in that case, sorry about that :slight_smile:

Actually, I tried initializing different campaigns but couldn’t make it work between static and video ads. I think the init function works one time only. Maybe we should adjust <Max interstitials per hour> or something like that (or maybe rewarded videos as you suggested).

You should only call chartboost.init() once in the beginning of your app’s lifecycle before calling other chartboost.* methods. Do not try to call chartboost.init more than once as it most likely result in unexpected behaviour.

New campaigns can take a while before they start to deliver impressions (up to a few hours). It also depends on the priority each campaign has, and the region you’re in. Higher priorities will need to have their inventory exhausted before lower priority campaigns kick in. Another thing to keep in mind is that the inventory for video interstitials is less than for static interstitials.

Again since there is only one call to show (static/video) interstitials via chartboost.show(“interstitial”) there’s no way to determine if chartboost will deliver a video or static interstitial.

Have a look at the Chartboost sample app which shows the basic setup.

https://github.com/swipeware/CoronaChartboostSample

Thank you for your the details ingemar. I’ve decided not to separate these two and go with what’s supported. If need be, I’ll switch to the solution you provided with the rewarded ads.

p.s.: I can’t mark it solved but that answer did solve the situation for me. Thank you.

Chartboost doesn’t distinguish between static interstitials and video interstitials as they both are displayed using chartboost.show(“interstitial”). Once you activate both campaigns Chartboost will select video or static interstitials based on their availability. You don’t know in advance which one it will be.

I have to admit that I haven’t tried this myself, but if you need to be able to choose between video and static I’d recommend setting up a Rewarded Video campaign instead. You can then call chartboost.show(“rewardedVideo”) when you want to display a video. In this case it’s important to turn off “Pre-roll confirmation” and “Post-roll confirmation” for the campaign in the “Advanced Settings” option of the Chartboost dashboard so that the video will seamlessly display without user interaction.

I assumed rewarded videos pay less so I needed a workaround. Do they pay the same?

Also, am I going to initialize different campaign keys if I want to distinguish between static and video ads? Is it possible to initialize different campaigns each time or can we initialize just the first time? 

Hi again!

The keys are per application, not per campaign. So you can have as many campaigns as you want for an app. When you have multiple campaigns for an app they will be traversed by their priority. 

I don’t know if static video ads pay more than rewarded videos. It may be the case.

I can think of a very complicated way to force static video ads by using a custom location. The problem is that locations are not intended to be used for that purpose and it’s not future proof as Chartboost may decide to only allow their official locations as per the documentation. It’s also messy to maintain, so I highly recommend not to go down that route.

Hi ingemar,

I confuse application and campaign in that case, sorry about that :slight_smile:

Actually, I tried initializing different campaigns but couldn’t make it work between static and video ads. I think the init function works one time only. Maybe we should adjust <Max interstitials per hour> or something like that (or maybe rewarded videos as you suggested).

You should only call chartboost.init() once in the beginning of your app’s lifecycle before calling other chartboost.* methods. Do not try to call chartboost.init more than once as it most likely result in unexpected behaviour.

New campaigns can take a while before they start to deliver impressions (up to a few hours). It also depends on the priority each campaign has, and the region you’re in. Higher priorities will need to have their inventory exhausted before lower priority campaigns kick in. Another thing to keep in mind is that the inventory for video interstitials is less than for static interstitials.

Again since there is only one call to show (static/video) interstitials via chartboost.show(“interstitial”) there’s no way to determine if chartboost will deliver a video or static interstitial.

Have a look at the Chartboost sample app which shows the basic setup.

https://github.com/swipeware/CoronaChartboostSample

Thank you for your the details ingemar. I’ve decided not to separate these two and go with what’s supported. If need be, I’ll switch to the solution you provided with the rewarded ads.

p.s.: I can’t mark it solved but that answer did solve the situation for me. Thank you.