# How to implement Direct Campaigns using Marfeel's ad server
This article will guide you through the implementation of Direct Campaigns that use Marfeel's ad server.
This is the preferred implementation for Direct Campaigns, as the tenant will benefit from several features. Learn more about it in the Direct Campaigns article.
DFP Only
The tenant must provide a DFP tag for this type of implementation. If it's not your case, contact the PI team and they will evaluate if another ad server can be configured.
If you are not familiar with DFP Tags, check out what they are and what they are used for in the glossary.
Before configuring the Direct Campaign, you need the following information from the Account Management team:
- Virtual Page
- Navigation Level
- Source
- Sizes
- If the implementation is direct or through Marfeel's ad server.
If the campaign is direct, not through Marfeel's ad server, then follow this implementation guide instead.
WARNING
If any of the previous information is missing, the campaign cannot be configured.
# Configure the Marfeel's ad server
The first step is to create the ad server in the inventory.json
.
Add a new ad server in the inventory.json
file using the marfeel
type and create a targeting
object inside json
:
{
"adservers": {
"marfeel": {
"json": {
"targeting": {
"tenant_dfp_slot": "/1234567/marfeeldocs-example/${PLACE}/${END_SLOT}",
"tenant_dfp_size": "${SIZE}",
"tenant_dfp_multisize": "${MULTI_SIZE}",
"p": "${PLACE}"
}
}
}
}
}
tenant_dfp_slot
is mandatory and must contain the tenant's slot.
Use the tenant_dfp_size
and / or tenant_dfp_multisize
to specify the sizes and add any additional parameter required by the tenant.
# Configure the placement
Then, configure a placement matching the tenant's requisites, adding the correct Navigation level, Virtual Page, Source, and Sizes.
As usual, add in the params
object all the information specific to this placement, if there are several.
{
"placements": {
"inline_mosaic": {
"adServer": "marfeel",
"params": {
"SIZE": "300x250,300x600,300x300,300x100,fluid",
"END_SLOT": "cpm_md",
"PLACE": "marfeelDocs"
}
}
}
}
Single placement configuration
When adding parameters to marfeel
ad server, if only one specific position is configured an error will pop.
To prevent that, add an inline
general placement with a marfeel
ad server that contains empty parameters.
In that case, the placement configuration will be:
{
"placements": {
"inline_mosaic": {
"adServer": "marfeel",
"params": {
"SIZE": "300x250,300x600,300x300,300x100,fluid",
"END_SLOT": "cpm_md",
"PLACE": "marfeelDocs"
}
},
"inline": {
"adServer": "marfeel",
"params": {
"SIZE": "",
"END_SLOT": "",
"PLACE": ""
}
}
}
}
# Validation
Make sure the following are true:
- The tag is implemented exactly where the tenant wants (Virtual Page, Navigation Level, and Source)
- The call in local and production contains the sizes required in the prev_iu_szs parameter
- The call in local and production contains the correct DFP slot(and targetings/customDimensions when needed) in the prev_scp parameter
This is an example of a correct call in the network tab:
TIP
Targeting can also be configured at DFP level, to offer more customization options. This is handled by the PI Team. See the table below for more details:
DFP | Inventory | |
---|---|---|
Navigation Level | ✅ | ✅ |
Source | ✅ | ✅ |
Position | ✅ | ✅ |
Section | ✅ | ✅ |
Country | ✅ | ❌ |
% | ✅ | ❌ |
Even if this configuration is OK, a well-implemented tag may return nothing, if this is the case, please escalate the ticket to PI Team.
That's it! The PI team can handle the campaign from there. They can start and stop it directly from DFP.