Google.Analytics. Make a report on url parameters values - google-analytics

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).

Related

GA4 Custom Dimensions (not set)

I added a custom parameter to my transactions. I am receiving data as when I go to Reports> Realtime>View user snapshot and click on an event I can see the parameter name and a value which is good. I can also see the value when I go to Reports>Engagement>Events and chose and event and select my parameter in the 'Events in last 30 minutes tab'. The issue comes when I go to Explore and make a Free Form with my parameter as a row or column as the column would simply show '(not set)' even though I know it is set from the before views that I mentioned
Thank you
You will see a value of “not set” for a custom dimension during the first 48 hours after you create the custom dimension.

Custom dimension vs custom metric

Ok, I'm trying to track when the users get an empty list of products.
The list is defined by a filter, I want to first know if there's a lot of people getting empty results to take some action like tracking what's the filter combination they're using, anyhow...
To picture it, this is what I want to achieve:
But I'm confused between the custom dimension and custom metrics. In my head, all I need is a custom metric (Cause the amount of empty results sounds like a metric to me).
So I created an "Empty list results" custom metric with the scope of Hit. And I'm passing just an integer 1 to this custom metric.
But it doesn't show what I need. Am I missing something?
UPDATE
Including every hit to the page, even when I'm not sending the custom metric index/value pair
In this example:
/custom-metric-test-1 does not include the custom metric index/value
/custom-metric-test-2 does include the custom metric index/value
But they both show in the report. It's like my custom metric it's just an alias for hits.
You can use a metric or a dimension, it depends on the result you want to get (read), in all cases you can have the number of times a page has a certain characteristic (in your case the empty product list).
Use a custom report, i.e. with flat table, put 'page' as a dimension and your custom metric as a metric. Page and hit are the same scope so the queried pair of elements shouldn't give you strange results.

Link to primary and secondary data sources in Tableau

I’m trying to create a dashboard filter in Tableau. All but one of my graphs have the same primary data source A. The filter will affect all these graphs as intended. However I have one sheet where the primary data source is B, and the secondary data source is A. I can’t get this particular graph to link to the quick filter I’ve created. Does anyone know of a workaround for this?
The easiest way to filter multiple data sources from a single user control is to use a parameter along with calculated fields in each data source that reference the parameter setting. The calculated fields can then be put on the filter shelf for the appropriate worksheets.
This solution doesn't fit every circumstance.
Parameters can only have a single value, and the list of arbitrary values must either be defined statically in the workbook or allow the user to enter an arbitrary value. You can't dynamically lookup the list of legal parameter values in a database table (although you can use a field to populate the list initially).
Parameters are independent of any data source.
So if these restrictions don't hamper your use case, then you can have one parameter control on a dashboard that influences the filters applied to many worksheets. The simplest calculated field used for filtering could just say [My_Field] = [My_Parameter]. You can allow extend this idea to define parameter values that reference multiple choices like: "A", "B", "A and B" and then adjust your calculated fields accordingly. At some point, this approach gets unwieldy.
Another approach is use a worksheet as a filter, by displaying marks for each option, and then using filter actions to use the selected marks to filter other worksheets. This approach allows multiple selection, and dynamically loading choices from a database table.

How to describe (enumerate) picklist enties valid for a specific record type in Salesforce?

In apex code I want to enumerate the legal values for a picklist field. To do this I can just call Account.Foobar__c.getDescribe().getPickListValues() and I've got a list of Schema.PickListEntry values.
However it's possible to setup multiple record types for a given sObject. For example Account might have "Manufacturer", "Distributor" and "Retailer" record types. In the Salesforce setup it is possible edit (limit) the picklist entries for each field based on record type. So Retailer type accounts might only use a subset of the picklist values for the Foobar field.
So basically I want Account.Foobar__c.getDescribe().getPickListValues('Retailer') however this is not the syntax. The validFor method looks promising, but it seems like it is only for field dependent picklists - a picklist filtered only by record type returns false for isDependentPicklist.
I know this is an old post, but maybe the info below will help someone who still needs the answer.
I found here that one can actually get a list of record type specific picklist values by making a describeLayout() call.
Using your example (C#):
DescribeLayoutResult result = binding.describeLayout("Account", new string[] { "01230000000xxXxXXX" } );
PicklistEntry[] values = result.recordTypeMappings[0].picklistsForRecordType[12345].picklistValues;
Replace "01230000000xxXxXXX" with a RecordTypeId of your Retailer record type object. Use the query "SELECT Id FROM RecordType WHERE Name = 'Retailer'" to get the value.
Replace 12345 with an index of your picklist object that you would like to get values of.
You can't do it in pure Apex AFAIK, unfortunately. The metadata API does expose it.
Related opinions: http://boards.developerforce.com/t5/Apex-Code-Development/Any-way-to-obtain-picklist-values-by-record-type/td-p/287563

How can I get results for a dimension (custom variables), where the value is not set?

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:

Resources