How to Apply the TubeMogul Macros

Macro placeholder Replacement description
${ TM_SESSION_ID } Session corresponding to a single retrieval of an ad tag
${ TM_USER_ID } TubeMogul User ID
${ TM_USER_ID_BASE64ENC_URLENC } Base64-encoded, URL-encoded version of the user ID
${ TM_TIMESTAMP } Unix timestamp, i.e. the number of seconds elapsed since midnight (UTC) of January 1, 1970
${ TM_RANDOM } A random number between 1 and 1000000
${ TM_CAMPAIGN_ID_NUM } Campaign ID – integer
${ TM_PLACEMENT_ID_NUM } Placement ID – integer
${ TM_AD_ID_NUM } Ad ID – integer
${ TM_FEED_ID_NUM } Media placement ID - integer
${ TM_SITE_ID_NUM } Placement site ID - integer
${ TM_SITE_URL_URLENC } URL passed in the bid request, URL-encoded. Not supported for in-banner / click-to-play ads
${ TM_SITE_DOMAIN_URLENC } Page subdomain parsed from the URL in the bid request, URL-encoded. Not supported for in-banner / click -to-play ads.
${ TM_CLICK_URL } Redirect URL. It enables ad servers to track and count ad clicks. When the ad is served, if the user clicks on it, the macro is activated and the click is recorded and counted for reporting purposes.
${ TM_CLICK_URL_URLENC } Encoded redirect URL. It enables ad servers to track and count ad clicks. When the ad is served, if the user clicks on it, the macro is activated and the click is recorded and counted for reporting purposes. Do not use this macro unless you are creating third-party ads and your vendor requires URL encoding.
${ TM_VIDEO_DURATION } Duration of the ad video
${ TM_CLIENT_IP } IP address of the browser client (typically)
${ TM_CLIENT_UA } User agent of the client
${TM_CLIENT_IP_URLENC} Encoded IP address of the browser client
${TM_CLIENT_UA_URLENC} Encoded user agent of the browser client

 

 

Mobile:

Macro placeholder Replacement description
${ TM_SESSION_ID } Session corresponding to a single retrieval of an ad tag
${ TM_USER_ID } TubeMogul User ID
${ TM_USER_ID_BASE64ENC_URLENC } Base64-encoded, URL-encoded version of the user ID
${ TM_TIMESTAMP } Unix timestamp, i.e. the number of seconds elapsed since midnight (UTC) of January 1, 1970
${ TM_RANDOM } A random number between 1 and 1000000
${ TM_CAMPAIGN_ID_NUM } Campaign ID – integer
${ TM_PLACEMENT_ID_NUM } Placement ID – integer
${ TM_AD_ID_NUM } Ad ID – integer
${ TM_FEED_ID_NUM } Media placement ID - integer
${ TM_SITE_ID_NUM } Placement site ID - integer
${ TM_SITE_URL_URLENC } URL passed in the bid request, URL-encoded. Not supported for in-banner / click-to-play ads
${ TM_SITE_DOMAIN_URLENC } Page subdomain parsed from the URL in the bid request, URL-encoded. Not supported for in-banner / click -to-play ads.
${ TM_CLICK_URL } Redirect URL. It enables ad servers to track and count ad clicks. When the ad is served, if the user clicks on it, the macro is activated and the click is recorded and counted for reporting purposes.
${ TM_CLICK_URL_URLENC } Encoded redirect URL. It enables ad servers to track and count ad clicks. When the ad is served, if the user clicks on it, the macro is activated and the click is recorded and counted for reporting purposes. Do not use this macro unless you are creating third-party ads and your vendor requires URL encoding.
${ TM_VIDEO_DURATION } Duration of the ad video
${ TM_CLIENT_IP } IP address of the browser client (typically)
${ TM_CLIENT_UA } User agent of the client
${TM_CLIENT_IP_URLENC} Encoded IP address of the browser client
${TM_CLIENT_UA_URLENC} Encoded user agent of the browser client
Have more questions? Submit a request