• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How can I install tracker codes on category-level?

Dear all,

I recently joined the Glam Publisher network. They require that I insert a traffic tracker code on category level of the forum. Can anyone help me if and where this is possible? Currently I only see the possibility to enter such code on the index / thread level of the forum. Thanks!!


XenForo moderator
Staff member
Moved from suggestions to support.

You will need to associate your forum account with your license to post in the customer forums.


XenForo moderator
Staff member
By default categories act as anchors, not pages.

You will need to change them to pages in the ACP -> Options -> Node & Forum List: Create Pages for Categories.

Then you can insert your tracker code in the category_view template.
Hi Brogan,

many thanks! As I understand it this will allow to use one tracker for all category-views. Is there a way to assign specific trackers to specific categories?

Thanks and best wishes,



XenForo moderator
Staff member
You could try using this conditional:
<xen:if is="{$category.node_id} == x">

You may also need to add this to the category_view template:
<xen:container var="$categoryId">{$category.node_id}</xen:container>

That's just a guess on my behalf, I haven't tested it.
Hi, that sounds good, thanks - category node id would be the number of the category? I.e. my URL "categories/marktplatz.24/" would result in <xen:if is="{$category.node_id} == 24">?

Sounds very good and logical - is somehow not working, however. Tried it with a test-pixel that shows up when I don't apply the condition below. Anything missing in the code?

<xen:if is="{$category.node_id} == 24">
<img src="/pics/test.jpg">


XenForo moderator
Staff member
I've just tested it and it works fine.

Double check the node ID and template you're working in.

The container code isn't required (thanks Jake).