How to modify AMP tags

The default AMP ad tag generated by AdButler is simple and lightweight. In most cases it's ready to be placed on a page as is.

How to generate an AMP ad tag

However, if you want to use keyword targeting or Unique Delivery, you must add the corresponding parameter to your AMP ad tag.

Keyword targeting

To use keyword targeting in AMP zones, you must first set up the keywords just as you would for a regular zone. Read our keyword targeting guide for the instructions.

Once you've set up your keywords, you must then pass them into your AMP ad tags using the data-keyword parameter. For example, if you want to pass the keyword green, the resulting AMP ad tag should look similar to this:

<amp-ad width=300 height=250
    type="adbutler"
    data-account="167283"
    data-zone="212491"
    data-keyword="green">
</amp-ad>

Unique Delivery

If you want to use the same zone multiple times in a page, you can enable Unique Delivery to ensure that the same ad item won't appear more than once on the page. Read our Unique Delivery guide for the instructions.

Once you've enabled Unique Delivery, you must add the data-place parameter into your AMP ad tag. This parameter helps AdButler identify each instance of the zone. The AMP ad tag of the first instance should have a data-place value of zero. Each time you add an instance of the zone in the same page, you must increase the parameter's value by one, as shown in these examples:

<amp-ad width=300 height=250
    type="adbutler"
    data-account="167283"
    data-zone="212491"
    data-place="0">
</amp-ad>

<amp-ad width=300 height=250
    type="adbutler"
    data-account="167283"
    data-zone="212491"
    data-place="1">
</amp-ad>

Can't find what you're looking for?

Send us an email

hello@adbutler.com

Visit the blog

For more ad serving tips, industry news and AdButler insights.