This page short URL: wu

weeblrAMP lets you insert very easily ads in your AMP pages, using only backend settings. You should use the backend settings for ads on almost all occasions, they are easier to use and to maintain. But you may want to insert ads in other location on your pages, or maybe use multiple ads network on the same page. This can be done fairly easily by inserting one or more specific shortcodes in your content. The syntax is as follow:

[wbamp-embed type="ad"]

Automatic insertion of ads based on paragraph count is only supported in the regular edition of weeblrAMP.

The shortcode can be used in two forms:

Ad shortcode with default settings

Using the ads shortcode as described above, [wbamp-embed type="ad"], is enough to insert an advert in the location you inserted the shortcode, provided that you have selected an ad network in the backend settings, together with the required parameters.

You can have multiple instances of this shortcode in your content, just do not go too far. Users enjoy Accelerated Mobile Pages because they are fast and simple. Displaying an ad every 2 lines is probably going to make your visitors go away, just as on your regular web site.

Ad shortcode with parameters

In the longest form, the wbamp-embed shortcode lets you completely specify which ad you want to display. To use this form you have to insert a shortcode that looks like this:

[wbamp-embed type="ad" ad-type="adtech" width="300px" height="250px" data-atwMN="2842475" data-atwDiv="adtech-ad-container"]

In addition to the short form seen above, you must specify:

  • ad-type="xxxxx" where xxxxx is the name of an ad network accepted by the AMP project.
  • width and height: as with most AMP element, you must explicitely list your ad dimensions, in pixels or another CSS absolute unit
  • all other attributes depends on the network you are using. Please refer to each network documentation for details. This documentation can be reached from the main ad networks documentation page.

If you select the second form, Ad shortcode with parameters, you must specify yourself all required parameters for the particular network you use. weeblrAMP will not add anything to the values found in your shortcode.