Create Adunit
divyeshgajja opened this issue · 1 comments
divyeshgajja commented
Hello Everyone,
Can you Please tell me how can I create adunit under Particular Network Code?
I am using this code:
$adUnit = new AdUnit();
$adUnit->setName('gaz_test_SmartBanner');
$adUnit->setParentId($effectiveRootAdUnitId);
$adUnit->setDescription('gaz_test_SmartBanner.');
$adUnit->setTargetWindow(AdUnitTargetWindow::TOP);
$adUnit->setAdUnitCode('gaz_test_SmartBanner');
$adUnit->setSmartSizeMode('SMART_BANNER');
Please Tell me .
PierrickVoulet commented
@divyeshgajja - You do not need to explicitly specify the network code in your code while creating the AdUnit instance. The AdUnit will be created in the network you specify based on how your client was authenticated (see configuration file).