Custom content tag

Tag Manager

A custom content tag lets you add contextual ads, like banners or info boxes, or other content to your website. Contextual ads fit nicely into the content of your website and are less distracting than popups.

In this article, we’ll explain how to set them up.

Custom content tag in Tag Manager in Piwik PRO

Before you start

Here are some things to know before you start:

  • You need to know a bit about HTML and CSS to design your ad, but the tag setup is easy.
  • The ad is part of the website content, so you need to indicate where exactly it should be placed. For this you can use div ID, section ID, block ID and so on.
  • By default, this tag appears for visitors who agree to A/B testing and personalization. But you can change its settings.
  • This tag loads at the same time as other tags. It’s an async tag.

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 Add a tag.
  5. Name your tag and choose the following tag type: Custom content.
  6. In HTML tag code, type the code with your ad. 
    Custom content tag in Tag Manager in Piwik PRO
  7. In Content placement, enter the ID of the page section where you want the ad to appear.
    Content tag in Piwik PRO
  8. In Advanced tag settings, choose the tag type. By default, your ad appears to visitors who agree to A/B testing and personalization, but you can change this.
    Content type in Piwik PRO
  9. Respect opt-out and DNT is turned on by default. Leave it as is if you want to respect visitors who’ve turned on the Do-Not-Track feature in their browsers or who’ve opted out of tracking using our opt-out form.
  10. Enable document.write is turned off by default. Turn it on only if your tag needs it.
  11. In Flight dates, set the date and time when the tag will fire.
    Flight dates in Piwik PRO
  12. In Tag triggers, click Add a trigger or Choose existing trigger to set up a trigger for your tag.

    Tip: We recommend triggering the custom content tag multiple times. Otherwise, your contextual ad might appear and disappear when a visitor refreshes the page.

  13. When you’re done, click Save.
  14. Test your tag in debug mode.
  15. When you’re happy with how the tag works, click Publish.
  16. All done!

Track content impressions

To start tracking content impressions, follow these steps:

  1. Go to Menu > Tag Manager.
  2. Navigate to Tags.
  3. On the left, click Piwik PRO (tracking code).
  4. In Data collection, turn on Interactions with popups and content.
    Interactions with popus and content in Piwik PRO
  5. All set! The tracker will now begin counting ad views on your site. And you’ll be able to find all the stats in Menu > Analytics > Reports > Content performance.
    Custom content tag in Tag Manager in Piwik PRO

Was this article helpful?

Technical support

If you still have any questions, visit our community.
There’s always someone happy to help!

Related articles

Back to help center