UNPKG

24.5 kBMarkdownView Raw
1# Acceptable parameters
2
3
4## Protocol Version
5
6Pass as: `protocolVersion` or `v`
7
8Required for all hit types.The Protocol version. The current value is '1'. This will only change when there are changes made that are not backwards compatible.
9
10
11## Tracking ID / Web Property ID
12
13Pass as: `trackingId` or `webPropertyId` or `tid`
14
15Required for all hit types.The tracking ID / web property ID. The format is UA-XXXX-Y. All collected data is associated by this ID.
16
17
18## Anonymize IP
19
20Pass as: `anonymizeIp` or `aip`
21
22Optional. When present, the IP address of the sender will be anonymized. For example, the IP will be anonymized if any of the following parameters are present in the payload: &aip=, &aip=0, or &aip=1
23
24
25## Data Source
26Pass as: `dataSource` or `ds`
27
28Optional. Indicates the data source of the hit. Hits sent from analytics.js will have data source set to 'web'; hits sent from one of the mobile SDKs will have data source set to 'app'.
29
30## Queue Time
31
32Pass as: `queueTime` or `qt`
33
34Optional. Used to collect offline / latent hits. The value represents the time delta (in milliseconds) between when the hit being reported occurred and the time the hit was sent. The value must be greater than or equal to 0. Values greater than four hours may lead to hits not being processed.
35
36
37## Cache Buster
38
39Pass as: `cacheBuster` or `z`
40
41Optional. Used to send a random number in GET requests to ensure browsers and proxies don't cache hits. It should be sent as the final parameter of the request since we've seen some 3rd party internet filtering software add additional parameters to HTTP requests incorrectly. This value is not used in reporting.
42
43
44## Client ID
45
46Pass as: `clientId` or `cid`
47
48Required for all hit types.This anonymously identifies a particular user, device, or browser instance. For the web, this is generally stored as a first-party cookie with a two-year expiration. For mobile apps, this is randomly generated for each particular instance of an application install. The value of this field should be a random UUID (version 4) as described in http://www.ietf.org/rfc/rfc4122.txt
49
50
51## User ID
52
53Pass as: `userId` or `uid`
54
55Optional. This is intended to be a known identifier for a user provided by the site owner/tracking library user. It may not itself be PII. The value should never be persisted in GA cookies or other Analytics provided storage.
56
57
58## Session Control
59
60Pass as: `sessionControl` or `sc`
61
62Optional. Used to control the session duration. A value of 'start' forces a new session to start with this hit and 'end' forces the current session to end with this hit. All other values are ignored.
63
64
65## IP Override
66
67Pass as: `ipOverride` or `uip`
68
69Optional. The IP address of the user. This should be a valid IP address. It will always be anonymized just as though &aip (anonymize IP) had been used.
70
71
72## User Agent Override
73
74Pass as: `userAgentOverride` or `ua`
75
76Optional. The User Agent of the browser. Note that Google has libraries to identify real user agents. Hand crafting your own agent could break at any time.
77
78
79## Geographical Override
80
81Pass as: `geoid`
82
83Optional. The geographical location of the user. The geographical ID should be a two letter country code or a criteria ID representing a city or region (see http://developers.google.com/analytics/devguides/collection/protocol/v1/geoid). This parameter takes precedent over any location derived from IP address, including the IP Override parameter. An invalid code will result in geographical dimensions to be set to '(not set)'.
84
85## Document Referrer
86
87Pass as: `documentReferrer` or `dr`
88
89Optional. Specifies which referral source brought traffic to a website. This value is also used to compute the traffic source. The format of this value is a URL.
90
91
92## Campaign Name
93
94Pass as: `campaignName` or `cn`
95
96Optional. Specifies the campaign name.
97
98
99## Campaign Source
100
101Pass as: `campaignSource` or `cs`
102
103Optional. Specifies the campaign source.
104
105
106## Campaign Medium
107
108Pass as: `campaignMedium` or `cm`
109
110Optional. Specifies the campaign medium.
111
112
113## Campaign Keyword
114
115Pass as: `campaignKeyword` or `ck`
116
117Optional. Specifies the campaign keyword.
118
119
120## Campaign Content
121
122Pass as: `campaignContent` or `cc`
123
124Optional. Specifies the campaign content.
125
126
127## Campaign ID
128
129Pass as: `campaignId` or `ci`
130
131Optional. Specifies the campaign ID.
132
133
134## Google AdWords ID
135
136Pass as: `googleAdwordsId` or `gclid`
137
138Optional. Specifies the Google AdWords Id.
139
140
141## Google Display Ads ID
142
143Pass as: `googleDisplayAdsId` or `dclid`
144
145Optional. Specifies the Google Display Ads Id.
146
147
148## Screen Resolution
149
150Pass as: `screenResolution` or `sr`
151
152Optional. Specifies the screen resolution.
153
154
155## Viewport size
156
157Pass as: `viewportSize` or `vp`
158
159Optional. Specifies the viewable area of the browser / device.
160
161
162## Document Encoding
163
164Pass as: `documentEncoding` or `de`
165
166Optional. Specifies the character set used to encode the page / document.
167
168
169## Screen Colors
170
171Pass as: `screenColors` or `sd`
172
173Optional. Specifies the screen color depth.
174
175
176## User Language
177
178Pass as: `userLanguage` or `ul`
179
180Optional. Specifies the language.
181
182
183## Java Enabled
184
185Pass as: `javaEnabled` or `je`
186
187Optional. Specifies whether Java was enabled.
188
189
190## Flash Version
191
192Pass as: `flashVersion` or `fl`
193
194Optional. Specifies the flash version.
195
196
197## Hit type
198
199Pass as: `hitType` or `t`
200
201Required for all hit types.The type of hit. Must be one of 'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', 'timing'.
202
203
204## Non-Interaction Hit
205
206Pass as: `non-interactionHit` or `ni`
207
208Optional. Specifies that a hit be considered non-interactive.
209
210
211## Document location URL
212
213Pass as: `documentLocationUrl` or `dl`
214
215Optional. Use this parameter to send the full URL (document location) of the page on which content resides. You can use the &dh and &dp parameters to override the hostname and path + query portions of the document location, accordingly. The JavaScript clients determine this parameter using the concatenation of the document.location.origin + document.location.pathname + document.location.search browser parameters. Be sure to remove any user authentication or other private information from the URL if present.
216
217
218## Document Host Name
219
220Pass as: `documentHostName` or `dh`
221
222Optional. Specifies the hostname from which content was hosted.
223
224
225## Document Path
226
227Pass as: `documentPath` or `dp`
228
229Optional. The path portion of the page URL. Should begin with '/'.
230
231
232## Document Title
233
234Pass as: `documentTitle` or `dt`
235
236Optional. The title of the page / document.
237
238
239## Screen Name
240
241Pass as: `screenName` or `cd`
242
243Optional. If not specified, this will default to the unique URL of the page by either using the &dl parameter as-is or assembling it from &dh and &dp. App tracking makes use of this for the 'Screen Name' of the screenview hit.
244
245
246## Link ID
247
248Pass as: `linkId` or `linkid`
249
250Optional. The ID of a clicked DOM element, used to disambiguate multiple links to the same URL in In-Page Analytics reports when Enhanced Link Attribution is enabled for the property.
251
252
253## Application Name
254
255Pass as: `applicationName` or `an`
256
257Optional. Specifies the application name.
258
259
260## Application ID
261
262Pass as: `applicationId` or `aid`
263
264Optional. Application identifier.
265
266
267## Application Version
268
269Pass as: `applicationVersion` or `av`
270
271Optional. Specifies the application version.
272
273
274## Application Installer ID
275
276Pass as: `applicationInstallerId` or `aiid`
277
278Optional. Application installer identifier.
279
280
281## Event Category
282
283Pass as: `eventCategory` or `ec`
284
285Optional. Specifies the event category. Must not be empty.
286
287
288## Event Action
289
290Pass as: `eventAction` or `ea`
291
292Optional. Specifies the event action. Must not be empty.
293
294
295## Event Label
296
297Pass as: `eventLabel` or `el`
298
299Optional. Specifies the event label.
300
301
302## Event Value
303
304Pass as: `eventValue` or `ev`
305
306Optional. Specifies the event value. Values must be non-negative.
307
308
309## Transaction ID
310
311Pass as: `transactionId` or `ti`
312
313Required for transaction hit type.Required for item hit type.A unique identifier for the transaction. This value should be the same for both the Transaction hit and Items hits associated to the particular transaction.
314
315
316## Transaction Affiliation
317
318Pass as: `transactionAffiliation` or `ta`
319
320Optional. Specifies the affiliation or store name.
321
322
323## Transaction Revenue
324
325Pass as: `transactionRevenue` or `tr`
326
327Optional. Specifies the total revenue associated with the transaction. This value should include any shipping or tax costs.
328
329
330## Transaction Shipping
331
332Pass as: `transactionShipping` or `ts`
333
334Optional. Specifies the total shipping cost of the transaction.
335
336
337## Transaction Tax
338
339Pass as: `transactionTax` or `tt`
340
341Optional. Specifies the total tax of the transaction.
342
343
344## Item Name
345
346Pass as: `itemName` or `in`
347
348Required for item hit type.Specifies the item name.
349
350
351## Item Price
352
353Pass as: `itemPrice` or `ip`
354
355Optional. Specifies the price for a single item / unit.
356
357
358## Item Quantity
359
360Pass as: `itemQuantity` or `iq`
361
362Optional. Specifies the number of items purchased.
363
364
365## Item Code
366
367Pass as: `itemCode` or `ic`
368
369Optional. Specifies the SKU or item code.
370
371
372## Item Category
373
374Pass as: `itemCategory` or `iv`
375
376Optional. Specifies the category that the item belongs to.
377
378
379## Currency Code
380
381Pass as: `currencyCode` or `cu`
382
383Optional. When present indicates the local currency for all transaction currency values. Value should be a valid ISO 4217 currency code.
384
385
386## Social Network
387
388Pass as: `socialNetwork` or `sn`
389
390Required for social hit type.Specifies the social network, for example Facebook or Google Plus.
391
392
393## Social Action
394
395Pass as: `socialAction` or `sa`
396
397Required for social hit type.Specifies the social interaction action. For example on Google Plus when a user clicks the +1 button, the social action is 'plus'.
398
399
400## Social Action Target
401
402Pass as: `socialActionTarget` or `st`
403
404Required for social hit type.Specifies the target of a social interaction. This value is typically a URL but can be any text.
405
406
407## User timing category
408
409Pass as: `userTimingCategory` or `utc`
410
411Optional. Specifies the user timing category.
412
413
414## User timing variable name
415
416Pass as: `userTimingVariableName` or `utv`
417
418Optional. Specifies the user timing variable.
419
420
421## User timing time
422
423Pass as: `userTimingTime` or `utt`
424
425Optional. Specifies the user timing value. The value is in milliseconds.
426
427
428## User timing label
429
430Pass as: `userTimingLabel` or `utl`
431
432Optional. Specifies the user timing label.
433
434
435## Page Load Time
436
437Pass as: `pageLoadTime` or `plt`
438
439Optional. Specifies the time it took for a page to load. The value is in milliseconds.
440
441
442## DNS Time
443
444Pass as: `dnsTime` or `dns`
445
446Optional. Specifies the time it took to do a DNS lookup. The value is in milliseconds.
447
448
449## Page Download Time
450
451Pass as: `pageDownloadTime` or `pdt`
452
453Optional. Specifies the time it took for the page to be downloaded. The value is in milliseconds.
454
455
456## Redirect Response Time
457
458Pass as: `redirectResponseTime` or `rrt`
459
460Optional. Specifies the time it took for any redirects to happen. The value is in milliseconds.
461
462
463## TCP Connect Time
464
465Pass as: `tcpConnectTime` or `tcp`
466
467Optional. Specifies the time it took for a TCP connection to be made. The value is in milliseconds.
468
469
470## Server Response Time
471
472Pass as: `serverResponseTime` or `srt`
473
474Optional. Specifies the time it took for the server to respond after the connect time. The value is in milliseconds.
475
476## DOM Interactive Time
477
478Pass as: `domInteractiveTime` or `dit`
479
480Optional. Specifies the time it took for Document.readyState to be 'interactive'. The value is in milliseconds.
481
482## Content Load Time
483
484Pass as: `contentLoadTime` or `clt`
485
486Optional. Specifies the time it took for the DOMContentLoaded Event to fire. The value is in milliseconds.
487
488## Exception Description
489
490Pass as: `exceptionDescription` or `exd`
491
492Optional. Specifies the description of an exception.
493
494
495## Is Exception Fatal?
496
497Pass as: `isExceptionFatal` or `exf`
498
499Optional. Specifies whether the exception was fatal.
500
501
502## Custom Dimension
503
504Pass as: `cd[1-9][0-9]*`
505
506Optional. Each custom dimension has an associated index. There is a maximum of 20 custom dimensions (200 for Premium accounts). The name suffix must be a positive integer between 1 and 200, inclusive.
507
508
509## Custom Metric
510
511Pass as: `cm[1-9][0-9]*`
512
513Optional. Each custom metric has an associated index. There is a maximum of 20 custom metrics (200 for Premium accounts). The name suffix must be a positive integer between 1 and 200, inclusive.
514
515
516## Content Group
517
518Pass as: `cg(10|[0-9])`
519
520Optional. Up to 10 content groups are possible.
521
522
523## Experiment ID
524
525Pass as: `experimentId` or `xid`
526
527Optional. This parameter specifies that this user has been exposed to an experiment with the given ID. It should be sent in conjunction with the Experiment Variant parameter.
528
529
530## Experiment Variant
531
532Pass as: `experimentVariant` or `xvar`
533
534Optional. This parameter specifies that this user has been exposed to a particular variation of an experiment. It should be sent in conjunction with the Experiment ID parameter.
535
536## Enhanced e-commerce
537
538To use enhanced e-commerce you must explicitly enable it in Google Analytics admin. Some parameters overlap with regular e-commerce tracking (`ti`, `ta`, `tr`, `tt`, `ts`),
539however item tracking is different.
540
541You may generate enhanced e-commerce using the [`gampee`](https://www.npmjs.com/package/gampee) module.
542
543### Product SKU
544
545Pass as: `pr[0-9]{1,3}id`
546
547Optional. The SKU of the product. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
548
549### Product Name
550
551Pass as: `pr[0-9]{1,3}nm`
552
553Optional. The name of the product. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
554
555### Product Brand
556
557Pass as: `pr[0-9]{1,3}br`
558
559Optional. The brand associated with the product. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
560
561### Product Category
562
563Pass as: `pr[0-9]{1,3}ca`
564
565Optional. The category to which the product belongs. Product index must be a positive integer between 1 and 200, inclusive. The product category parameter can be hierarchical. Use / as a delimiter to specify up to 5-levels of hierarchy. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
566
567### Product Variant
568
569Pass as: `pr[0-9]{1,3}va`
570
571Optional. The variant of the product. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
572
573### Product Price
574
575Pass as: `pr[0-9]{1,3}pr`
576
577Optional. The price of a product. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
578
579### Product Quantity
580
581Pass as: `pr[0-9]{1,3}qt`
582
583Optional. The quantity of a product. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
584
585### Product Coupon Code
586
587Pass as: `pr[0-9]{1,3}cc`
588
589Optional. The coupon code associated with a product. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
590
591### Product Position
592
593Pass as: `pr[0-9]{1,3}ps`
594
595Optional. The product's position in a list or collection. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
596
597### Product Custom Dimension
598
599Pass as: `pr[0-9]{1,3}cd[0-9]{1,3}`
600
601Optional. A product-level custom dimension where dimension index is a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
602
603### Product Custom Metric
604
605Pass as: `pr[0-9]{1,3}cm[0-9]{1,3}`
606
607Optional. A product-level custom metric where metric index is a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
608
609### Product Action
610
611Pass as: `pa`
612
613Optional. The role of the products included in a hit. If a product action is not specified, all product definitions included with the hit will be ignored. Must be one of: detail, click, add, remove, checkout, checkout_option, purchase, refund. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
614
615### Transaction ID
616
617Pass as: `ti`
618
619Optional. The transaction ID. This is an additional parameter that can be sent when Product Action is set to 'purchase' or 'refund'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
620
621### Affiliation
622
623Pass as: `ta`
624
625Optional. The store or affiliation from which this transaction occurred. This is an additional parameter that can be sent when Product Action is set to 'purchase' or 'refund'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
626
627### Revenue
628
629Pass as: `tr`
630
631Optional. The total value of the transaction, including tax and shipping. If not sent, this value will be automatically calculated using the product quantity and price fields of all products in the same hit. This is an additional parameter that can be sent when Product Action is set to 'purchase' or 'refund'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
632
633### Tax
634
635Pass as: `tt`
636
637Optional. The total tax associated with the transaction. This is an additional parameter that can be sent when Product Action is set to 'purchase' or 'refund'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
638
639### Shipping
640
641Pass as: `ts`
642
643Optional. The shipping cost associated with the transaction. This is an additional parameter that can be sent when Product Action is set to 'purchase' or 'refund'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
644
645### Coupon Code
646
647Pass as: `tcc`
648
649Optional. The transaction coupon redeemed with the transaction. This is an additional parameter that can be sent when Product Action is set to 'purchase' or 'refund'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
650
651### Product Action List
652
653Pass as: `pal`
654
655Optional. The list or collection from which a product action occurred. This is an additional parameter that can be sent when Product Action is set to 'detail' or 'click'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
656
657### Checkout Step
658
659Pass as: `cos`
660
661Optional. The step number in a checkout funnel. This is an additional parameter that can be sent when Product Action is set to 'checkout'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
662
663### Checkout Step Option
664
665Pass as: `col`
666
667Optional. Additional information about a checkout step. This is an additional parameter that can be sent when Product Action is set to 'checkout'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
668
669### Product Impression List Name
670
671Pass as: `il[0-9]{1,3}nm`
672
673Optional. The list or collection to which a product belongs. Impression List index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
674
675### Product Impression SKU
676
677Pass as: `il[0-9]{1,3}pi[0-9]{1,3}id`
678
679Optional. The product ID or SKU. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
680
681### Product Impression Name
682
683Pass as: `il[0-9]{1,3}pi[0-9]{1,3}nm`
684
685Optional. The name of the product. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
686
687### Product Impression Brand
688
689Pass as: `il[0-9]{1,3}pi[0-9]{1,3}br`
690
691Optional. The brand associated with the product. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
692
693### Product Impression Category
694
695Pass as: `il[0-9]{1,3}pi[0-9]{1,3}ca`
696
697Optional. The category to which the product belongs. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
698
699### Product Impression Variant
700
701Pass as: `il[0-9]{1,3}pi[0-9]{1,3}va`
702
703Optional. The variant of the product. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
704
705### Product Impression Position
706
707Pass as: `il[0-9]{1,3}pi[0-9]{1,3}ps`
708
709Optional. The product's position in a list or collection. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
710
711### Product Impression Price
712
713Pass as: `il[0-9]{1,3}pi[0-9]{1,3}pr`
714
715Optional. The price of a product. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
716
717### Product Impression Custom Dimension
718
719Pass as: `il[0-9]{1,3}pi[0-9]{1,3}cd[0-9]{1,3}`
720
721Optional. A product-level custom dimension where dimension index is a positive integer between 1 and 200, inclusive. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
722
723### Product Impression Custom Metric
724
725Pass as: `il[0-9]{1,3}pi[0-9]{1,3}cm[0-9]{1,3}`
726
727Optional. A product-level custom metric where metric index is a positive integer between 1 and 200, inclusive. Impression List index must be a positive integer between 1 and 200, inclusive. Product index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
728
729### Promotion ID
730
731Pass as: `promo[0-9]{1,3}id`
732
733Optional. The promotion ID. Promotion index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
734
735### Promotion Name
736
737Pass as: `promo[0-9]{1,3}nm`
738
739Optional. The name of the promotion. Promotion index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
740
741### Promotion Creative
742
743Pass as: `promo[0-9]{1,3}cr`
744
745Optional. The creative associated with the promotion. Promotion index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
746
747### Promotion Position
748
749Pass as: `promo[0-9]{1,3}ps`
750
751Optional. The position of the creative. Promotion index must be a positive integer between 1 and 200, inclusive. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.
752
753### Promotion Action
754
755Pass as: `promoa`
756
757Optional. Specifies the role of the promotions included in a hit. If a promotion action is not specified, the default promotion action, 'view', is assumed. To measure a user click on a promotion set this to 'promo_click'. For analytics.js the Enhanced Ecommerce plugin must be installed before using this field.