google analytics transactionId and pagePath dimensions in the same query - google-analytics-api

I am trying to retrieve for each transaction on my website the pagepath. I am not really interesting into any metrics. I was trying to use transactionRevenue but I get the error
400: 'Selected dimensions and metrics cannot be queried together.'
What is a suitable metric to use when these two dimensions are together?

error 400: 'Selected dimensions and metrics cannot be queried
together.'
Not all dimensions and metrics can be queried together which ever ones you have chosen you cant query them together. Its best to check the dimensions and metrics explorer to check if you can query them together.
ga:pagePath can be combined with ga:transactionRevenue so that should not be your problem. I am not sure what other dimensions and metrics you have in there.
Query with out metrics
The reporting api requires that you send at least one metric. It is not possible to make a request with out any metrics.
•Any request must supply at least one metric; a request cannot consist
only of dimensions.
What I don't understand is you speak of not wanting any metrics yet ga:transactionRevenue is a metric.

Related

Youtube Analytics APi Error while trying to generate the report for traffic source

When I specify the following metrics and dimensions the query does not work:
Metrics - views
Dimensions - insightTrafficSourceType
When I specify the following metrics and dimensions the query does not work:
Metrics - views
Dimensions - insightTrafficSourceType
Query URL -https://youtubeanalytics.googleapis.com/v2/reports?endDate=2017-01-30&startDate=2017-01-28&metrics=views&ids=contentOwner==CONTENT_OWNER_ID&dimensions=insightTrafficSourceType
Error :message The query is not supported. Check the documentation at https://developers.google.com/youtube/analytics/v2/available_reports for a list of supported queries.
When you are requesting a content owner report for traffic sources, you must also provide a filter to the query.
The filter can be one of the following:
video, channel, group, or a supported combination of uploaderType and claimedStatus
See documentation for the content owner traffic sources report:
https://developers.google.com/youtube/analytics/content_owner_reports#traffic-source-reports

In which case will this error occurs "Restricted dimension(s): ga:userAgeBracket, ga:userGender can only be queried under certain conditions"?

I'm using Google Analytics Core Reporting API v4. When I query using the dimensions: ga:userAgeBracket & ga:userGender, I get the following error:
Restricted dimension(s): ga:userAgeBracket, ga:userGender can only be queried under certain conditions
Can someone tell me why this error occurs?
Not all dimensions and metrics can be queried together. This can be for several reasons it may not make sense to have them mixed. It may also be that a relation between them does not exist.
My guess would be that there is no relation between ga:userAgeBracket, ga:userGender. Gender came from double click cookie.

How to get ALL communities from DSpace rest api

Using the endpoint:
GET https://mydspace.org/rest/communities/
I seem to only get 100 results returned. I can't see any options in the documentation to return more. How do I do this?
Most of the DSpace rest endpoints support a limit parameter. I suppose that there is some maximum size that you can request, but the limit should be able to go higher than 100.
https://demo.dspace.org/rest/communities?limit=500
If you still are unable to retrieve everything in one request (or if you timeout), you can paginate through the results in your code.
https://demo.dspace.org/rest/communities?limit=100
https://demo.dspace.org/rest/communities?offset=100&limit=100
https://demo.dspace.org/rest/communities?offset=200&limit=100
There is an endpoint (in DSpace 6) that will allow you to retrieve the ids and handles for the full hierarchy.
https://demo.dspace.org/rest/hierarchy
It's not very prominent, but pagination of REST responses is documented at https://wiki.duraspace.org/display/DSDOC6x/REST+API#RESTAPI-RESTEndpoints just above "Index / Authentication".

Grafana - Graph with metrics on demand

I am using Grafana for my application, where I have metrics being exposed from my data source on demand, and I want to monitor such on-demand metrics in Grafana in a user-friendly graph. For example, until an exception has been hit by my application, the data source does NOT expose the metric named 'Exception'. However, I want to create a graph before hand where I should be able to specify the metric 'Exception' and it should log it in the graph whenever my data source exposes the 'Exception' metric.
When I try to create a graph on Grafana using the web GUI, I'm unable to see these 'on-demand metrics' since they've not yet been exposed by my data source. However, I should be able to configure the graph such that in case these metrics are exposed then show them. If I go ahead and type out the non-exposed metric name in the metrics field, I get an error "Timeseries data request error".
Does Grafana provide a method to do this? If so, what am I missing?
It depends on what data source you are using (Graphite, InfluxDB, OpenTSDB?).
For graphite you can enter raw query mode (pen button). To specify what ever query you want, it does not need to exist. Same is true InfluxDB, you find the raw query mode in the hamburger menu drop down to the right of eacy query.
You can also use wildcards in a graphite query (or regex in InfluxDB) to create generic graphs that will add series to the graph as they come in.

Neo4j: Cypher over REST get summary of operations

Is there any way when using the REST API to get the summary of operations that have completed without returning the nodes.
When using the web admin console after doing an operation I get a summary like
1 node inserted
2 relationships inserted
1 node deleted.
In the examples here I notice there is no example of summary information sent back to the client. I would have to return the nodes inserted to know the insert had occurred.
When doing a request over the network often it is a good idea to minimize the data response size. A quick summary would help with this. is it possible to get one from the REST endpoint?
I'm pretty sure this is not possible. It would be a nice addition, though. Have you filed a feature request?