How to include the custom variables while downloading report for UserID section

Context: I have used the email address of people who visit my website as the UserID. I also have 4 custom variables such as (group, full name, etc).

Now when I see the UserID section under the Visitors tab I see a table as below:

In the above table, the User IDs column has the email address of the user. As in the details (such as: custom variables, visit details, summary, first visit, last visit, devices, etc, etc) that would appear the visitor profile

The Issue:
When I try to export the data in this table, in-depth details of the user are not included.

How do I include the custom variable details when I download the report? I’m primarily trying to add columns to this report.

Example: I want a new column called group (which is one of my custom variables) in the downloaded report where each row value will be the corresponding group value(CS, ECE, etc) of the user in that row.

Can anyone please help me with this. Thanks. :slight_smile:

What I’ve tried:

  • I’ve gone through the reporting API and I tried adding parameters like flat=1 and expanded=1 to see if I would get all details, but it did not work.
  • I read about idSubTable but couldn’t figure it out properly.
  • I saw the Reporting API reference for Custom Variables but I was not sure how I could give two methods (one method to get user details and other to get custom variable details)
  • I tried the method=CustomVariables.getCustomVariablesValuesFromNameId=[] but I get the below error
<error message="The method name is invalid. Expected 'module.methodName'"/>

but when I give some random value to CustomVariables.getCustomVariablesValuesFromNameId I get the below error:

<error message="The method 'getCustomVariablesValuesFromNameId=random' does not exist or is not available in the module '\Piwik\Plugins\CustomVariables\API'."/>

Hi all,

A gentle ping to here to see if anyone can help me. I’m still not sure how I can do this thing.

You will probably need to create a custom report: Custom Reports User Guide - Analytics Platform - Matomo (premium feature)

Ohh Thanks. I’m very sorry I missed your reply.

I solved it by applying segments and downloading the reports from visit log instead of UserID dimension. There I used the showOnly parameter to remove all unwanted details.

Thank you.