-
Notifications
You must be signed in to change notification settings - Fork 7
/
google_analytics_reports.inc
2792 lines (2790 loc) · 125 KB
/
google_analytics_reports.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* @file
* Datapoins from Google Analytics.
*/
/**
* Google Analytics dimensions and metrics.
*
* TODO: Replace it with Google Analytics Metadata API.
* TODO: @see https://www.drupal.org/node/2373151.
* @see https://developers.google.com/analytics/devguides/reporting/core/dimsmets
*/
function google_analytics_reports_get_fields() {
return array(
// User dimensions.
'userType' => array(
'type' => 'dimension',
'group' => t('User dimensions'),
'name' => t('User Type'),
'description' => t('A boolean indicating if a user is new or returning. Possible values: <code>New Visitor</code>, <code>Returning Visitor</code>.'),
'datatype' => 'string',
),
'sessionCount' => array(
'type' => 'dimension',
'group' => t('User dimensions'),
'name' => t('Count of Sessions'),
'description' => t('The session index for a user to your property. Each session from a unique user will get its own incremental index starting from 1 for the first session. Subsequent sessions do not change previous session indicies. For example, if a certain user has 4 sessions to your website, sessionCount for that user will have 4 distinct values of 1 through 4.'),
'datatype' => 'string',
),
'daysSinceLastSession' => array(
'type' => 'dimension',
'group' => t('User dimensions'),
'name' => t('Days Since Last Session'),
'description' => t('The number of days elapsed since users last visited your property. Used to calculate user loyalty.'),
'datatype' => 'string',
),
'userDefinedValue' => array(
'type' => 'dimension',
'group' => t('User dimensions'),
'name' => t('User Defined Value'),
'description' => t('The value provided when you define custom visitor segments for your website.'),
'datatype' => 'string',
),
// User metrics.
'users' => array(
'type' => 'metric',
'group' => t('User metrics'),
'name' => t('Users'),
'description' => t('Total number of users to your property for the requested time period.'),
'datatype' => 'integer',
),
'newUsers' => array(
'type' => 'metric',
'group' => t('User metrics'),
'name' => t('New Users'),
'description' => t('The number of users whose session on your property was marked as a first-time session.'),
'datatype' => 'integer',
),
// User calculated metrics.
'percentNewSessions' => array(
'type' => 'metric',
'group' => t('User calculated metrics'),
'name' => t('% New Sessions'),
'description' => t('The percentage of sessions by people who had never visited your property before.'),
'calculation' => 'ga:newUsers / ga:sessions',
'datatype' => 'percent',
),
// Session dimensions.
'sessionDurationBucket' => array(
'type' => 'dimension',
'group' => t('Session dimensions'),
'name' => t('Session Duration'),
'description' => t('The length of a session on your property measured in seconds and reported in second increments. The value returned is a string.'),
'datatype' => 'string',
),
// Session metrics.
'sessions' => array(
'type' => 'metric',
'group' => t('Session metrics'),
'name' => t('Sessions'),
'description' => t('Counts the total number of sessions.'),
'datatype' => 'integer',
),
'bounces' => array(
'type' => 'metric',
'group' => t('Session metrics'),
'name' => t('Bounces'),
'description' => t('The total number of single page (or single engagement hit) sessions for your property.'),
'datatype' => 'integer',
),
'sessionDuration' => array(
'type' => 'metric',
'group' => t('Session metrics'),
'name' => t('Session Duration'),
'description' => t('The total duration of user sessions represented in total seconds.'),
'datatype' => 'time',
),
'hits' => array(
'type' => 'metric',
'group' => t('Session metrics'),
'name' => t('Hits'),
'description' => t('Total number of hits sent to Google Analytics. This metric sums all hit types (e.g. pageview, event, timing, etc.).'),
'datatype' => 'integer',
),
// Session calculated metrics.
'bounceRate' => array(
'type' => 'metric',
'group' => t('Session calculated metrics'),
'name' => t('Bounce Rate'),
'description' => t('The percentage of single-page session (i.e., session in which the person left your property from the first page).'),
'calculation' => 'ga:bounces / ga:sessions',
'datatype' => 'percent',
),
'avgSessionDuration' => array(
'type' => 'metric',
'group' => t('Session calculated metrics'),
'name' => t('Avg. Session Duration'),
'description' => t('The average duration of user sessions represented in total seconds.'),
'calculation' => 'ga:sessionDuration / ga:sessions',
'datatype' => 'time',
),
// Traffic sources dimensions.
'referralPath' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Referral Path'),
'description' => t('The path of the referring URL (e.g. <code>document.referrer</code>). If someone places a link to your property on their website, this element contains the path of the page that contains the referring link.'),
'datatype' => 'string',
),
'fullReferrer' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Full Referrer'),
'description' => t('The full referring URL including the hostname and path.'),
'datatype' => 'string',
),
'campaign' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Campaign'),
'description' => t('When using manual campaign tracking, the value of the <code>utm_campaign</code> campaign tracking parameter. When using AdWords autotagging, the name(s) of the online ad campaign that you use for your property. Otherwise the value <code>(not set)</code> is used.'),
'datatype' => 'string',
),
'source' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Source'),
'description' => t('The source of referrals to your property. When using manual campaign tracking, the value of the <code>utm_source</code> campaign tracking parameter. When using AdWords autotagging, the value is <code>google</code>. Otherwise the domain of the source referring the user to your property (e.g. <code>document.referrer</code>). The value may also contain a port address. If the user arrived without a referrer, the value is <code>(direct)</code>.'),
'datatype' => 'string',
),
'medium' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Medium'),
'description' => t('The type of referrals to your property. When using manual campaign tracking, the value of the <code>utm_medium</code> campaign tracking parameter. When using AdWords autotagging, the value is <code>ppc</code>. If the user comes from a search engine detected by Google Analytics, the value is <code>organic</code>. If the referrer is not a search engine, the value is <code>referral</code>. If the users came directly to the property, and <code>document.referrer</code> is empty, the value is <code>(none)</code>.'),
'datatype' => 'string',
),
'sourceMedium' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Source / Medium'),
'description' => t('Combined values of <code>ga:source</code> and <code>ga:medium</code>.'),
'datatype' => 'string',
),
'keyword' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Keyword'),
'description' => t('When using manual campaign tracking, the value of the <code>utm_term</code> campaign tracking parameter. When using AdWords autotagging or if a user used organic search to reach your property, the keywords used by users to reach your property. Otherwise the value is <code>(not set)</code>.'),
'datatype' => 'string',
),
'adContent' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Ad Content'),
'description' => t('When using manual campaign tracking, the value of the <code>utm_content</code> campaign tracking parameter. When using AdWords autotagging, the first line of the text for your online Ad campaign. If you are using mad libs for your AdWords content, this field displays the keywords you provided for the mad libs keyword match. Otherwise the value is <code>(not set)</code>.'),
'datatype' => 'string',
),
'socialNetwork' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Social Network'),
'description' => t('Name of the social network. This can be related to the referring social network for traffic sources, or to the social network for social data hub activities. E.g. Google+, Blogger, etc.'),
'datatype' => 'string',
),
'hasSocialSourceReferral' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Social Source Referral'),
'description' => t('Indicates sessions that arrived to the property from a social source. The possible values are <code>Yes</code> or <code>No</code> where the first letter is capitalized.'),
'datatype' => 'string',
),
'campaignCode' => array(
'type' => 'dimension',
'group' => t('Traffic sources dimensions'),
'name' => t('Campaign Code'),
'description' => t('When using manual campaign tracking, the value of the utm_id campaign tracking parameter.'),
'datatype' => 'string',
),
// Traffic sources metrics.
'organicSearches' => array(
'type' => 'metric',
'group' => t('Traffic sources metrics'),
'name' => t('Organic Searches'),
'description' => t('The number of organic searches that happened within a session. This metric is search engine agnostic.'),
'datatype' => 'integer',
),
// Adwords dimensions.
'adGroup' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Ad Group'),
'description' => t('The name of your AdWords ad group.'),
'datatype' => 'string',
),
'adSlot' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Ad Slot'),
'description' => t('The location of the advertisement on the hosting page (Top, RHS, or not set).'),
'datatype' => 'string',
),
'adSlotPosition' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Ad Slot Position'),
'description' => t('The ad slot positions in which your AdWords ads appeared (1-8).'),
'datatype' => 'string',
),
'adDistributionNetwork' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Ad Distribution Network'),
'description' => t('The networks used to deliver your ads (Content, Search, Search partners, etc.).'),
'datatype' => 'string',
),
'adMatchType' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Query Match Type'),
'description' => t('The match types applied for the search term the user had input (Phrase, Exact, Broad, etc.). Ads on the content network are identified as <code>Content network</code>. Details: <a href="!url">@url</a>.', array('@url' => 'https://support.google.com/adwords/answer/2472708')),
'datatype' => 'string',
),
'adKeywordMatchType' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Keyword Match Type'),
'description' => t('The match types applied to your keywords (Phrase, Exact, Broad). Details: <a href="!url">@url</a>.', array('@url' => 'https://support.google.com/adwords/answer/2472708')),
'datatype' => 'string',
),
'adMatchedQuery' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Matched Search Query'),
'description' => t('The search queries that triggered impressions of your AdWords ads.'),
'datatype' => 'string',
),
'adPlacementDomain' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Placement Domain'),
'description' => t('The domains where your ads on the content network were placed.'),
'datatype' => 'string',
),
'adPlacementUrl' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Placement URL'),
'description' => t('The URLs where your ads on the content network were placed.'),
'datatype' => 'string',
),
'adFormat' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Ad Format'),
'description' => t('Your AdWords ad formats (Text, Image, Flash, Video, etc.).'),
'datatype' => 'string',
),
'adTargetingType' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Targeting Type'),
'description' => t('How your AdWords ads were targeted (keyword, placement, and vertical targeting, etc.).'),
'datatype' => 'string',
),
'adTargetingOption' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Placement Type'),
'description' => t('How you manage your ads on the content network. Values are Automatic placements or Managed placements.'),
'datatype' => 'string',
),
'adDisplayUrl' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Display URL'),
'description' => t('The URLs your AdWords ads displayed.'),
'datatype' => 'string',
),
'adDestinationUrl' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('Destination URL'),
'description' => t('The URLs to which your AdWords ads referred traffic.'),
'datatype' => 'string',
),
'adwordsCustomerId' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('AdWords Customer ID'),
'description' => t('A string. Corresponds to AdWords API AccountInfo.customerId.'),
'datatype' => 'string',
),
'adwordsCampaignId' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('AdWords Campaign ID'),
'description' => t('A string. Corresponds to AdWords API Campaign.id.'),
'datatype' => 'string',
),
'adwordsAdGroupId' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('AdWords Ad Group ID'),
'description' => t('A string. Corresponds to AdWords API AdGroup.id.'),
'datatype' => 'string',
),
'adwordsCreativeId' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('AdWords Creative ID'),
'description' => t('A string. Corresponds to AdWords API Ad.id.'),
'datatype' => 'string',
),
'adwordsCriteriaId' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('AdWords Criteria ID'),
'description' => t('A string. Corresponds to AdWords API Criterion.id.'),
'datatype' => 'string',
),
'isTrueViewVideoAd' => array(
'type' => 'dimension',
'group' => t('AdWords dimensions'),
'name' => t('TrueView Video Ad'),
'description' => t('<code>Yes</code> or <code>No</code> - Indicates whether the ad is an AdWords TrueView video ad.'),
'datatype' => 'string',
),
// Adwords metrics.
'impressions' => array(
'type' => 'metric',
'group' => t('AdWords metrics'),
'name' => t('Impressions'),
'description' => t('Total number of campaign impressions.'),
'datatype' => 'integer',
),
'adClicks' => array(
'type' => 'metric',
'group' => t('AdWords metrics'),
'name' => t('Clicks'),
'description' => t('The total number of times users have clicked on an ad to reach your property.'),
'datatype' => 'integer',
),
'adCost' => array(
'type' => 'metric',
'group' => t('AdWords metrics'),
'name' => t('Cost'),
'description' => t('Derived cost for the advertising campaign. The currency for this value is based on the currency that you set in your AdWords account.'),
'datatype' => 'currency',
),
// Adwords calculated metrics.
'CPM' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('CPM'),
'description' => t('Cost per thousand impressions.'),
'calculation' => 'ga:adCost / (ga:impressions / 1000)',
'datatype' => 'currency',
),
'CPC' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('CPC'),
'description' => t('Cost to advertiser per click.'),
'calculation' => 'ga:adCost / ga:adClicks',
'datatype' => 'currency',
),
'CTR' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('CTR'),
'description' => t('Click-through-rate for your ad. This is equal to the number of clicks divided by the number of impressions for your ad (e.g. how many times users clicked on one of your ads where that ad appeared).'),
'calculation' => 'ga:adClicks / ga:impressions',
'datatype' => 'percent',
),
'costPerTransaction' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('Cost per Transaction'),
'description' => t('The cost per transaction for your property.'),
'calculation' => '(ga:adCost) / (ga:transactions)',
'datatype' => 'currency',
),
'costPerGoalConversion' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('Cost per Goal Conversion'),
'description' => t('The cost per goal conversion for your site.'),
'calculation' => 'ga:adCost / ga:goalCompletionsAl',
'datatype' => 'currency',
),
'costPerConversion' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('Cost per Goal Conversion'),
'description' => t('The cost per goal conversion for your property.'),
'calculation' => '(ga:adCost) / (ga:goalCompletionsAll)',
'datatype' => 'currency',
),
'RPC' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('RPC'),
'description' => t('RPC or revenue-per-click is the average revenue (from ecommerce sales and/or goal value) you received for each click on one of your search ads.'),
'calculation' => '(ga:transactionRevenue + ga:goalValueAll) / ga:adClicks',
'datatype' => 'currency',
),
'ROAS' => array(
'type' => 'metric',
'group' => t('AdWords calculated metrics'),
'name' => t('ROAS'),
'description' => t('Return On Ad Spend (ROAS) is the total transaction revenue and goal value divided by derived advertising cost.'),
'calculation' => '(ga:transactionRevenue + ga:goalValueAll) / ga:adCost',
'datatype' => 'percent',
),
// Goal conversions dimensions.
'goalCompletionLocation' => array(
'type' => 'dimension',
'group' => t('Goal conversions dimensions'),
'name' => t('Goal Completion Location'),
'description' => t('The page path or screen name that matched any destination type goal completion.'),
'datatype' => 'string',
),
'goalPreviousStep1' => array(
'type' => 'dimension',
'group' => t('Goal conversions dimensions'),
'name' => t('Goal Previous Step - 1'),
'description' => t('The page path or screen name that matched any destination type goal, one step prior to the goal completion location.'),
'datatype' => 'string',
),
'goalPreviousStep2' => array(
'type' => 'dimension',
'group' => t('Goal conversions dimensions'),
'name' => t('Goal Previous Step - 2'),
'description' => t('The page path or screen name that matched any destination type goal, one step prior to the goal completion location.'),
'datatype' => 'string',
),
'goalPreviousStep3' => array(
'type' => 'dimension',
'group' => t('Goal conversions dimensions'),
'name' => t('Goal Previous Step - 3'),
'description' => t('The page path or screen name that matched any destination type goal, one step prior to the goal completion location.'),
'datatype' => 'string',
),
// Goal conversions metrics.
'goalXXStarts' => array(
'type' => 'metric',
'group' => t('Goal conversions metrics'),
'name' => t('Goal XX Starts'),
'description' => t('The total number of starts for the requested goal number.'),
'datatype' => 'integer',
),
'goalStartsAll' => array(
'type' => 'metric',
'group' => t('Goal conversions metrics'),
'name' => t('Goal Starts'),
'description' => t('The total number of starts for all goals defined for your profile.'),
'datatype' => 'integer',
),
'goalXXCompletions' => array(
'type' => 'metric',
'group' => t('Goal conversions metrics'),
'name' => t('Goal XX Completions'),
'description' => t('The total number of completions for the requested goal number.'),
'datatype' => 'integer',
),
'goalCompletionsAll' => array(
'type' => 'metric',
'group' => t('Goal conversions metrics'),
'name' => t('Goal Completions'),
'description' => t('The total number of completions for all goals defined for your profile.'),
'datatype' => 'integer',
),
'goalXXValue' => array(
'type' => 'metric',
'group' => t('Goal conversions metrics'),
'name' => t('Goal XX Value'),
'description' => t('The total numeric value for the requested goal number.'),
'datatype' => 'currency',
),
'goalValueAll' => array(
'type' => 'metric',
'group' => t('Goal conversions metrics'),
'name' => t('Goal Value'),
'description' => t('The total numeric value for all goals defined for your profile.'),
'datatype' => 'currency',
),
// Goal conversions calculated metrics.
'goalValuePerSession' => array(
'type' => 'metric',
'group' => t('Goal conversions calculated metrics'),
'name' => t('Per Session Goal Value'),
'description' => t('The average goal value of a session on your property.'),
'calculation' => 'ga:goalValueAll / ga:sessions',
'datatype' => 'currency',
),
'goalXXConversionRate' => array(
'type' => 'metric',
'group' => t('Goal conversions calculated metrics'),
'name' => t('Goal XX Conversion Rate'),
'description' => t('The percentage of sessions which resulted in a conversion to the requested goal number.'),
'calculation' => 'ga:goalXXCompletions / ga:sessions',
'datatype' => 'percent',
),
'goalConversionRateAll' => array(
'type' => 'metric',
'group' => t('Goal conversions calculated metrics'),
'name' => t('Goal Conversion Rate'),
'description' => t('The percentage of sessions which resulted in a conversion to at least one of your goals.'),
'calculation' => 'ga:goalCompletionsAll / ga:sessions',
'datatype' => 'percent',
),
'goalXXAbandons' => array(
'type' => 'metric',
'group' => t('Goal conversions calculated metrics'),
'name' => t('Goal XX Abandoned Funnels'),
'description' => t('The number of times users started conversion activity on the requested goal number without actually completing it.'),
'calculation' => '(ga:goalXXStarts - ga:goalXXCompletions)',
'datatype' => 'integer',
),
'goalAbandonsAll' => array(
'type' => 'metric',
'group' => t('Goal conversions calculated metrics'),
'name' => t('Abandoned Funnels'),
'description' => t('The overall number of times users started goals without actually completing them.'),
'calculation' => '(ga:goalStartsAll - ga:goalCompletionsAll)',
'datatype' => 'integer',
),
'goalXXAbandonRate' => array(
'type' => 'metric',
'group' => t('Goal conversions calculated metrics'),
'name' => t('Goal XX Abandonment Rate'),
'description' => t('The rate at which the requested goal number was abandoned.'),
'calculation' => '((ga:goalXXStarts - ga:goalXXCompletions)) / (ga:goalXXStarts)',
'datatype' => 'percent',
),
'goalAbandonRateAll' => array(
'type' => 'metric',
'group' => t('Goal conversions calculated metrics'),
'name' => t('Total Abandonment Rate'),
'description' => t('The rate at which goals were abandoned.'),
'calculation' => '((ga:goalStartsAll - ga:goalCompletionsAll)) / (ga:goalStartsAll)',
'datatype' => 'percent',
),
// Platform or device dimensions.
'browser' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Browser'),
'description' => t('The names of browsers used by users to your website. For example, <code>Internet Explorer</code> or <code>Firefox</code>.'),
'datatype' => 'string',
),
'browserVersion' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Browser Version'),
'description' => t('The browser versions used by users to your website. For example, <code>2.0.0.14</code>.'),
'datatype' => 'string',
),
'operatingSystem' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Operating System'),
'description' => t('The operating system used by your users. For example, <code>Windows</code>, <code>Linux</code> , <code>Macintosh</code>, <code>iPhone</code>, <code>iPod</code>.'),
'datatype' => 'string',
),
'operatingSystemVersion' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Operating System Version'),
'description' => t('The version of the operating system used by your users, such as <code>XP</code> for Windows or <code>PPC</code> for Macintosh.'),
'datatype' => 'string',
),
'mobileDeviceBranding' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Mobile Device Branding'),
'description' => t('Mobile manufacturer or branded name.'),
'datatype' => 'string',
),
'mobileDeviceModel' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Mobile Device Model'),
'description' => t('Mobile device model.'),
'datatype' => 'string',
),
'mobileInputSelector' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Mobile Input Selector'),
'description' => t('Selector used on the mobile device (e.g.: <code>touchscreen</code>, <code>joystick</code>, <code>clickwheel</code>, <code>stylus</code>).'),
'datatype' => 'string',
),
'mobileDeviceInfo' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Mobile Device Info'),
'description' => t('The branding, model, and marketing name used to identify the mobile device.'),
'datatype' => 'string',
),
'mobileDeviceMarketingName' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Mobile Device Marketing Name'),
'description' => t('The marketing name used for the mobile device.'),
'datatype' => 'string',
),
'deviceCategory' => array(
'type' => 'dimension',
'group' => t('Platform or device dimensions'),
'name' => t('Device Category'),
'description' => t('The type of device: <code>desktop</code>, <code>tablet</code>, or <code>mobile</code>.'),
'datatype' => 'string',
),
// Geo network dimensions.
'continent' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Continent'),
'description' => t('The continents of property users, derived from IP addresses.'),
'datatype' => 'string',
),
'subContinent' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Sub Continent Region'),
'description' => t('The sub-continent of users, derived from IP addresses. For example, <code>Polynesia</code> or <code>Northern Europe</code>.'),
'datatype' => 'string',
),
'country' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Country / Territory'),
'description' => t('The country of users, derived from IP addresses.'),
'datatype' => 'string',
),
'region' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Region'),
'description' => t('The region of users to your property, derived from IP addresses. In the U.S., a region is a state, such as <code>New York</code>.'),
'datatype' => 'string',
),
'metro' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Metro'),
'description' => t('The Designated Market Area (DMA) from where traffic arrived on your property.'),
'datatype' => 'string',
),
'city' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('City'),
'description' => t('The cities of property users, derived from IP addresses.'),
'datatype' => 'string',
),
'latitude' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Latitude'),
'description' => t("The approximate latitude of the user's city. Derived from IP address. Locations north of the equator are represented by positive values and locations south of the equator by negative values."),
'datatype' => 'string',
),
'longitude' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Longitude'),
'description' => t("The approximate longitude of the user's city. Derived from IP address. Locations east of the meridian are represented by positive values and locations west of the meridian by negative values."),
'datatype' => 'string',
),
'networkDomain' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Network Domain'),
'description' => t('The domain name of the ISPs used by users to your property. This is derived from the domain name registered to the IP address.'),
'datatype' => 'string',
),
'networkLocation' => array(
'type' => 'dimension',
'group' => t('Geo network dimensions'),
'name' => t('Service Provider'),
'description' => t('The name of service providers used to reach your property. For example, if most users to your website come via the major service providers for cable internet, you will see the names of those cable service providers in this element.'),
'datatype' => 'string',
),
// System dimensions.
'flashVersion' => array(
'type' => 'dimension',
'group' => t('System dimensions'),
'name' => t('Flash Version'),
'description' => t("The versions of Flash supported by users' browsers, including minor versions."),
'datatype' => 'string',
),
'javaEnabled' => array(
'type' => 'dimension',
'group' => t('System dimensions'),
'name' => t('Java Support'),
'description' => t("Indicates Java support for user's browsers. The possible values are <code>Yes</code> or <code>No</code> where the first letter must be capitalized."),
'datatype' => 'string',
),
'language' => array(
'type' => 'dimension',
'group' => t('System dimensions'),
'name' => t('Language'),
'description' => t('The language provided by the HTTP Request for the browser. Values are given as an ISO-639 code (e.g. <code>en-gb</code> for British English).'),
'datatype' => 'string',
),
'screenColors' => array(
'type' => 'dimension',
'group' => t('System dimensions'),
'name' => t('Screen Colors'),
'description' => t("The color depth of users monitors, as retrieved from the DOM of the user\'s browser. For example <code>4-bit</code>, <code>8-bit</code>, <code>24-bit</code>, or <code>undefined-bit</code>."),
'datatype' => 'string',
),
'sourcePropertyDisplayName' => array(
'type' => 'dimension',
'group' => t('System dimensions'),
'name' => t('Source Property Display Name'),
'description' => t('Source property display name of roll-up properties. This is valid only for roll-up properties.'),
'datatype' => 'string',
),
'sourcePropertyTrackingId' => array(
'type' => 'dimension',
'group' => t('System dimensions'),
'name' => t('Source Property Tracking ID'),
'description' => t('Source property tracking ID of roll-up properties. This is valid only for roll-up properties.'),
'datatype' => 'string',
),
'screenResolution' => array(
'type' => 'dimension',
'group' => t('System dimensions'),
'name' => t('Screen Resolution'),
'description' => t("The screen resolution of user's screens. For example: <code>1024x738</code>."),
'datatype' => 'string',
),
// Social activities dimensions.
'socialActivityEndorsingUrl' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Endorsing URL'),
'description' => t('For a social data hub activity, this value represents the URL of the social activity (e.g. the Google+ post URL, the blog comment URL, etc.).'),
'datatype' => 'string',
),
'socialActivityDisplayName' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Display Name'),
'description' => t('For a social data hub activity, this value represents the title of the social activity posted by the social network user.'),
'datatype' => 'string',
),
'socialActivityPost' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Social Activity Post'),
'description' => t('For a social data hub activity, this value represents the content of the social activity posted by the social network user (e.g. The message content of a Google+ post).'),
'datatype' => 'string',
),
'socialActivityTimestamp' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Social Activity Timestamp'),
'description' => t('For a social data hub activity, this value represents when the social activity occurred on the social network.'),
'datatype' => 'string',
),
'socialActivityUserHandle' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Social Activity Timestamp'),
'description' => t('For a social data hub activity, this value represents when the social activity occurred on the social network.'),
'datatype' => 'string',
),
'socialActivityUserPhotoUrl' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('User Photo URL'),
'description' => t("For a social data hub activity, this value represents the URL of the photo associated with the user's social network profile."),
'datatype' => 'string',
),
'socialActivityUserProfileUrl' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('User Profile URL'),
'description' => t("For a social data hub activity, this value represents the URL of the associated user's social network profile."),
'datatype' => 'string',
),
'socialActivityContentUrl' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Shared URL'),
'description' => t('For a social data hub activity, this value represents the URL shared by the associated social network user.'),
'datatype' => 'string',
),
'socialActivityTagsSummary' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Social Tags Summary'),
'description' => t('For a social data hub activity, this is a comma-separated set of tags associated with the social activity.'),
'datatype' => 'string',
),
'socialActivityAction' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Originating Social Action'),
'description' => t('For a social data hub activity, this value represents the type of social action associated with the activity (e.g. vote, comment, +1, etc.).'),
'datatype' => 'string',
),
'socialActivityNetworkAction' => array(
'type' => 'dimension',
'group' => t('Social activities dimensions'),
'name' => t('Social Network and Action'),
'description' => t('For a social data hub activity, this value represents the type of social action and the social network where the activity originated.'),
'datatype' => 'string',
),
// Social activities metrics.
'socialActivities' => array(
'type' => 'metric',
'group' => t('Social activitie'),
'name' => t('Data Hub Activities'),
'description' => t('The count of activities where a content URL was shared / mentioned on a social data hub partner network.'),
'datatype' => 'integer',
),
// Page tracking dimensions.
'hostname' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Hostname'),
'description' => t('The hostname from which the tracking request was made.'),
'datatype' => 'string',
),
'pagePath' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Page'),
'description' => t('A page on your website specified by path and/or query parameters. Use in conjunction with hostname to get the full URL of the page.'),
'datatype' => 'string',
),
'pagePathLevel1' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Page path level 1'),
'description' => t('This dimension rolls up all the page paths in the first hierarchical level in pagePath.'),
'datatype' => 'string',
),
'pagePathLevel2' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Page path level 2'),
'description' => t('This dimension rolls up all the page paths in the first hierarchical level in pagePath.'),
'datatype' => 'string',
),
'pagePathLevel3' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Page path level 3'),
'description' => t('This dimension rolls up all the page paths in the first hierarchical level in pagePath.'),
'datatype' => 'string',
),
'pagePathLevel4' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Page path level 4'),
'description' => t('This dimension rolls up all the page paths in the first hierarchical level in pagePath.'),
'datatype' => 'string',
),
'pageTitle' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Page Title'),
'description' => t('The title of a page. Keep in mind that multiple pages might have the same page title.'),
'datatype' => 'string',
),
'landingPagePath' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Landing Page'),
'description' => t("The first page in a user's session, or landing pag"),
'datatype' => 'string',
),
'secondPagePath' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Second Page'),
'description' => t("The second page in a user's session."),
'datatype' => 'string',
),
'exitPagePath' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Exit Page'),
'description' => t("The last page in a user's session, or exit page."),
'datatype' => 'string',
),
'previousPagePath' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Previous Page Path'),
'description' => t('A page on your property that was visited before another page on the same property. Typically used with the pagePath dimension.'),
'datatype' => 'string',
),
'nextPagePath' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Next Page Path'),
'description' => t('A page on your website that was visited after another page on your website. Typically used with the previousPagePath dimension.'),
'datatype' => 'string',
),
'pageDepth' => array(
'type' => 'dimension',
'group' => t('Page tracking dimensions'),
'name' => t('Page Depth'),
'description' => t('The number of pages visited by users during a session. The value is a histogram that counts pageviews across a range of possible values. In this calculation, all sessions will have at least one pageview, and some percentage of sessions will have more.'),
'datatype' => 'string',
),
// Page tracking metrics.
'pageValue' => array(
'type' => 'metric',
'group' => t('Page tracking metrics'),
'name' => t('Page Value'),
'description' => t('The average value of this page or set of pages. Page Value is <code>(ga:transactionRevenue + ga:goalValueAll) / ga:uniquePageviews</code> (for the page or set of pages).'),
'datatype' => 'currency',
),
'entrances' => array(
'type' => 'metric',
'group' => t('Page tracking metrics'),
'name' => t('Entrances'),
'description' => t('The number of entrances to your property measured as the first pageview in a session. Typically used with <code>landingPagePath</code>.'),
'datatype' => 'integer',
),
'pageviews' => array(
'type' => 'metric',
'group' => t('Page tracking metrics'),
'name' => t('Pageviews'),
'description' => t('The total number of pageviews for your property.'),
'datatype' => 'integer',
),
'uniquePageviews' => array(
'type' => 'metric',
'group' => t('Page tracking metrics'),
'name' => t('Unique Pageviews'),
'description' => t('The number of different (unique) pages within a session. This takes into account both the pagePath and pageTitle to determine uniqueness.'),
'datatype' => 'integer',
),
'timeOnPage' => array(
'type' => 'metric',
'group' => t('Page tracking metrics'),
'name' => t('Time on Page'),
'description' => t('How long a user spent on a particular page in seconds. Calculated by subtracting the initial view time for a particular page from the initial view time for a subsequent page. Thus, this metric does not apply to exit pages for your property.'),
'datatype' => 'time',
),
'exits' => array(
'type' => 'metric',
'group' => t('Page tracking metrics'),
'name' => t('Exits'),
'description' => t('The number of exits from your property.'),
'datatype' => 'integer',
),
// Page tracking calculated metrics.
'entranceRate' => array(
'type' => 'metric',
'group' => t('Page tracking calculated metrics'),
'name' => t('Entrances / Pageviews'),
'description' => t('The percentage of pageviews in which this page was the entrance.'),
'calculation' => 'ga:entrances / ga:pageviews',
'datatype' => 'percent',
),
'pageviewsPerSession' => array(
'type' => 'metric',
'group' => t('Page tracking calculated metrics'),
'name' => t('Pages / Session'),
'description' => t('The average number of pages viewed during a session on your property. Repeated views of a single page are counted.'),
'calculation' => 'ga:pageviews / ga:sessions',
'datatype' => 'float',
),
'avgTimeOnPage' => array(
'type' => 'metric',
'group' => t('Page tracking calculated metrics'),
'name' => t('Avg. Time on Page'),