I used query.getUrl() for bring low-directory values.
But, I just wanted to bring each Url value. Like... wanna get the value form the lower "/mypage".
How can I get the value? Should I change the query in query.getUrl()?
Related
I have a Calculated datasource that's populated via an appscript function. When I display this datasource in a table, it works great but I can't click on the headers to sort them. I'd like to implement sorting.
I can see that sorting is specified in the Query object using Query.sorting.<fieldname>._ascending() and descending(). What I can't figure out is how to read the value that was set by these functions so I can determine how the user wants me to sort the results.
How do I determine what the desired sort is from the appmaker Query object?
I can't find any documentation around this either, but by inspecting the Query object, I found I can do this:
query.sorting.._order: true - ascending; false - descending; null - no sorting by this column.
query.sorting.._priority: 0 based priority, null - no sorting.
So assuming I have a "Title" column, by inspecting query.sorting.Title._order and query.sorting.Title._priority, I can tell if I should or how to sort by it.
I am using Query explorer: https://ga-dev-tools.appspot.com/query-explorer/
This is what I tried:
It gives me 0 results but when I remove dimension4 which is sessionclientid the result is over 1000.
The dimension4 doesn't seem to work well with userGender. Why is that?
You are only going to get results where dimension4 was set. If you haven't sent data with all of your hits for dimension4 then your not going to get any results.
In the event that a dimension value is null Google analytics will not return it. Make sure you are setting that with all of the hits you are sending.
Remember that old hits those before you added the dimension custom dimension will not contain the dimension and there for not be returned.
There are also a number of dimensions that simply cant be associated with each other because the data doesn't exist. This happends a lot with custom dimensions.
I'm trying to add some filters to request for news in bing api but currently I don't get any effects of doing this ( for example filter for news from current month).
I'm trying to this with : https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&?category=business , and replacing some filters here but I always getting the same result.
Currently i want to add three filters : freshness, category and language for news from current day and month.
So it is bug or I'm doing something wrong with filters ?
One problem is that you have an extra "?" in your query. You only need the first one, and then you can use "&" to delimit individual parameters:
https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&category=business
You might also try adding a market to the query string, like so:
https://api.cognitive.microsoft.com/bing/v5.0/news/search?freshness=month&category=business&mkt=en-us
I'm using 7.0 and don't know what headers you're passing, so I can't test this directly, but it's possible a default market isn't being set. Since categories are market specific, then depending on how Bing handles this, it could plausibly prevent your category from being used.
Is it possible to make a report, where lines of the table will be different url parameter values and other columns - say ecommerce (transactions, CR)?
There is no out of the box report.
To do that you would need to:
create custom dimensions in the property settings (you only have 20). Let's say you name them imaginatively parameter1 - parameter20
user filters to map the query parameter (lets say param1-param20) to the custom dimension.
create a custom report for your custom dimensions
Go to filters, custom, advanced. Set Field A First field Request URI. In the Extract A field you enter (for a GET parameter "param1") the expression param1=([^&.]*). This stores the value for param1 in a variable called $A1. Leave Field B and Extract B empty.
In "Output to" select the name of your custom dimension, in this case "parameter1". In Constructor enter $A1. This will map the value extracted from the parameter to your custom dimension.
Other options: Field A required "Yes", Field B required "No", Override Output Field "Yes", case sensitive "No".
Now wait a while until data has been collected. Then go to "customization", create a new custom report, select parameter1 (or any other of your custom dimensions) as dimension and add metrics at your gusto. The report will only show data for pageview where the dimension has been set.
You would probably create your custom dimensions at hit level (unless you are only interested in the last value in a user session), so combining them with conversion metrics like transactions might produce not particulary valid results.
If you have more than 20 different url parameters you want to capture you are out of luck.
(Btw. I'm not actually sure this is a on-topic question, but the answer has an regular expression in it so it might count. Still reporting questions are probably better suited for webmasters.stackexchange.org).
I am using custom variables to track order ids. In order to aggregate analytics data into out data warehouse, I want to select a number of metrics with the custom variable as a dimension. However, if I do so, I will not get the entries where the variable is not set (E.g. sessions that didn't result in a sale). I need to get these as well.
Can I write a filter or segment that selects only the entries that doesn't have a particular custom variable? I have tried:
segment=dynamic::ga:customVarValue1==
But that doesn't seem to work (It gives no results back).
Basically I'm looking for the equivalent to where ga:customVarValue1 is null in sql.
In short, it's not possible to get the nullset data, as explained by a Google rep:
For some dimensions, GA uses the default value of (not set).
Custom Variable do not have a default value, so if a hit does not have a
custom variable associated with it, all the other dimensions in the query
are not added to the reports.
The original answer is a little confusing, but when you read between the lines it suggests that they throw out these "empty" values when they run their aggregates.
The "correct" approach, as he explains, is to set a default value for any row you want reported:
If you need to see the (not set) value, you could try sending a default
value for custom variables.
For example if you use visitor level custom vars to track member vs
non-member, you should always set non-member as a default for everybody;
then modify to member once they register.
Details are here: http://groups.google.com/group/google-analytics-data-export-api/browse_thread/thread/cd078ddb26ca18d5?pli=1
I've just had some success solving this by using a Regex to capture users or sessions where the custom dimension has no value. In my case I want to separate logged in and logged out users.
The Regex .+ will capture any non-empty value, so can be used to get the job done.
The filters for my Returning users segment is matches regex: .+ like this:
For the Customer prospects I used: does not match regex: .+ like this:
It's early days, but this appears to be working: