I am trying to create a calculated field, which would be used in Data Studio like that(data would be from GA Events):
I would like to have as a calculated field in a time series:
Event Value of (Event Category: Economy, Event Action: Wallet Credits Changed, Event Label: game_session_bet)
+
Event Value of (Event Category: Economy, Event Action: Wallet Credits Changed, Event Label: game_session_win)
So basically a sum of those two event values.
You can't mix metrics and dimensions in a calculated field, so you need to make a calculated field dimension and use that in a filter.
Your field: game_session
CASE WHEN
(Event Value = 'Economy') AND (Event Action = 'Wallet Credits Changed') AND (Event Label in ('game_session_bet','gam_session_win')) then 'game_session'
ELSE 'other
END
Then make a filter where 'game_session' equals 'game_session' and make a chart with Event Value as the metric.
Related
My users are given 2 events to interact with:
Event A - Category: Leading_Events, Action: Event_A_Action
Event B - Category: Leading_Events, Action: Event_B_Action
Either event above eventually leads them to a final event *:
Final Event - Category: Final_Event, Action: Final_Event_Action
I want to create a report that shows which Action of Leading_Events led the users to Final_Event_Action. Can it be done? Thanks.
* (there may be some other events in between before reaching Final Event, but A B are what matters).
You can get the result with two segments using sequences, i.e. user with event action A followed by event action Final, and the other with event action B followed by event action Final.
I have a Calculated Model, MonthlyTotalsByResource, displayed in a table that I am trying to query with a filter. First, I am retrieving the initial data from a regular Data Model called Allocations. I only wish to retrieve records from Allocations where the "Approved" field =true.
I also want to allow the user to filter MonthlyTotalsByResource by the "ManagerName" field. I have created a Dropdown widget with the Options as the full list of managers, and the Value is a query on the Calculated Model datasource:
#datasource.query.filters.ManagerName._equals
Here is the beginning of my code for getting the data for the Calculated Model MonthlyTotalsByResource from the regular data model Allocations, and where I filter for only "true" values in the Approved field. I am unclear what I should make the ManagerName filter set to in order for it to be binded to my Dropdown widget, or if I should add another query on the Calculated Model itself, instead of here on the regular Data Model.
function getMonthlyTotalsByResource_() {
var allRecordsQuery = app.models.Allocations.newQuery();
allRecordsQuery.filters.Approved._equals = true;
allRecordsQuery.filters.Resource.Manager.ManagerName._equals = ;
First things first, you need to introduce ManagerName parameter in your calculated datasource:
Once you add the parameter, you'll be able to set its value on client and read on server.
// dropdown widget's 'value' property binding
#datasources.MonthlyTotalsByResource.query.parameters.ManagerName
// server side code to get parameter value
var query = app.models.Allocations.newQuery();
...
query.filters.Resource.Manager.ManagerName._equals = query.parameters.ManagerName;
...
I have an event that has two different actions. I would like to compare the actions to get stats. I am struggling on how to set this up in Google Analytics (custom reports).
Here is how I would like the table set up:
(rows) Event Label - Name of page
(column 1) Event Action - Page View (total # of events with this
action)
(column 2) Event Action - Form Submission (total # of events with this
action)
(they share the same event category)
Thanks,Brian
Dimensions : Event Label , Event Action
Metrics : Total (Unique?) Events
Filter : Event Action Regex => Page View|Form Submission
First, I am searching my own calendar using:
DateTime min = new DateTime(System.currentTimeMillis() - 3600000);
DateTime max = new DateTime(System.currentTimeMillis() + 400000000);
calendarService.events().list("primary").setTimeMin(min).setTimeMax(max).setSingleEvents(false).setShowDeleted(false).execute()
And I am getting these two events:
Event ID: ttnt08g1300qmc9m92ia2s8a3g_20170517T101500Z
Summary: null
Status: cancelled
Event Start/End: null null
Recurrence: null
RecurringEventId: ttnt08g1300qmc9m92ia2s8a3g
Event ID: cq61agdr4sbdnfj7rfbpbk2pro
Summary: Google Calendar API test event
Status: confirmed
Event Start/End: {"dateTime":"2017-05-17T15:24:53.000+02:00","timeZone":"Europe/Berlin"} {"dateTime":"2017-05-17T16:24:53.000+02:00","timeZone":"Europe/Berlin"}
Recurrence: RRULE:FREQ=DAILY;COUNT=3
RecurringEventId: null
Then I expand search criteria (please mind min object value) and execute the same query, then I got one less result.
DateTime min = new DateTime(System.currentTimeMillis() - 400000000);
DateTime max = new DateTime(System.currentTimeMillis() + 400000000);
Then return only
Event ID: cq61agdr4sbdnfj7rfbpbk2pro
Summary: Google Calendar API test event
Status: confirmed
Event Start/End: {"dateTime":"2017-05-17T15:24:53.000+02:00","timeZone":"Europe/Berlin"} {"dateTime":"2017-05-17T16:24:53.000+02:00","timeZone":"Europe/Berlin"}
Recurrence: [RRULE:FREQ=DAILY;COUNT=3]
RecurringEventId: null
My question is why when I search starting from current time - 400000000 there is one event less than when searching starting from current time - 3600000 ?
I have a simple trigger to copy the StartDateTime from a calendar event into a field called "Service Start Date" on the related Opportunity any time a calendar event is created or changed.
I'm stuck on converted the StartDateTime to a regular Date field, which is on the opportunity.
trigger EventServiceStartDateforOpp on Event (after insert, after update) {
List<Opportunity> opps = new List<Opportunity>{};
if (trigger.isInsert)
{
for (Event t : trigger.new)
{
if (t.OwnerId == '02340000000WATv')
{opps.add(new Opportunity(Id=t.WhatId, Service_Start_Date__c=t.StartDateTime));
}}}}
date d = Date.newInstance(tiempo.year(),tiempo.month(),tiempo.day());