GuidesAnnouncementsCommunity Discussion
GuidesCommunity DiscussionAnnouncementsLog In
Guides

AMP via GAM

❗️

IMPORTANT

Taboola integration via Google Ad Manager has numerous drawbacks.

Whenever possible, consider using an alternative method - e.g. AMP integration.

This section describes how to create/edit a Taboola code snippet for Google Ads Manager, where the target page is an AMP page.

  1. Under the Settings tab of the GAM creative (see Google Ad Manager (DFP)), choose a code type of Standard (not AMP).
  2. Paste in the following code snippet, and fill in the param values, as provided by Taboola:
<!-- 
Taboola modules served via GAM are NOT responsive. 
Style the width of the <div> to match your needs. 
-->
<div id="taboola-slot" style="width: 300px"></div>

<script type="text/javascript">
  
  // Global command queue
  window._taboola = window._taboola || [];
  
  // Pass page details:
  // For a page_type of 'article', use 'article:'auto'.
  // (A GAM macro is needed, because `top.location.href` does not work here.)
  _taboola.push({ article: "auto", url: "%%REFERRER_URL_UNESC%%" });
  
  // Pass placement details: 
  _taboola.push({  
    mode: '<mode>',
    container: 'taboola-slot', // The ID of the <div> container (see above).
    placement: '<placement>',
    target_type: 'mix'
   });
</script>

<!--  Fill in your Publisher ID, as provided by Taboola -->
<script src="//cdn.taboola.com/libtrc/<publisher-id>/loader.js"></script>
Param/default valueInstructionsNotes
page_typeThe relevant page type, as provided by Taboola
- E.g. for article, this line should read: article='auto'
Possible values:

video (video='auto')
article (article='auto')
photo (photo='auto')
search (search='auto')
category (category='auto')
home (home='auto')

----
The 'auto' directive auto-generates an ID for the page.
modeFill in the UI Mode ID for this placement, as provided by Taboola:
- E.g. '<<mode>>'.
placementFill in the placement name, as provided by Taboola:
- E.g. '<<placementName>>'.
target_typeFill in the target type, as provided by Taboola:
- E.g. '<<targetType>>'.
publisherFill in your alphabetic Publisher ID, as provided by Taboola
- E.g. '<<publisherID>>'
Your Publisher ID is a unique, alphabetic String. It might contain dashes - but not spaces.

🚧

Use your own param values, as provided by Taboola.