Permalink
Find file
ba23705 May 3, 2016
82 lines (63 sloc) 2.93 KB

AppNexus

See our tag Tiny Tag documentation or AST documentation for details on input parameters.

Example

Basic single ad - tagid

<amp-ad width=300 height=250
  type="appnexus"
  data-tagid="6063968">
</amp-ad>

Basic single ad - member and code

<amp-ad width=300 height=250
  type="appnexus"
  data-member="958"
  data-code="inv_code_test"
  >
</amp-ad>

AST for multiple sync ads on the page

Note: you should use either the basic setup or AST setup. Do not mix types on the same page.

<amp-ad width=300 height=250
    type="appnexus"
    data-target="apn_ad_40954389058"
    json='{"pageOpts": {"member": 958},"adUnits": [{"disablePsa": true,"invCode": "ast_guaranteed_prios_1","tagId": 12345,"sizes": [300, 250],"targetId": "apn_ad_40954389058"}, {"invCode": "ast_guaranteed_prios_1","tagId": 456,"sizes": [160, 600],"targetId": "apn_ad_5675675648"}]}'>>
</amp-ad>

<amp-ad width=160 height=600
    type="appnexus"
    data-target="apn_ad_5675675648"
    json='{"pageOpts": {"member": 958},"adUnits": [{"disablePsa": true,"invCode": "ast_guaranteed_prios_1","tagId": 12345,"sizes": [300, 250],"targetId": "apn_ad_40954389058"}, {"invCode": "ast_guaranteed_prios_1","tagId": 456,"sizes": [160, 600],"targetId": "apn_ad_5675675648"}]}'>
</amp-ad>

Configuration

For ads configuration, please check AST api on appnexus wiki

debug

to enable debug with the AST type of tags, just set the data-debug=true to all your amp-ad tags

<amp-ad width=300 height=250
    type="appnexus"
    data-target="apn_ad_40954389058"
    data-debug=true
    json='{"pageOpts":{"member": 958}, "adUnits": [{"disablePsa": true, "invCode": "ast_guaranteed_prios_1","sizes": [300,250],"targetId": "apn_ad_40954389058"}, {"invCode": "ast_guaranteed_prios_1","sizes": [160,600],"targetId":"apn_ad_5675675648"}]}'>
</amp-ad>

<amp-ad width=160 height=600
    type="appnexus"
    data-target="apn_ad_5675675648"
    data-debug=true
    json='{"pageOpts":{"member": 958}, "adUnits": [{"disablePsa": true, "invCode": "ast_guaranteed_prios_1","sizes": [300,250],"targetId": "apn_ad_40954389058"}, {"invCode": "ast_guaranteed_prios_1","sizes": [160,600],"targetId":"apn_ad_5675675648"}]}'>
</amp-ad>