How to track custom dimensions

Using this script you will be able to push custom dimensions, so that they will be automatically available in your reports and filters. Use this for example to push information about the author of a certain visited page, or the category of it. Make sure to edit the parameters according to your CMS, or if you use Wordpress, follow the Wordpress integration.

<!--Publytics API-->
<script defer data-domain="example.com/EXMPL1" src="https://api.publytics.net/js/script.manual.min.js"></script>

<!--Pageviews and Custom Dimensions-->
<script>
    window.publytics = window.publytics || function() { (window.publytics.q = window.publytics.q || []).push(arguments) };
    publytics('pageview', {props: {article_id: 123456, author_id: 101, article_title: "example title"}});
</script>
Info

Only alphanumeric and underscore characters are allowed in the dimension name.