Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Display the top 10 links visited by a UserID sorted by most active

$
0
0

@RedneckBob wrote:

I’m still new to Piwik/Matomo and started working my way through the API docs. I didn’t see this as part of the standard reporting, so thought I’d post here.

Don’t know if this is possible, but I’d like to display or generate a list of 10 links that were visited by a specific UserID. These links would be ordered with the most visited links links at the top.

We’d like to offer this feature to our users as an additional navigation aide. Our users can easily access this list of links and the top link is the link they visit the most. Would be nice if I could filter out links as well.

This this feasible from the API?

-RB

PS - We only use this tracker behind the user authentication, so we do set the UserID and a custom variable called Company after the user logs into the site.

<script type="text/javascript">
  var _paq = _paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
  _paq.push(["setCookieDomain", "*.redneckbob.com"]);
  _paq.push(["setDomains", ["*.redneckbob.com","*.goats.redneckbob.com","*.cows.redneckbob.com","*.redneckbob.com","*.goats.redneckbob.com","*.cows.redneckbob.com"]]);
  _paq.push(["enableCrossDomainLinking"]);
  _paq.push(["setUserId", "chickenuser"]);
  // you can set up to 5 custom variables for each visitor
  _paq.push(["setCustomVariable", 1, "Company", "RedGoats", "visit"]);
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="//stats.redneckbob.com/piwik/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="//stats.redneckbob.com/piwik/piwik.php?idsite=1&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles