Hilfe

Knowledge Base

What are some Custom Tag use cases?

This page offers some guidance on how to use Custom Tags to measure your traffic in new ways and answer certain questions about it. Hopefully it will help you to start measuring new things with Custom Tags, or inspire new ideas of your own!

Blogs

Which authors generate the most traffic?

If you manage a blog with multiple contributors, it may be helpful to measure which authors attract the most readers. Custom Tags can simplify this measurement. Here we will tag our blog posts with an author tag carrying the username of the post’s author.

The above example is a bit simplistic in that it hardcodes the value of the author tag. It’s more likely that you’ll want to fetch the author from some other part of the page dynamically, or embed it using a server side scripting language. Here’s an example that fetches the author value from an element elsewhere on the page:

StatCounter will now record the author with each pageview to your blog posts. Using the Custom Tag reports you can easily see which author’s posts are attracting the most traffic in total by selecting the ‘author’ tag from the drop down menu.

In the above example you can see Jane's blog posts attract most traffic. Clicking on a tag value also lets you see the top 5 pages for that value - in this case, Jane's most popular blog posts:

The Custom Tags report can now give you a measurement of the best performing topics on your blog at a glance:

In the above example you can see blog posts on the topic of 'technology' attract most traffic. Clicking on a topic in this report - such as 'health' in the above picture - will show you the urls of the top performing blog posts for that topic.

Which types of headline attract the most readers?

Blog headlines can be a key factor in attracting clicks. Tagging your blog posts with the structure or keyword used in a headline could help you optimise what type of headlines perform best with your audience.

For example, let’s say some blog posts have a headline that is in the form of a question while others feature some call-to-action. You could use a headline_type tag on your blog post pages:

Of course, if possible you can dynamically populate the tag value using Javascript or whatever other scripting language you use. As long as you can access a value using Javascript or embed it into your Javascript code, you can pass it to StatCounter!

Once the blog format data is being recorded you can see which blog format attracts most traffic using the Custom Tags report:

You can also click on each blog format to view the blogs that are most popular within that category:

ECommerce

Which categories of product attract most attention?

A simple use case for Custom Tags in an ecommerce context would be measuring the traffic attracted by your different product categories. Each product page could carry a product_category tag like this:

This code uses a "regular expression" in the bit below to capture an advertiser number from the URL by searching for the text &advertiser= followed by numbers. In the code d* represents a string of numbers.

var matchPattern = /&advertiser=d*/g;

Example URL :

www.mystore.com/items/software/index.php?&advertiser=25

In the stats next to the hit you'd see

advertiser: 25

Please note the number after substring needs to be adjusted to accommodate your situation.