This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
ue5-google-analytics:universal-event-duration [2022/09/01 12:23] Staff created |
ue5-google-analytics:universal-event-duration [2022/09/01 12:48] (current) Staff ↷ Page name changed from ue5-google-analytics:universal-events-duration to ue5-google-analytics:universal-event-duration |
||
|---|---|---|---|
| Line 10: | Line 10: | ||
| * //Scope//: //Hit//; | * //Scope//: //Hit//; | ||
| * // | * // | ||
| - | * (in this example we set the //Name// to // | + | * (in this example we set the //Name// to // |
| - **important** take note of the Custom Metric //index// (it's 1-based), from the //Example Codes for This Metric// box; | - **important** take note of the Custom Metric //index// (it's 1-based), from the //Example Codes for This Metric// box; | ||
| - in your application code, log the // | - in your application code, log the // | ||
| Line 16: | Line 16: | ||
| - add the calculated duration to a logged event (e.g. using '' | - add the calculated duration to a logged event (e.g. using '' | ||
| - add it as an event // | - add it as an event // | ||
| - | - **important** as key use the string '' | + | - **important** as key use the string '' |
| GA will now be able to receive and sum all the // | GA will now be able to receive and sum all the // | ||
| Line 28: | Line 28: | ||
| - in your Google Analytics Property //View// settings, select // | - in your Google Analytics Property //View// settings, select // | ||
| - select //New Calculated Metric//; | - select //New Calculated Metric//; | ||
| - | - set the formula to: '' | + | - set the formula to: '' |
| This will allow GA to calculate the average duration for a group of events. The sum of '' | This will allow GA to calculate the average duration for a group of events. The sum of '' | ||
| Line 35: | Line 35: | ||
| You can now use both the //Custom Metric// and the // | You can now use both the //Custom Metric// and the // | ||
| - | The example below is for a //Custom Report// where data are filter for a specific //Event Action// name, with resulting events grouped by the //Event Label// string, with outputs showing the calculate custom //Average Duration// (in addition to the used //Totale Events// and // | ||
| + | The example below is for a //Custom Report// where data are filter for a specific //Event Action// name, with resulting events grouped by the //Event Label// string, with outputs showing the calculate custom //Average Duration// (in addition to the associated //Total Events// and // | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | This is an example of the corresponding output: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | GA collects all the events satisfying the //filter//, group them accordingly to our configuration and for each resulting group it sums matching logged // | ||