drastic Posted April 14, 2023 Posted April 14, 2023 Is it possible to show a toplist of referring partners using KVS built in tools? For example, if I wanted to show a list of top ten referring domains, using an image for each one, is that something we can do? If so, what would the code be to insert this into a template? Thanks! Quote
Tech Support Posted April 17, 2023 Posted April 17, 2023 Yes, this is possible, there is top_referers block that is designed to render this. However you should consider the following: KVS doesn't automatically collect all referring domains, because this would be huge blow to stats. In order KVS to collect stats for any specific referring domain, you need to go to Stats -> Referrers and create a referrer for every traffic you want to monitor. Then each referrer supports up to 3 custom files, where you can upload your image. The top_referers block then can be used to render the list of referrers based on your sorting and filtering options. 1 Quote
drastic Posted April 17, 2023 Author Posted April 17, 2023 Can the top referrers block be shown in an ad spot, or should we put the code directly in the template, above the ad spot? What does the code look like to insert the top referrers? Let's say we want to show 6 top referrers using an image for each one... Thanks! Quote
Tech Support Posted April 18, 2023 Posted April 18, 2023 Smarty code cannot be put into advertising, as advertising is pure HTML only. You can use standard KVS insert block code to render list of referrers: {{insert name="getBlock" block_id="top_referers" block_name="Top 6 Referrers"}} 1 Quote
drastic Posted April 19, 2023 Author Posted April 19, 2023 Thanks for the code. When I create a referrer, I don't see field to upload the images for them. Where would that be? Thanks. Quote
Tech Support Posted April 20, 2023 Posted April 20, 2023 You need to go to Settings -> Customization first and enable custom file field for referrer type. 1 Quote
drastic Posted May 27, 2023 Author Posted May 27, 2023 Hi, Found it! I uploaded 3 images for each referrer. What code will display a top list of 15 referrers using a random image for each one? And how about a top 15 text list of referrers? Thanks! Quote
Tech Support Posted May 29, 2023 Posted May 29, 2023 For displaying different lists of referrers you need to use top_referers block: {{insert name="getBlock" block_id="top_referers" block_name="Top Referers"}} For displaying 15 referrers you need to set items_per_page parameter of that block to 15, then sorting is defined by sort_by parameter, you can make it random. For how to render either textual list, or custom files please refer to block template example, it contains basic rendering for all the data. Quote
drastic Posted May 29, 2023 Author Posted May 29, 2023 (edited) I tried inserting the code, but it tells me: {{insert name="getBlock" ...}} directive cannot be used in block template (it can be used only in page template) I forgot to create the block, trying to figure it out and will report back. Edited May 29, 2023 by drastic Quote
Tech Support Posted May 30, 2023 Posted May 30, 2023 Yes, it is not possible to use a block inside other block. But you can have some workaround with this: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.