-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcampaign-data.html
201 lines (176 loc) · 7.43 KB
/
campaign-data.html
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
<!DOCTYPE html>
<html>
<head>
<!-- <meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.deep_orange-indigo.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>-->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script>
(function(w, d, s, g, js, fs) {
g = w.gapi || (w.gapi = {});
g.analytics = {
q: [],
ready: function(f) {
this.q.push(f);
}
};
js = d.createElement(s);
fs = d.getElementsByTagName(s)[0];
js.src = 'https://apis.google.com/js/platform.js';
fs.parentNode.insertBefore(js, fs);
js.onload = function() {
g.load('analytics');
};
}(window, document, 'script'));
</script>
<style type="text/css">
/* .dcs-a-dcs-o.dcs-a-dcs-zb{
position: 20px;
z-index: 20;
} */
.dcs-a-dcs-fb.dcs-a-dcs-fb-dcs-qd {
position: 20px;
z-index: 10;
}
/*.dcs-a-dcs-fb.dcs-a-dcs-fb-dcs-qd {
position: 20px;
z-index: 10;
}*/
#view-selector-container {
position: 20px;
/* z-index: 50; */
}
input{
position: 20px;
/* z-index: -1; */
}
#chart-container{
padding-right: 10px;
padding-left: 10px;
}
.hide {
display: none;
}
</style>
</head>
<body>
<script src="ga-code.js"></script>
<br>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Easy Campaign Reporter</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
</div>
<!--/.nav-collapse -->
</div>
</nav>
<br>
<div class="container">
<div class="starter-template">
<h1>Easily Pull Campaign Data</h1>
<p class="lead">Use this tool to pull specific data for your campaigns. Created by Nico Miceli, GDE for Google Analtyics with the Embed API. Read more about this tool on <a href="#">my post here</a>.<br> </p>
<h2>How to use this tool:</h2><br>
<p class="lead">
<b>1.</b> If you haven't already, authenticate with the orange analtyics button. If you don't see it, you're probably already logged in.
<br>
<b>2.</b> Pick the right view from the dropdowns below.
<br>
<b>3.</b> Enter the start and end date of the data you want pulled. <mark>Make sure it is entered in the following form: YYYY-MM-DD</mark>.
<br>
<b>4.</b> Enter <mark>1 metric</mark> that you want pulled such as <code>ga:sessions</code>, <code>ga:goal1Completions</code>, <code>ga:pageviews</code>. <br>
<b>5.</b> Enter <mark>1 time related dimension</mark> such as <code>ga:date</code>, <code>ga:week</code>, or <code>ga:month</code>.
<br>
</p>
</div>
<br>
<div id="embed-api-auth-container"></div>
<div id="view-selector-container"></div>
<br>
<div>
<br>
<div id="error" >
<div class="alert alert-danger" role="alert">
<div id="error-msg"></div>
</div>
</div>
<div id="results"></div>
<div class="row">
<div class="col-lg-4">
<label for="date-range"></label>
<div class="input-group">
<span class="input-group-addon" id="basic-addon3">Start Date</span>
<input type="text" class="form-control" id="start" aria-describedby="basic-addon3" placeholder="YYYY-MM-DD">
</div>
</div>
<!--end col lg 4 -->
<div class="col-lg-4">
<label for="date-range"></label>
<div class="input-group">
<span class="input-group-addon" id="basic-addon3">End Date</span>
<input type="text" class="form-control" id="end" aria-describedby="basic-addon3" placeholder="YYYY-MM-DD">
</div>
</div>
<!--end col lg 4 -->
</div>
<!--end row-->
<div class="row" id="dim-met">
<div class="col-lg-4">
<label for="metrics"></label>
<div class="input-group">
<span class="input-group-addon" id="basic-addon3">Metric</span>
<input type="text" class="form-control" id="metric" aria-describedby="basic-addon3" placeholder="ga:session OR ga:goal#Completions">
</div>
</div>
<!--end col lg 4 -->
<div class="col-lg-4">
<label for="dim"></label>
<div class="input-group">
<span class="input-group-addon" id="basic-addon3">Dimension</span>
<input type="text" class="form-control" id="dim" aria-describedby="basic-addon3" placeholder="ga:date OR ga:week OR ga:month">
</div>
</div>
</div>
<!--end col lg 4 -->
</div>
<!-- end row -->
<br>
<div class="row">
<div class="col-lg-8">
<div class="input-group input-group-lg">
<span class="input-group-btn">
<button class="btn btn-default" type="button" id="get-data">Pull Data!</button>
</span>
<input type="text" class="form-control" id="campaign" placeholder="Enter UTM Campaign Name Here">
</div>
<!-- /input-group -->
</div>
<!-- /.col-lg-6 -->
</div><br>
<button type="button" id="autofill"class="btn btn-default btn-lg">
auto fill
</button>
<br>
<br>
<div id="result-text" >
</div>
<br>
<div id="chart-container"></div>
</div>
<!-- end container -->
</body>
</html>