@vidiecan opened this Issue on March 2nd 2020

Note:
#14235 looks similar but does not address this issue.

Version:
Matomo version: 3.13.3

Description:

curl "XXX/piwik/index.php?module=API&method=API.get&idSite=4&period=day&date=2020-02-13,2020-02-14&token_auth=XXX&format=xml&segment=pageUrl=<a class='mention' href='https://github.com/11234'>@11234</a>/1-1593"

returns two different set of properties. Afaict, it used to be the same set but filled with 0.

<?xml version="1.0" encoding="utf-8" ?>
<results>
        <result date="2020-02-13">
                <nb_uniq_visitors>1</nb_uniq_visitors>
                <nb_visits>1</nb_visits>
                <nb_users>0</nb_users>
                <nb_actions>1</nb_actions>
                <max_actions>1</max_actions>
                <bounce_count>1</bounce_count>
                <sum_visit_length>0</sum_visit_length>
                <nb_visits_new>1</nb_visits_new>
                <nb_actions_new>1</nb_actions_new>
                <nb_uniq_visitors_new>1</nb_uniq_visitors_new>
                <nb_users_new>0</nb_users_new>
                <max_actions_new>1</max_actions_new>
                <bounce_rate_new>100%</bounce_rate_new>
                <nb_actions_per_visit_new>1</nb_actions_per_visit_new>
                <avg_time_on_site_new>0</avg_time_on_site_new>
                <Referrers_visitorsFromSearchEngines>0</Referrers_visitorsFromSearchEngines>
                <Referrers_visitorsFromSocialNetworks>0</Referrers_visitorsFromSocialNetworks>
                <Referrers_visitorsFromDirectEntry>1</Referrers_visitorsFromDirectEntry>
                <Referrers_visitorsFromWebsites>0</Referrers_visitorsFromWebsites>
                <Referrers_visitorsFromCampaigns>0</Referrers_visitorsFromCampaigns>
                <Referrers_visitorsFromDirectEntry_percent>100%</Referrers_visitorsFromDirectEntry_percent>
                <Referrers_visitorsFromSearchEngines_percent>0%</Referrers_visitorsFromSearchEngines_percent>
                <Referrers_visitorsFromCampaigns_percent>0%</Referrers_visitorsFromCampaigns_percent>
                <Referrers_visitorsFromSocialNetworks_percent>0%</Referrers_visitorsFromSocialNetworks_percent>
                <Referrers_visitorsFromWebsites_percent>0%</Referrers_visitorsFromWebsites_percent>
                <nb_conversions>0</nb_conversions>
                <nb_visits_converted>0</nb_visits_converted>
                <revenue>0</revenue>
                <conversion_rate>0%</conversion_rate>
                <nb_conversions_new_visit>0</nb_conversions_new_visit>
                <nb_visits_converted_new_visit>0</nb_visits_converted_new_visit>
                <revenue_new_visit>0</revenue_new_visit>
                <conversion_rate_new_visit>0%</conversion_rate_new_visit>
                <nb_pageviews>1</nb_pageviews>
                <nb_uniq_pageviews>1</nb_uniq_pageviews>
                <nb_downloads>0</nb_downloads>
                <nb_uniq_downloads>0</nb_uniq_downloads>
                <nb_outlinks>0</nb_outlinks>
                <nb_uniq_outlinks>0</nb_uniq_outlinks>
                <nb_searches>0</nb_searches>
                <nb_keywords>0</nb_keywords>
                <bounce_rate>100%</bounce_rate>
                <nb_actions_per_visit>1</nb_actions_per_visit>
                <avg_time_on_site>0</avg_time_on_site>
                <avg_time_on_site_returning>0</avg_time_on_site_returning>
                <nb_actions_per_visit_returning>0</nb_actions_per_visit_returning>
                <bounce_rate_returning>0%</bounce_rate_returning>
        </result>
        <result date="2020-02-14">
                <Referrers_visitorsFromSearchEngines>0</Referrers_visitorsFromSearchEngines>
                <Referrers_visitorsFromSocialNetworks>0</Referrers_visitorsFromSocialNetworks>
                <Referrers_visitorsFromDirectEntry>0</Referrers_visitorsFromDirectEntry>
                <Referrers_visitorsFromWebsites>0</Referrers_visitorsFromWebsites>
                <Referrers_visitorsFromCampaigns>0</Referrers_visitorsFromCampaigns>
                <Referrers_visitorsFromDirectEntry_percent>0%</Referrers_visitorsFromDirectEntry_percent>
                <Referrers_visitorsFromSearchEngines_percent>0%</Referrers_visitorsFromSearchEngines_percent>
                <Referrers_visitorsFromCampaigns_percent>0%</Referrers_visitorsFromCampaigns_percent>
                <Referrers_visitorsFromSocialNetworks_percent>0%</Referrers_visitorsFromSocialNetworks_percent>
                <Referrers_visitorsFromWebsites_percent>0%</Referrers_visitorsFromWebsites_percent>
                <bounce_rate>0%</bounce_rate>
                <nb_actions_per_visit>0</nb_actions_per_visit>
                <avg_time_on_site>0</avg_time_on_site>
                <avg_time_on_site_returning>0</avg_time_on_site_returning>
                <nb_actions_per_visit_returning>0</nb_actions_per_visit_returning>
                <bounce_rate_returning>0%</bounce_rate_returning>
                <avg_time_on_site_new>0</avg_time_on_site_new>
                <nb_actions_per_visit_new>0</nb_actions_per_visit_new>
                <bounce_rate_new>0%</bounce_rate_new>
        </result>
</results>

Is this to be expected?

@Findus23 commented on April 20th 2020 Member
@vidiecan commented on April 20th 2020

@Findus23 yes, https://demo.matomo.org/index.php?module=API&method=API.get&idSite=62&period=day&date=2019-03-09,2019-03-10&token_auth=anonymous&format=xml

<results>
<result date="2019-03-09">
<Referrers_visitorsFromSearchEngines>0</Referrers_visitorsFromSearchEngines>
<Referrers_visitorsFromSocialNetworks>0</Referrers_visitorsFromSocialNetworks>
<Referrers_visitorsFromDirectEntry>0</Referrers_visitorsFromDirectEntry>
<Referrers_visitorsFromWebsites>0</Referrers_visitorsFromWebsites>
<Referrers_visitorsFromCampaigns>0</Referrers_visitorsFromCampaigns>
<Referrers_visitorsFromDirectEntry_percent>0%</Referrers_visitorsFromDirectEntry_percent>
<Referrers_visitorsFromSearchEngines_percent>0%</Referrers_visitorsFromSearchEngines_percent>
<Referrers_visitorsFromCampaigns_percent>0%</Referrers_visitorsFromCampaigns_percent>
<Referrers_visitorsFromSocialNetworks_percent>0%</Referrers_visitorsFromSocialNetworks_percent>
<Referrers_visitorsFromWebsites_percent>0%</Referrers_visitorsFromWebsites_percent>
<bounce_rate>0%</bounce_rate>
<nb_actions_per_visit>0</nb_actions_per_visit>
<avg_time_on_site>0</avg_time_on_site>
<avg_time_on_site_returning>0</avg_time_on_site_returning>
<nb_actions_per_visit_returning>0</nb_actions_per_visit_returning>
<bounce_rate_returning>0%</bounce_rate_returning>
<avg_time_on_site_new>0</avg_time_on_site_new>
<nb_actions_per_visit_new>0</nb_actions_per_visit_new>
<bounce_rate_new>0%</bounce_rate_new>
<form_starters_rate>0%</form_starters_rate>
<form_submitter_rate>0%</form_submitter_rate>
<form_conversion_rate>0%</form_conversion_rate>
<form_resubmitters_rate>0%</form_resubmitters_rate>
<avg_form_time_hesitation>0</avg_form_time_hesitation>
<avg_form_time_spent>0</avg_form_time_spent>
<avg_form_time_to_first_submission>0</avg_form_time_to_first_submission>
<avg_form_time_to_conversion>0</avg_form_time_to_conversion>
<play_rate>0</play_rate>
<finish_rate>0</finish_rate>
<impression_rate>0</impression_rate>
</result>
<result date="2019-03-10">
<nb_uniq_visitors>4823</nb_uniq_visitors>
<nb_visits>5369</nb_visits>
<nb_users>0</nb_users>
<nb_actions>20332</nb_actions>
<max_actions>97</max_actions>
<bounce_count>2910</bounce_count>
<sum_visit_length>1860888</sum_visit_length>
<nb_visits_returning>5369</nb_visits_returning>
<nb_actions_returning>20332</nb_actions_returning>
<nb_uniq_visitors_returning>4823</nb_uniq_visitors_returning>
<nb_users_returning>0</nb_users_returning>
<max_actions_returning>97</max_actions_returning>
<bounce_rate_returning>54%</bounce_rate_returning>
<nb_actions_per_visit_returning>3.8</nb_actions_per_visit_returning>
<avg_time_on_site_returning>347</avg_time_on_site_returning>
<Referrers_visitorsFromSearchEngines>3994</Referrers_visitorsFromSearchEngines>
<Referrers_visitorsFromSocialNetworks>587</Referrers_visitorsFromSocialNetworks>
<Referrers_visitorsFromDirectEntry>322</Referrers_visitorsFromDirectEntry>
<Referrers_visitorsFromWebsites>465</Referrers_visitorsFromWebsites>
<Referrers_visitorsFromCampaigns>1</Referrers_visitorsFromCampaigns>
<Referrers_distinctSearchEngines>15</Referrers_distinctSearchEngines>
<Referrers_distinctSocialNetworks>5</Referrers_distinctSocialNetworks>
<Referrers_distinctKeywords>74</Referrers_distinctKeywords>
<Referrers_distinctWebsites>5</Referrers_distinctWebsites>
<Referrers_distinctWebsitesUrls>261</Referrers_distinctWebsitesUrls>
<Referrers_distinctCampaigns>1</Referrers_distinctCampaigns>
<Referrers_visitorsFromDirectEntry_percent>6%</Referrers_visitorsFromDirectEntry_percent>
<Referrers_visitorsFromSearchEngines_percent>74%</Referrers_visitorsFromSearchEngines_percent>
<Referrers_visitorsFromCampaigns_percent>0%</Referrers_visitorsFromCampaigns_percent>
<Referrers_visitorsFromSocialNetworks_percent>11%</Referrers_visitorsFromSocialNetworks_percent>
<Referrers_visitorsFromWebsites_percent>9%</Referrers_visitorsFromWebsites_percent>
<nb_plays>86</nb_plays>
<nb_unique_visitors_plays>63</nb_unique_visitors_plays>
<nb_impressions>744</nb_impressions>
<nb_unique_visitors_impressions>527</nb_unique_visitors_impressions>
<nb_finishes>22</nb_finishes>
<sum_total_time_watched>14223</sum_total_time_watched>
<sum_total_audio_plays>12</sum_total_audio_plays>
<sum_total_audio_impressions>42</sum_total_audio_impressions>
<sum_total_video_plays>74</sum_total_video_plays>
<sum_total_video_impressions>702</sum_total_video_impressions>
<nb_conversions>664</nb_conversions>
<nb_visits_converted>635</nb_visits_converted>
<revenue>63101.95</revenue>
<conversion_rate>11.83%</conversion_rate>
<nb_conversions_returning_visit>664</nb_conversions_returning_visit>
<nb_visits_converted_returning_visit>635</nb_visits_converted_returning_visit>
<revenue_returning_visit>63101.95</revenue_returning_visit>
<conversion_rate_returning_visit>11.83%</conversion_rate_returning_visit>
<nb_form_views>7353</nb_form_views>
<nb_form_viewers>4549</nb_form_viewers>
<nb_form_starts>382</nb_form_starts>
<nb_form_starters>307</nb_form_starters>
<nb_form_submissions>473</nb_form_submissions>
<nb_form_submitters>459</nb_form_submitters>
<nb_form_resubmitters>10</nb_form_resubmitters>
<nb_form_conversions>181</nb_form_conversions>
<nb_pageviews>17003</nb_pageviews>
<nb_uniq_pageviews>12112</nb_uniq_pageviews>
<nb_downloads>20</nb_downloads>
<nb_uniq_downloads>17</nb_uniq_downloads>
<nb_outlinks>1051</nb_outlinks>
<nb_uniq_outlinks>951</nb_uniq_outlinks>
<nb_searches>151</nb_searches>
<nb_keywords>39</nb_keywords>
<nb_hits_with_time_generation>16374</nb_hits_with_time_generation>
<avg_time_generation>1.053</avg_time_generation>
<bounce_rate>54%</bounce_rate>
<nb_actions_per_visit>3.8</nb_actions_per_visit>
<avg_time_on_site>347</avg_time_on_site>
<avg_time_on_site_new>0</avg_time_on_site_new>
<nb_actions_per_visit_new>0</nb_actions_per_visit_new>
<bounce_rate_new>0%</bounce_rate_new>
<form_starters_rate>6.7%</form_starters_rate>
<form_submitter_rate>149.5%</form_submitter_rate>
<form_conversion_rate>59%</form_conversion_rate>
<form_resubmitters_rate>2.2%</form_resubmitters_rate>
<avg_form_time_hesitation>21.354</avg_form_time_hesitation>
<avg_form_time_spent>108.473</avg_form_time_spent>
<avg_form_time_to_first_submission>4.943</avg_form_time_to_first_submission>
<avg_form_time_to_conversion>76.759</avg_form_time_to_conversion>
<play_rate>0.12</play_rate>
<finish_rate>0.26</finish_rate>
<impression_rate>0.11</impression_rate>
</result>
</results>
@tsteur commented on April 20th 2020 Member

btw testing the same API call with a different idSite doesn't have that issue but there the API had some data. Seems mostly an issue when the site had no data for that day.

@sgiehl commented on April 22nd 2020 Member

API.get triggers all *.get apis and combines the results. Seems the problem is the Referrers.get as since some changes it always returns 0 values instead of an empty result if there isn't any data. Will propose a fix for that.

This Issue was closed on April 26th 2020
Powered by GitHub Issue Mirror