API - PivotBy and PivotByColumn fields


(Andrea Proietti) #1

Hi,
I would like to know what are the availbale dimensions to use with PivotBy and PivotByColumn fields in reporting API.
For instance, I had a query for having report on a custom dimension as follow:


    <result date="2019-03-01">
		<row>
			<label>Female</label>
			<nb_uniq_visitors>2</nb_uniq_visitors>
			<nb_visits>3</nb_visits>
			<nb_actions>2</nb_actions>
			<nb_users>2</nb_users>
			<max_actions>1</max_actions>
			<sum_visit_length>194</sum_visit_length>
			<bounce_count>3</bounce_count>
			<nb_visits_converted>0</nb_visits_converted>
			<avg_time_on_site>65</avg_time_on_site>
			<bounce_rate>100%</bounce_rate>
			<nb_actions_per_visit>0.7</nb_actions_per_visit>
			<segment>dimension1==Female</segment>
		</row>
	</result>
	<result date="2019-03-02"/>
	<result date="2019-03-03"/>
	<result date="2019-03-04">
		<row>
			<label>Female</label>
			<nb_uniq_visitors>2</nb_uniq_visitors>
			<nb_visits>9</nb_visits>
			<nb_actions>83</nb_actions>
			<nb_users>2</nb_users>
			<max_actions>20</max_actions>
			<sum_visit_length>7235</sum_visit_length>
			<bounce_count>1</bounce_count>
			<nb_visits_converted>0</nb_visits_converted>
			<avg_time_on_site>804</avg_time_on_site>
			<bounce_rate>11%</bounce_rate>
			<nb_actions_per_visit>9.2</nb_actions_per_visit>
			<segment>dimension1==Female</segment>
		</row>
		<row>
			<label>Male</label>
			<nb_uniq_visitors>1</nb_uniq_visitors>
			<nb_visits>2</nb_visits>
			<nb_actions>17</nb_actions>
			<nb_users>1</nb_users>
			<max_actions>17</max_actions>
			<sum_visit_length>1216</sum_visit_length>
			<bounce_count>1</bounce_count>
			<nb_visits_converted>0</nb_visits_converted>
			<avg_time_on_site>608</avg_time_on_site>
			<bounce_rate>50%</bounce_rate>
			<nb_actions_per_visit>8.5</nb_actions_per_visit>
			<segment>dimension1==Male</segment>
		</row>
	</result>
	<result date="2019-03-05">
		<row>
			<label>Male</label>
			<nb_uniq_visitors>2</nb_uniq_visitors>
			<nb_visits>37</nb_visits>
			<nb_actions>149</nb_actions>
			<nb_users>2</nb_users>
			<max_actions>12</max_actions>
			<sum_visit_length>8431</sum_visit_length>
			<bounce_count>9</bounce_count>
			<nb_visits_converted>0</nb_visits_converted>
			<avg_time_on_site>228</avg_time_on_site>
			<bounce_rate>24%</bounce_rate>
			<nb_actions_per_visit>4</nb_actions_per_visit>
			<segment>dimension1==Male</segment>
		</row>
		<row>
			<label>Female</label>
			<nb_uniq_visitors>1</nb_uniq_visitors>
			<nb_visits>3</nb_visits>
			<nb_actions>2</nb_actions>
			<nb_users>1</nb_users>
			<max_actions>1</max_actions>
			<sum_visit_length>55</sum_visit_length>
			<bounce_count>3</bounce_count>
			<nb_visits_converted>0</nb_visits_converted>
			<avg_time_on_site>18</avg_time_on_site>
			<bounce_rate>100%</bounce_rate>
			<nb_actions_per_visit>0.7</nb_actions_per_visit>
			<segment>dimension1==Female</segment>
		</row>
		<row>
			<label>Unknown</label>
			<nb_uniq_visitors>1</nb_uniq_visitors>
			<nb_visits>1</nb_visits>
			<nb_actions>13</nb_actions>
			<nb_users>1</nb_users>
			<max_actions>13</max_actions>
			<sum_visit_length>69</sum_visit_length>
			<bounce_count>0</bounce_count>
			<nb_visits_converted>0</nb_visits_converted>
			<avg_time_on_site>69</avg_time_on_site>
			<bounce_rate>0%</bounce_rate>
			<nb_actions_per_visit>13</nb_actions_per_visit>
			<segment>dimension1==Unknown</segment>
		</row>
	</result>	

Is it possible to obtain the sum by label of the nb_users field over all days?

This is the query:
https://xxxxxxx.xxxxxx.xxxxx/?module=API&method=CustomDimensions.getCustomDimension&token_auth=xxxxxxxxxxxxxxxxxxxxxxxx&idSite=5&idDimension=1&date=2019-03-01,2019-03-28&period=day&segment=dimension6==6001;userId!=000000&format=xml

I think that I have to add PivotBy and PivotByColumn fields, but i was not be able to find the list of available dimensions to put on them.

Thanks