Custom content tag

Available from version 10.1.0.

Whenever you want to create a contextual ad on your website, you can use a ready-made tag in Tag Manager — a custom content tag. We designed it to help you better manage and display this type of ad.

A contextual ad can be anything from a banner to an info-box. Unlike popups, it appears inside the content of your website. For example, an info-box about the new podcast will show up at the end of your blog post.

Podcast ad as an example of custom content tag in Tag Manager.

 In this article, we’ll explain how to set up and publish a custom content tag.

Before you start

Here are some things to know before you begin working with custom content tags:

  • You need to have basic knowledge of HTML and CSS to design the contextual ad (the content), but setting it up is easy.
  • The custom content tag is set to be displayed for visitors who consent to A/B testing and Personalization, but you can change this setting.
  • A custom content tag loads simultaneously with other tags (It’s an asynchronous tag).
  • You need to tell where the content will be displayed. For that, you need to have a target ID (a div class) on your website. 

Set up a custom content tag

To set up a custom content tag, follow these steps:

  1. Design and code your contextual ad in HTML.
  2. Go to Menu > Tag Manager.
  3. Navigate to Tags.
  4. Click + Create new tag.
  5. Name the tag and select the Custom Content tag type.
  6. In HTML tag code, type the code with your contextual ad.
  7. Add code to custom content tag in Tag Manager.
  8. In Custom Content setup, type the target element ID from your website. For example, a div class of the section where you want to display the contextual ad.
  9. Add element ID in a custom content tag in Tag Manager.
  10. In Advanced tag settings, set the tag type. By default, it’s set to be displayed to visitors who consent to A/B testing and Personalization, but you can change it to a different type.
  11. Advanced tag settings in tags.
  12. By default, the Respect visitor privacy is turned on. Leave it as is, if you want to respect visitors who set a do-not-track option in their browser.
  13. In Flight dates, set time during which you want to display the contextual ad.
  14. Flight dates in tags.
  15. In Tag triggers, click + New trigger or + Existing trigger to set up a trigger for your contextual ad.
  16. If you’re setting up a new trigger, name the trigger.
  17. In Event type, choose the trigger type. For example, a page view.
  18. Choose an event type in trigger in Tag Manager.
  19. In Trigger conditions, define conditions for the trigger. For example, Page URL contains blog.
  20. Set trigger conditions in Tag Manager.
  21. In Audiences, pick an audience for which you want to display the contextual ad. For example, we’ve got an audience Apple product users and we want to display the content only for visitors from this audience.
  22. Add an audience to a trigger in Tag Manager.

    Tip: For more about audiences, read Create an audience.

  23. Set how often you want to fire the tag with the popup. For example, Fire tag multiple times.
  24. Set fire tag multiple times in Tag Manager.

    Tip: We advise you to fire the custom content tag multiple times. Otherwise, the contextual ad may appear, and then disappear after the visitor reloads a page.

  25. When you’re done, click Save for the trigger and click Save for the tag.
  26. Test your contextual ad in debug mode.
  27. When you’re happy how the contextual ad looks and works, click Publish.

Track content impressions

Once the tag is set up, you can turn on the tracking of contextual ad impressions.

To start tracking impressions for a content tag, follow these steps:

  1. Go to Menu > Tag Manager.
  2. Navigate to Tags.
  3. From the list of tags, pick the Piwik PRO tag.
  4. In Piwik PRO Analytics setup, toggle Enable content tracking.
Toggle enable content tracking in Piwik PRO Tag.

After this option is turned on, Piwik PRO will start collecting data about pop-up impressions on your website. All stats will be available in the content performance report in Analytics (Analytics (new) > Reports > Content performance).

Content performance report in Analytics.

Note: You can also find the content report in Analytics classic (Analytics > Actions > Contents).

Was this article helpful?

Be the first to rate this article.

Technical Support

If you have any questions, drop us a line at support_SPC@piwik_SPC.pro.

We’re happy to help!