How to use custom page titles

Analytics + Tag Manager

Sometimes page titles in reports can be unclear, too long or contain too much or too little information. In these situations, you can create a custom page title that only appears in reports, but doesn’t change the original title on your website.

Let’s say we have two page titles we want to customize.

Page URL Page title Custom page title Clear Bank | Best mobile banking app Home page Product tour | Clear Bank | Better mobile banking app Product tour

To create a custom page title, follow these steps:

  1. Go to Menu > Tag Manager.
  2. Navigate to Tags.
  3. Click Add a tag.
  4. Name the tag and select the following type: Custom code (async).
  5. Click Next.
  6. In Tag code, type the following code:
        _paq.push(['setDocumentTitle', "Custom page title"]);

    Replace "Custom page title" with the title that you want to use. You can also use a variable instead.

    Note: Bu default, Piwik PRO reads the page title from document.title, which is the text content of the <title> element in the page’s source code.

  7. In Tag triggers, click Add a trigger.
  8. Name the trigger.
  9. In Trigger type, choose the following type: Page view.
    Page view trigger in Piwik PRO
  10. In Event conditions, define conditions for the trigger. In our example, Page URL equals
    Page view trigger in Piwik PRO
  11. When you’re done, click Save.
  12. Click Save for the tag.
  13. Test your tag in debug mode.
  14. When you’re happy with how the tag works, click Publish.
  15. Repeat steps 1–14 for the other page titles.
  16. Done! You’ll see custom page titles in Menu > Analytics > Reports > Pages.

Note: There are other methods for customizing page titles, but the one described in this article is the simplest. In more advanced cases, you may need to customize your tracking code and use a virtual page title with a variable. If you run into a problem like this, post a question on our community forum.

Was this article helpful?

Technical support

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

Back to help center