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 pop-ups, 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.

 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. 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.
  8. 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.
  9. 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.
  10. In Flight dates, set time during which you want to display the contextual ad.
  11. In Tag triggers, click + New trigger or + Existing trigger to set up a trigger for your contextual ad.
  12. If you’re setting up a new trigger, name the trigger.
  13. In Event type, choose the trigger type. For example, a page view.
  14. In Trigger conditions, define conditions for the trigger. For example, Page URL contains blog.
  15. 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.
  16. Tip: For more about audiences, read Create an audience.

  17. Set how often you want to fire the tag with the popup. For example, Fire tag multiple times.
  18. 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.

  19. When you’re done, click Save for the trigger and click Save for the tag.
  20. Test your contextual ad in debug mode.
  21. 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.

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).

Analytics classic: Menu > Analytics > Actions > Contents.

Was this article helpful?

Technical Support

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

We’re happy to help!