PRODUCT
Follow
  • Creative > Assets Library

Sizmek Ad Suite (SAS) supports two ways to manage creative assets:

  • Uploading the assets as a part of Workspace

  • Adding the files as additional assets in your ads

Additional assets are useful when an ad contains dynamic elements for Dynamic Creative Optimization (DCO); it is recommended to store all images and videos as additional assets. A best practice to keep your workspace optimized is to include essential files such as the .config file, default image, and HTML file in your Workspace, and store all other files in separate folders, but in the same directory as your Workspace.

Additional assets can be any file that a browser can display, such as images, videos, CSS, JavaScript, JSON, XML, or font files.

Adding Additional Assets

Procedure

Note

Note: Before you begin, locate the assets and workspace that you want to use.

  1. Select Creative > Assets Library.

  2. Click Upload to upload your Workspace and assets.

  3. Create a new ad.

  4. In the Creative Assets section, select the Main Assets tab and define the Workspace Folder and Default Image.

  5. In the Creative Assets section, select the Additional Assets tab.

  6. Click Add Asset.

  7. Navigate to the folder where your assets are located.

  8. Select a file to add as an additional asset.

  9. Click Assign.

additionalAssets_panel.png

Configuring Additional Assets in a Workspace

You can set up additional assets in SAS in the config.js file as if the assets are dynamic elements in Workspace.

Note

Note: If you use the config.js file to create the additional assets, you must create the folder manually; however, if you add additional assets in SAS, the folder is created automatically.

Procedure
  1. To assign assets, create a new folder called AdditionalAssets in the root directory of the Workspace with other files such as index.html and config.js. The name is case-sensitive and does not contain a space.

    Note

    Note: SAS ignores assets in subfolders under the AdditionalAssets folder.

  2. Save the assets in the AdditionalAssets folder.

    The following image shows a Workspace including the AdditionalAssets folder with four images.

    additionalAssets_workspace.png
  3. After setting up the AdditionalAssets folder, configure the assets in the config.js file. Registering additional assets requires creating a new property named AdditionalAssets. To avoid errors, make sure that all code and comments are inside the define function.

  4. In the config.js file under the AdditionalAssets property, create an object array for each asset with an OrdinalNumber and the asset file.

    Note

    Note: The OrdinalNumber values should be sequential; you assign one number to each file.

    In the following example, 1 is assigned to the assets1.jpg, and 2 is assigned to assets2.png. You can use these additional assets directly in dynamic elements by putting the ordinal number of the relevant asset in the value of the dynamic element.

    define({
        "SV": {
            "svData": [
                {
                    "svKey": "pic1",
                    "svType": "Image",
                    "value": "1"
                },{
                    "svKey": "pic2",
                    "svType": "Image",
                    "value": "2"
                }
             ]
        },
        "AdditionalAssets": [
            {
                "OrdinalNumber": 1,
                "FileName": "assets1.jpg"
            },
            {
                "OrdinalNumber": 2,
                "FileName": "assets2.png"
            }
        ]
    }); 

Now, you can upload the workspace to SAS. If all additional assets are set correctly, you will see them in Creative Assets > Additional Assets.

Calculating Size for Ads with Additional Assets

K-weight of ads are defined based on its workspace. When the ad has Additional Assets, those assets are also counted as a part of K-weight. SAS picks up the largest file among the Additional Assets and then combines its weight to the k-weight of the workspace. If the selected asset is a video and larger than any videos in the workspace, the video will be defined as the largest video in the workspace when k-weight is calculated. If Additional Assets are stored in a workspace, the total k-weight of all assets will count against the weight of the ad.

Ad Type

Ad Size Calculation

Regular ads with no videos

The size of the Workspace and the largest additional asset.

Rich Media ads with a video

All of the non-video assets plus the largest video in the Workspace. If there are additional assets, and one of them is larger than the largest Workspace video, it will replace the video in the Workspace.

DCO ads

The sum of the non-video assets plus the largest video in the Workspace.

Methods for Additional Assets

EB.getAssetProps(local Path, asset ID):Object

Returns an object with information about the asset. In local mode (before uploading), it will return null.

//returns information about the asset assigned with id No.1 as Additional Assets
var assetProps = EB.getAssetProps("",1);
  
//Get the width and height of the asset:
var assetWidth = assetProps.width;
var assetHeight = assetProps.height;

Parameters

Name

Type

Description

localPath

String

Path of the file relative to your ad's main index.html. For additional assets, this parameter should be empty.

assetID

Integer

ID of the additional asset file in SAS.

Return Object Properties

Name

Type

Description

assetID

Number

Unique ID for the asset in SAS.

bitRate

Number

Bitrate of videos. Value is -1 where bitRate does not apply.

dsPath

String

Relative path to the asset in SAS.

height

Number

Height of the asset, if relevant.

width

Number

Width of the asset, if relevant.

ordinalNum

Number

ID of the file in the additional assets list. Value is 0 for workspace assets.

type

Number

EB.getAssetUrl(reference of asset location, asset id):String

Returns the absolute URL of the asset. Returns an empty string if the asset was not located.

//returns absolute path of the asset assigned with id No.1 as Additional Assets
var imagePath = EB.getAssetUrl("",1);
  
// put the url in ‘image1’ element
document.getElementById('image1').setAttribute('src', imagePath);

Parameters

Name

Type

Description

Reference of asset location

String

File name or URL of the asset to search. This parameter is ignored when the second parameter contains IDs of additional assets.

assetID

String

ID of the additional asset file in SAS.

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments