How do I create a campaign default ad

5,218 views
Skip to first unread message

wei...@mediacom.com

unread,
Mar 13, 2012, 4:07:24 PM3/13/12
to Google's DoubleClick for Advertisers API Forum
Hello,

I am trying to create a campaign default ad. The image has already
been uploaded to the campaign. The following code runs with no error.
But result.id is 0. Is there anything I did wrong?

var dfaCampaign =
someCampaignRemoteService.getCampaign(someCampaignId);
var dfaCreative =
someCreativeRemoteService.getCreative(someCreativeId);

var creativeAssignment = new CreativeAssignment
{
clickThroughUrl = new ClickThroughUrl
{ customClickThroughUrl = "test.com" },
creativeId = someCreativeId,
alternalteText = string.Empty,
startDate = null,
active = true,
weight = 0
};

var defaultAd = new DefaultAd()
{
active = true,
archived = false,
campaignId = dfaCampaign.id,
startTime = dfaCampaign.startDate,
endTime = dfaCampaign.endDate,
comments = "default ad",
creativeAssignment = creativeAssignment,
sizeId = dfaCreative.sizeId,
typeId = 13
};

var result = someAdRemoteService.saveAd(defaultAd);

Thanks!
Wei

DFA API Advisor

unread,
Mar 13, 2012, 4:24:18 PM3/13/12
to Google's DoubleClick for Advertisers API Forum
Hi Wei,

I think your problem might be that there's no name set for this ad.

As a side note, I'm guessing you're using v1.16 of the API. In v1.17,
we updated the validation logic for saving a DefaultAd to make it
return a meaningful error message instead of an ad ID of 0. Using
v1.17 to debug this call would probably make the problem clear.

Cheers,
- Joseph DiLallo, the DFA API Team

Wei Sun

unread,
Mar 15, 2012, 10:56:54 AM3/15/12
to Google's DoubleClick for Advertisers API Forum
Hi Joseph,

I updated to v1.17 and also set the name. Now I am getting a
SoapException: 97167 - Default ads can't be created.

Wei

DFA API Advisor

unread,
Mar 15, 2012, 11:39:49 AM3/15/12
to Google's DoubleClick for Advertisers API Forum
Hi Wei,

Default ads can't be created... that's interesting. Off the top of my
head, I can only think of one situation where you are not allowed to
create a default ad - when the target campaign already contains one
for that size. There is a hard cap of one default ad per size per
campaign.

Is that the issue you're running into? If not, could you send me the
ID numbers you are using here? Campaign, size, etc.

Regards,
- Joseph DiLallo, the DFA API Team

DFA API Advisor

unread,
Mar 15, 2012, 11:51:01 AM3/15/12
to Google's DoubleClick for Advertisers API Forum
Hi Wei,

Sorry to double e-mail - something just came to mind. If you can grab
the Request ID from the response message SOAP header, I can use that
to pull your request from our logs.

Cheers,
- Joseph DiLallo, the DFA API Team

Wei Sun

unread,
Mar 15, 2012, 2:06:30 PM3/15/12
to Google's DoubleClick for Advertisers API Forum
No problem. Request id is c7bd9463-816c-44bf-8fa4-f3dcf4874769

Wei

DFA API Advisor

unread,
Mar 15, 2012, 3:37:25 PM3/15/12
to Google's DoubleClick for Advertisers API Forum
Hi Wei,

There is already a Default Ad with this size in your campaign. You
won't be able to create a second one.

Typically, Default Ads will be created for you automatically when you
either import a creative from an advertiser or create it directly in a
campaign.

Regards,
- Joseph DiLallo, the DFA API Team.

wei...@mediacom.com

unread,
Mar 15, 2012, 5:18:26 PM3/15/12
to Google's DoubleClick for Advertisers API Forum
Interesting, that ad didn't exist when I tested. Anyway, I deleted
that default ad and tried again. Still got the same exception. Request
id is 8f32ae3b-4e7b-4c4c-b447-b50387fe1dec. Can you check again?

2nd question, it doesn't look like a default ad will be automatically
created for every new creative. Please take a look at the same
campaign, there is no default ad for size 160x600.

3rd question, what will happen if there is no campaign default ad?

Wei

DFA API Advisor

unread,
Mar 16, 2012, 1:56:18 PM3/16/12
to Google's DoubleClick for Advertisers API Forum
Hi Wei,

You can solve this problem using the associateCreativesToCampaign
operation. See:
https://developers.google.com/doubleclick-advertisers/docs/reference/current/creative/service#associateCreativesToCampaign

Even if the creative is already associated with the target campaign,
if no default ad of that size exists then it will create one for you.

Not having a default ad prevents you from generating tags for in-page
and mobile placements. If you'd like to know more, I'd recommend this
help center article: http://support.google.com/dfa/bin/answer.py?hl=en&answer=151646

Regards,
- Joseph DiLallo, the DFA API Team

It depends on how the creative is added to the campaign. If the

Wei Sun

unread,
Mar 16, 2012, 3:57:27 PM3/16/12
to Google's DoubleClick for Advertisers API Forum
Hi Joseph,

It doesn't seem that associateCreativesToCampaign will create a
default ad when the creative is a flash (for example, creative id
40100578)

That is exactly what I am trying to solve here. When I upload a flash
creative to DFA, DFA doesn't create a default ad. A default ad gets
created if I upload a standalone backup image. Although there is a
backup image file inside the flash creative, I was forced to upload a
standalone backup image just for the sake of creating a default ad.

So I am trying to create a default ad without uploading a standalone
backup. But so far I haven't found anything that works.

Wei


> You can solve this problem using the associateCreativesToCampaign
> operation. See:https://developers.google.com/doubleclick-advertisers/docs/reference/...

DFA API Advisor

unread,
Mar 16, 2012, 5:00:25 PM3/16/12
to Google's DoubleClick for Advertisers API Forum
Hi Wei,

Ooooh well that explains your issues. That is expressly not allowed -
Default Ads have to contain just an image creative. They do not pick
out the back-up image from flash creatives.

Regards,
- Joseph DiLallo, the DFA API Team

Wei Sun

unread,
Mar 19, 2012, 2:29:00 PM3/19/12
to Google's DoubleClick for Advertisers API Forum
Thanks a lot!

Wei

criley...@gmail.com

unread,
Oct 2, 2014, 10:12:52 AM10/2/14
to google-doubleclick-...@googlegroups.com
Hi Joseph,

I am having a similar problem. When I upload a swf and its backup jpg, and assign the jpg as the backup image to swf, the system does not auto create the default ad back up. There is normally a 3 step process to back upload, this time there were only two steps. This is missing the step to assign the default creative.As far as I can see there is no way to create a default ad outside of the auto process from batch upload.

Thank you,
Colin

Jonathon Imperiosi (DFA API Team)

unread,
Oct 3, 2014, 1:52:15 PM10/3/14
to google-doubleclick-...@googlegroups.com
Hi Colin,

I'm not sure I entirely understand your question, but it sounds like you're having trouble creating a default ad? Default ads can't be created directly, rather they're created automatically when an image with a new size is associated to a campaign. Note that backup images don't count in this scenario, so you'd need to insert a separate image creative of the appropriate size to generate a default ad.

Hope this helps.

Regards,
- Jonathon Imperiosi, DFA API Team

coastd...@gmail.com

unread,
Sep 6, 2016, 2:03:57 PM9/6/16
to Google's DoubleClick Campaign Manager API Forum
We're having the same issue - each placement has an ad which then has a creative. But we're getting an error message saying there is no default ad set

Jonathon Imperiosi (DCM API Team)

unread,
Sep 6, 2016, 4:52:35 PM9/6/16
to Google's DoubleClick Campaign Manager API Forum
Hi there,

If there's no default add associated with your placement you'll need to create one, as explained previously on this thread. The process is also covered in our common tasks guide.

If you've done that and are still having issues, please open a new thread outlining your problem (this one is quite old). You'll need to include details such as the specific actions you've taken, the exact errors being returned, and example campaigns/placements/ads for us to troubleshoot.

Regards,
- Jonathon Imperiosi, DCM API Team

derek.kang...@gmail.com

unread,
May 4, 2017, 3:06:37 PM5/4/17
to Google's DoubleClick Campaign Manager API Forum
Hi for a certain campaign, i have uploaded 3 diferent creatives to DFA, yet one of them states that there is no active default ad created. i tried uploading the creative again, yet it doesnt do anything to resolve the issue. what should i do to fix the error?

Chris Feldman (DCM API Team)

unread,
May 5, 2017, 1:14:32 PM5/5/17
to Google's DoubleClick Campaign Manager API Forum
Hi Derek,

Are you following the instructions from our common tasks page? If you are, and you're still having issues, please open a new thread outlining your issue with details about the exact actions that you've taken, as well as any errors that you've seen.

Regards,
Chris Feldman
DCM API Team
Reply all
Reply to author
Forward
0 new messages