Debian Codegraph @

contrib/externs/google_analytics_api.js

raw symbols SCIP
1 /*
2 * Copyright 2010 The Closure Compiler Authors.
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 /**
18 * @fileoverview Externs for the Google Analytics API.
19 * @see http://code.google.com/intl/en/apis/analytics/docs/gaJS/gaJSApi.html
20 * @externs
21 */
22
23 var _gat = {};
24
25 /**
26 * @param {string=} opt_account
27 * @param {string=} opt_name
28 * @return {_ga_tracker}
29 */
30 _gat._createTracker = function(opt_account, opt_name) {};
31
32 /**
33 * @param {string=} opt_name
34 * @return {_ga_tracker}
35 */
36 _gat._getTrackerByName = function(opt_name) {};
37
38 /**
39 * @return {undefined}
40 */
41 _gat._anonymizeIp = function() {};
42
43 var _gaq = {};
44
45 /**
46 * @see http://code.google.com/apis/analytics/docs/gaJS/gaJSApi_gaq.html#_gaq.push
47 * @param {...(function()|Array.<Object>)} commandArray
48 * @return {number}
49 */
50 _gaq.push = function(commandArray) {};
51
52 /**
53 * @interface
54 */
55 var _ga_tracker = function() {};
56
57 /**
58 * @param {string} newIgnoredOrganicKeyword
59 * @return {undefined}
60 */
61 _ga_tracker.prototype._addIgnoredOrganic =
62 function(newIgnoredOrganicKeyword) {};
63
64 /**
65 * @param {string} newIgnoredReferrer
66 * @return {undefined}
67 */
68 _ga_tracker.prototype._addIgnoredRef = function(newIgnoredReferrer) {};
69
70 /**
71 * @param {string} orderId
72 * @param {string} sku
73 * @param {string} name
74 * @param {string} category
75 * @param {string} price
76 * @param {string} quantity
77 * @return {undefined}
78 */
79 _ga_tracker.prototype._addItem = function(orderId, sku, name, category, price,
80 quantity) {};
81
82 /**
83 * @param {string} newOrganicEngine
84 * @param {string} newOrganicKeyword
85 * @param {boolean=} opt_prepend
86 * @return {undefined}
87 */
88 _ga_tracker.prototype._addOrganic = function(newOrganicEngine,
89 newOrganicKeyword, opt_prepend) {};
90
91 /**
92 * The docs here (http://goo.gl/HUdY) say that the return type is
93 * `_gat.GA_EComm_.Transactions_`, but that type is never defined.
94 * @param {string} orderId
95 * @param {string} affiliation
96 * @param {string} total
97 * @param {string=} opt_tax
98 * @param {string=} opt_shipping
99 * @param {string=} opt_city
100 * @param {string=} opt_state
101 * @param {string=} opt_country
102 * @return {Object}
103 */
104 _ga_tracker.prototype._addTrans = function(orderId, affiliation, total,
105 opt_tax, opt_shipping, opt_city, opt_state, opt_country) {};
106
107 /**
108 * @return {undefined}
109 */
110 _ga_tracker.prototype._clearIgnoredOrganic = function() {};
111
112 /**
113 * @return {undefined}
114 */
115 _ga_tracker.prototype._clearIgnoredRef = function() {};
116
117 /**
118 * @return {undefined}
119 */
120 _ga_tracker.prototype._clearOrganic = function() {};
121
122 /**
123 * @param {string} newPath
124 * @return {undefined}
125 */
126 _ga_tracker.prototype._cookiePathCopy = function(newPath) {};
127
128 /**
129 * @param {number} index
130 * @return {undefined}
131 */
132 _ga_tracker.prototype._deleteCustomVar = function(index) {};
133
134 /**
135 * @return {string}
136 */
137 _ga_tracker.prototype._getName = function() {};
138
139 /**
140 * @return {undefined}
141 */
142 _ga_tracker.prototype._setAccount = function() {};
143
144 /**
145 * @return {string}
146 */
147 _ga_tracker.prototype._getAccount = function() {};
148
149 /**
150 * @return {boolean}
151 */
152 _ga_tracker.prototype._getClientInfo = function() {};
153
154 /**
155 * @return {boolean}
156 */
157 _ga_tracker.prototype._getDetectFlash = function() {};
158
159 /**
160 * @return {boolean}
161 */
162 _ga_tracker.prototype._getDetectTitle = function() {};
163
164 /**
165 * @param {string} targetUrl
166 * @param {boolean=} opt_useHash
167 * @return {string}
168 */
169 _ga_tracker.prototype._getLinkerUrl = function(targetUrl, opt_useHash) {};
170
171 /**
172 * @return {string}
173 */
174 _ga_tracker.prototype._getLocalGifPath = function() {};
175
176 /**
177 * @return {number}
178 */
179 _ga_tracker.prototype._getServiceMode = function() {};
180
181 /**
182 * @return {string}
183 */
184 _ga_tracker.prototype._getVersion = function() {};
185
186 /**
187 * @param {number} index
188 * @return {string|undefined}
189 */
190 _ga_tracker.prototype._getVisitorCustomVar = function(index) {};
191
192 // docs wrong
193 /**
194 * @param {string} targetUrl
195 * @param {boolean=} opt_useHash
196 * @return {undefined}
197 */
198 _ga_tracker.prototype._link = function(targetUrl, opt_useHash) {};
199
200 // docs wrong
201 /**
202 * @param {HTMLFormElement} formObject
203 * @param {boolean=} opt_useHash
204 * @return {undefined}
205 */
206 _ga_tracker.prototype._linkByPost = function(formObject, opt_useHash) {};
207
208 /**
209 * @param {boolean} enable
210 * @return {undefined}
211 */
212 _ga_tracker.prototype._setAllowAnchor = function(enable) {};
213
214 /**
215 * @param {boolean} enable
216 * @return {undefined}
217 */
218 _ga_tracker.prototype._setAllowHash = function(enable) {};
219
220 /**
221 * @param {boolean} enable
222 * @return {undefined}
223 */
224 _ga_tracker.prototype._setAllowLinker = function(enable) {};
225
226 /**
227 * @param {string} newCampContentKey
228 * @return {undefined}
229 */
230 _ga_tracker.prototype._setCampContentKey = function(newCampContentKey) {};
231
232 /**
233 * @param {string} newCampMedKey
234 * @return {undefined}
235 */
236 _ga_tracker.prototype._setCampMediumKey = function(newCampMedKey) {};
237
238 /**
239 * @param {string} newCampNameKey
240 * @return {undefined}
241 */
242 _ga_tracker.prototype._setCampNameKey = function(newCampNameKey) {};
243
244 /**
245 * @param {string} newCampNOKey
246 * @return {undefined}
247 */
248 _ga_tracker.prototype._setCampNOKey = function(newCampNOKey) {};
249
250 /**
251 * @param {string} newCampSrcKey
252 * @return {undefined}
253 */
254 _ga_tracker.prototype._setCampSourceKey = function(newCampSrcKey) {};
255
256 /**
257 * @param {string} newCampTermKey
258 * @return {undefined}
259 */
260 _ga_tracker.prototype._setCampTermKey = function(newCampTermKey) {};
261
262 /**
263 * @param {number} cookieTimeoutMillis
264 * @return {undefined}
265 */
266 _ga_tracker.prototype._setCampaignCookieTimeout = function(cookieTimeoutMillis)
267 {};
268
269 /**
270 * @param {boolean} enable
271 * @return {undefined}
272 */
273 _ga_tracker.prototype._setCampaignTrack = function(enable) {};
274
275 /**
276 * @param {boolean} enable
277 * @return {undefined}
278 */
279 _ga_tracker.prototype._setClientInfo = function(enable) {};
280
281 /**
282 * @param {string} newCookiePath
283 * @return {undefined}
284 */
285 _ga_tracker.prototype._setCookiePath = function(newCookiePath) {};
286
287 /**
288 * @param {number} index
289 * @param {string} name
290 * @param {string} value
291 * @param {number=} opt_scope
292 * @return {boolean}
293 */
294 _ga_tracker.prototype._setCustomVar = function(index, name, value, opt_scope)
295 {};
296
297 /**
298 * @param {boolean} enable
299 * @return {undefined}
300 */
301 _ga_tracker.prototype._setDetectFlash = function(enable) {};
302
303 /**
304 * @param {boolean} enable
305 * @return {undefined}
306 */
307 _ga_tracker.prototype._setDetectTitle = function(enable) {};
308
309 /**
310 * @param {string} newDomainName
311 * @return {undefined}
312 */
313 _ga_tracker.prototype._setDomainName = function(newDomainName) {};
314
315 /**
316 * @param {string} newLocalGifPath
317 * @return {undefined}
318 */
319 _ga_tracker.prototype._setLocalGifPath = function(newLocalGifPath) {};
320
321 /**
322 * @return {undefined}
323 */
324 _ga_tracker.prototype._setLocalRemoteServerMode = function() {};
325
326 /**
327 * @return {undefined}
328 */
329 _ga_tracker.prototype._setLocalServerMode = function() {};
330
331 /**
332 * @param {string} newReferrerUrl
333 * @return {undefined}
334 */
335 _ga_tracker.prototype._setReferrerOverride = function(newReferrerUrl) {};
336
337 /**
338 * @return {undefined}
339 */
340 _ga_tracker.prototype._setRemoteServerMode = function() {};
341
342 /**
343 * @param {string} newRate
344 * @return {undefined}
345 */
346 _ga_tracker.prototype._setSampleRate = function(newRate) {};
347
348 /**
349 * @param {number} cookieTimeoutMillis
350 * @return {undefined}
351 */
352 _ga_tracker.prototype._setSessionCookieTimeout = function(cookieTimeoutMillis)
353 {};
354
355 /**
356 * @param {number} cookieTimeoutMillis
357 * @return {undefined}
358 */
359 _ga_tracker.prototype._setVisitorCookieTimeout = function(cookieTimeoutMillis)
360 {};
361
362 /**
363 * @param {string} category
364 * @param {string} action
365 * @param {string=} opt_label
366 * @param {number=} opt_value
367 * @param {boolean=} opt_noninteraction
368 * @return {undefined}
369 */
370 _ga_tracker.prototype._trackEvent = function(category, action, opt_label,
371 opt_value, opt_noninteraction) {};
372
373 /**
374 * @param {string=} opt_pageUrl
375 * @return {undefined}
376 */
377 _ga_tracker.prototype._trackPageview = function(opt_pageUrl) {};
378
379 /**
380 * @return {undefined}
381 */
382 _ga_tracker.prototype._trackTrans = function() {};
383
384 /* deprecated methods below */
385
386 /**
387 * @param {string} account
388 * @return {_ga_tracker}
389 * @deprecated
390 */
391 _gat._getTracker = function(account) {};
392
393 /**
394 * @param {string} accountId
395 * @param {string=} opt_name
396 * @return {_ga_tracker}
397 * @deprecated
398 */
399 _gaq._createAsyncTracker = function(accountId, opt_name) {};
400
401 /**
402 * @param {string=} opt_name
403 * @return {_ga_tracker}
404 * @deprecated
405 */
406 _gaq._getAsyncTracker = function(opt_name) {};
407
408 /**
409 * @return {undefined}
410 * @deprecated
411 */
412 _ga_tracker.prototype._initData = function() {};
413
414 /**
415 * @param {number} milliseconds
416 * @return {undefined}
417 * @deprecated
418 */
419 _ga_tracker.prototype._setCookiePersistence = function(milliseconds) {};
420
421 /**
422 * @param {number} newDefaultTimeout
423 * @return {undefined}
424 * @deprecated
425 */
426 _ga_tracker.prototype._setCookieTimeout = function(newDefaultTimeout) {};
427
428 /**
429 * @param {number} newTimeout
430 * @return {undefined}
431 * @deprecated
432 */
433 _ga_tracker.prototype._setSessionTimeout = function(newTimeout) {};
434
435 /**
436 * @param {string} newVal
437 * @return {undefined}
438 * @deprecated
439 */
440 _ga_tracker.prototype._setVar = function(newVal) {};