You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,8 @@
1
1
## Unreleased
2
2
3
+
* Add option to track GCLID (Google Click ID) as a user property (set `includeGclid` to `true` in the SDK configuration).
4
+
* Add option to track new UTM parameters, referrer, and GCLID values during the same session. By default the SDK only saves the values once at the start of the session. You can remove this restriction by setting `saveParamsReferrerOncePerSession` to `false` in the SDK configuration. See the [Readme](https://github.com/amplitude/Amplitude-Javascript#tracking-utm-parameters-referrer-and-gclid) for more information.
5
+
3
6
### 3.2.0 (October 7, 2016)
4
7
5
8
* Block event property and user property dictionaries that have more than 1000 items. This is to block properties that are set unintentionally (for example in a loop). A single call to `logEvent` should not have more than 1000 event properties. Similarly a single call to `setUserProperties` should not have more than 1000 user properties.
| eventUploadPeriodMillis | number | Amount of time in milliseconds that the SDK waits before uploading events if`batchEvents` is `true`. |30\*1000 (30 sec) |
331
331
| eventUploadThreshold | number | Minimum number of events to batch together per request if`batchEvents` is `true`. |30|
332
332
| forceHttps | boolean | If `true`, the events will always be uploaded to HTTPSendpoint. Otherwise it will use the embedding site's protocol. | `false` |
333
+
| includeGclid | boolean | If `true`, captures the `gclid` url parameter as well as the user's `initial_gclid` via a set once operation. |`false`|
333
334
| includeReferrer | boolean | If `true`, captures the `referrer` and `referring_domain`for each session, as well as the user's `initial_referrer` and `initial_referring_domain` via a set once operation. | `false` |
334
335
| includeUtm | boolean | If `true`, finds utm parameters in the query string or the __utmz cookie, parses, and includes them as user propeties on all events uploaded. Also captures initial utm parameters for each session via a set once operation. | `false` |
335
336
| language | string | Custom language to set | Language determined by browser |
336
337
| optOut | boolean | Whether to disable tracking for the current user | `false` |
337
338
| platform | string | Custom platform to set | 'Web' |
338
339
| saveEvents | boolean | If `true`, saves events to localStorage and removes them upon successful upload.<br><i>NOTE:</i> Without saving events, events may be lost if the user navigates to another page before events are uploaded. | `true` |
339
340
| savedMaxCount | number | Maximum number of events to save in localStorage. If more events are logged while offline, old events are removed. | 1000 |
341
+
| saveParamsReferrerOncePerSession | boolean | If `true` then `includeGclid`, `includeReferrer`, and `includeUtm` will only track their respective properties once per session. New values that come in during the middle of the user's session will be ignored. Set to `false` to always capture newvalues.|`true`|
340
342
| sessionTimeout | number | Time between logged events before a newsession starts in milliseconds |30\*60\*1000 (30 min) |
341
343
| uploadBatchSize | number | Maximum number of events to send to the server per request. |100|
342
344
343
345
# Advanced #
344
346
This SDK automatically grabs useful data about the browser, including browser type and operating system version.
345
347
348
+
### Tracking UTM Parameters, Referrer, and GCLID ###
349
+
350
+
Amplitude supports automatically tracking:
351
+
* Standard UTM parameters from the user's cookie or URL parameters, just set configuration option `includeUtm` to `true` during initialization.
352
+
* The referring URL, just set configuration option `includeReferrer` to `true` during initialization.
353
+
* GCLID (Google Click ID) from URL params, just set configuration option `includeGclid` to `true` during initialization.
354
+
355
+
If tracking is enabled, then the SDK will set the values as user properties, for example `referrer` or `utm_source`, once per session (this is last touch). The SDK will also save the initial values using a `setOnce` operation, for example `initial_referrer` or `initial_utm_source`, and once set that value will never change (this is first touch).
356
+
357
+
**Note:** By default the SDK will only save the values at the start of the session. For example if a user lands on your site with an initial set of UTM parameters, triggers some flow that causes them to land on your site again with a different set of UTM parameters within the same Amplitude session, that second set will not be saved. You can set configuration option `saveParamsReferrerOncePerSession` to `false` to remove that restriction, so the SDK will always capture any new values from the user.
358
+
346
359
### Setting Groups ###
347
360
348
361
Amplitude supports assigning users to groups, and performing queries such as Count by Distinct on those groups. An example would be if you want to group your users based on what organization they are in by using an orgId. You can designate Joe to be in orgId 10, while Sue is in orgId 15. When performing an event segmentation query, you can then select Count by Distinct orgIds to query the number of different orgIds that have performed a specific event. As long as at least one member of that group has performed the specific event, that group will be included in the count. See our help article on [Count By Distinct](https://amplitude.zendesk.com/hc/en-us/articles/218824237) for more information.
0 commit comments