Skip to content

Commit 7515f56

Browse files
committed
Import GoogleAnalyticsV4 source from unitypackage
1 parent 6e1cdf5 commit 7515f56

21 files changed

+3064
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
Copyright 2014 Google Inc. All rights reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
using UnityEngine;
18+
19+
public class AdvertiserOptInAttribute : PropertyAttribute {
20+
public AdvertiserOptInAttribute() {
21+
}
22+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
Copyright 2014 Google Inc. All rights reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
using UnityEngine;
18+
19+
/*
20+
Ranged Tooltip attribute for displaying properties with range and
21+
a tooltip in the inspector.
22+
*/
23+
public class RangedTooltipAttribute : PropertyAttribute {
24+
public readonly float min;
25+
public readonly float max;
26+
public readonly string text;
27+
28+
public RangedTooltipAttribute(string text, float min, float max) {
29+
this.text = text;
30+
this.min = min;
31+
this.max = max;
32+
}
33+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
Copyright 2014 Google Inc. All rights reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
using UnityEngine;
18+
19+
/*
20+
Tooltip attribute for displaying Tooltips in the inspector.
21+
*/
22+
public class TooltipAttribute : PropertyAttribute {
23+
public readonly string text;
24+
25+
public TooltipAttribute(string text) {
26+
this.text = text;
27+
}
28+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
Copyright 2014 Google Inc. All rights reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
public class Field {
18+
19+
private readonly string parameter;
20+
21+
public Field(string parameter){
22+
this.parameter = parameter;
23+
}
24+
25+
public override string ToString(){
26+
return parameter;
27+
}
28+
29+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
Copyright 2014 Google Inc. All rights reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
using UnityEngine;
18+
using System.Collections;
19+
20+
/*
21+
Available fields to use with SetOnTracker(Field fieldName, object value)
22+
*/
23+
public class Fields {
24+
25+
//General
26+
public readonly static Field ANONYMIZE_IP = new Field("&aip");
27+
public readonly static Field HIT_TYPE = new Field("&t");
28+
public readonly static Field SESSION_CONTROL = new Field("&sc");
29+
30+
public readonly static Field SCREEN_NAME = new Field("&cd");
31+
public readonly static Field LOCATION = new Field("&dl");
32+
public readonly static Field REFERRER = new Field("&dr");
33+
public readonly static Field PAGE = new Field("&dp");
34+
public readonly static Field HOSTNAME = new Field("&dh");
35+
public readonly static Field TITLE = new Field("&dt");
36+
public readonly static Field LANGUAGE = new Field("&ul");
37+
public readonly static Field ENCODING = new Field("&de");
38+
39+
// System
40+
public readonly static Field SCREEN_COLORS = new Field("&sd");
41+
public readonly static Field SCREEN_RESOLUTION = new Field("&sr");
42+
public readonly static Field VIEWPORT_SIZE = new Field("&vp");
43+
44+
// Application
45+
public readonly static Field APP_NAME = new Field("&an");
46+
public readonly static Field APP_ID = new Field("&aid");
47+
public readonly static Field APP_INSTALLER_ID = new Field("&aiid");
48+
public readonly static Field APP_VERSION = new Field("&av");
49+
50+
// Visitor
51+
public readonly static Field CLIENT_ID = new Field("&cid");
52+
public readonly static Field USER_ID = new Field("&uid");
53+
54+
// Campaign related fields; used in all hits.
55+
public readonly static Field CAMPAIGN_NAME = new Field("&cn");
56+
public readonly static Field CAMPAIGN_SOURCE = new Field("&cs");
57+
public readonly static Field CAMPAIGN_MEDIUM = new Field("&cm");
58+
public readonly static Field CAMPAIGN_KEYWORD = new Field("&ck");
59+
public readonly static Field CAMPAIGN_CONTENT = new Field("&cc");
60+
public readonly static Field CAMPAIGN_ID = new Field("&ci");
61+
// Autopopulated campaign fields
62+
public readonly static Field GCLID = new Field("&gclid");
63+
public readonly static Field DCLID = new Field("&dclid");
64+
65+
66+
// Event Hit (&t=event)
67+
public readonly static Field EVENT_CATEGORY = new Field("&ec");
68+
public readonly static Field EVENT_ACTION = new Field("&ea");
69+
public readonly static Field EVENT_LABEL = new Field("&el");
70+
public readonly static Field EVENT_VALUE = new Field("&ev");
71+
72+
// Social Hit (&t=social)
73+
public readonly static Field SOCIAL_NETWORK = new Field("&sn");
74+
public readonly static Field SOCIAL_ACTION = new Field("&sa");
75+
public readonly static Field SOCIAL_TARGET = new Field("&st");
76+
77+
// Timing Hit (&t=timing)
78+
public readonly static Field TIMING_VAR = new Field("&utv");
79+
public readonly static Field TIMING_VALUE = new Field("&utt");
80+
public readonly static Field TIMING_CATEGORY = new Field("&utc");
81+
public readonly static Field TIMING_LABEL = new Field("&utl");
82+
83+
84+
// Exception Hit (&t=exception)
85+
public readonly static Field EX_DESCRIPTION = new Field("&exd");
86+
public readonly static Field EX_FATAL = new Field("&exf");
87+
88+
// Ecommerce (&t=transaction / &t=item)
89+
public readonly static Field CURRENCY_CODE = new Field("&cu");
90+
public readonly static Field TRANSACTION_ID = new Field("&ti");
91+
public readonly static Field TRANSACTION_AFFILIATION = new Field("&ta");
92+
public readonly static Field TRANSACTION_SHIPPING = new Field("&ts");
93+
public readonly static Field TRANSACTION_TAX = new Field("&tt");
94+
public readonly static Field TRANSACTION_REVENUE = new Field("&tr");
95+
public readonly static Field ITEM_SKU = new Field("&ic");
96+
public readonly static Field ITEM_NAME = new Field("&in");
97+
public readonly static Field ITEM_CATEGORY = new Field("&iv");
98+
public readonly static Field ITEM_PRICE = new Field("&ip");
99+
public readonly static Field ITEM_QUANTITY = new Field("&iq");
100+
101+
// General Configuration
102+
public readonly static Field TRACKING_ID = new Field("&tid");
103+
public readonly static Field SAMPLE_RATE = new Field("&sf");
104+
public readonly static Field DEVELOPER_ID = new Field("&did");
105+
106+
public readonly static Field CUSTOM_METRIC = new Field("&cm");
107+
public readonly static Field CUSTOM_DIMENSION = new Field("&cd");
108+
109+
// Advertiser Id Fields
110+
public readonly static Field ADID = new Field("&adid");
111+
public readonly static Field IDFA = new Field("&idfa");
112+
public readonly static Field ATE = new Field("&ate");
113+
}

0 commit comments

Comments
 (0)