Skip to content

Commit 23bed16

Browse files
committed
track raw user agent string
1 parent ed405af commit 23bed16

14 files changed

+61
-34
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## Unreleased
22

3+
* Track raw user agent string for backend filtering.
4+
35
### 3.0.1 (June 22, 2016)
46

57
* Update README with link to our [Google Tag Manager integration demo app](https://github.com/amplitude/GTM-Web-Demo).

amplitude.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ var AmplitudeClient = function AmplitudeClient(instanceName) {
522522
this._newSession = false;
523523
this._sequenceNumber = 0;
524524
this._sessionId = null;
525+
526+
this._userAgent = (navigator && navigator.userAgent) || null;
525527
};
526528

527529
AmplitudeClient.prototype.Identify = Identify;
@@ -1279,7 +1281,8 @@ AmplitudeClient.prototype._logEvent = function _logEvent(eventType, eventPropert
12791281
version: version
12801282
},
12811283
sequence_number: sequenceNumber, // for ordering events and identifys
1282-
groups: utils.truncate(utils.validateGroups(groups))
1284+
groups: utils.truncate(utils.validateGroups(groups)),
1285+
user_agent: this._userAgent
12831286
// country: null
12841287
};
12851288

amplitude.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

documentation/Amplitude.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,7 +3091,7 @@ <h5>Parameters:</h5>
30913091

30923092
<dt class="tag-source">Source:</dt>
30933093
<dd class="tag-source"><ul class="dummy"><li>
3094-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line837">line 837</a>
3094+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line840">line 840</a>
30953095
</li></ul></dd>
30963096

30973097

@@ -3137,7 +3137,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Amplitude
31373137
<br class="clear">
31383138

31393139
<footer>
3140-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 22 2016 14:19:08 GMT-0700 (PDT)
3140+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Jul 05 2016 14:48:35 GMT-0700 (PDT)
31413141
</footer>
31423142

31433143
<script> prettyPrint(); </script>

documentation/AmplitudeClient.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ <h4 class="name" id="__VERSION__"><span class="type-signature"></span>__VERSION_
185185

186186
<dt class="tag-source">Source:</dt>
187187
<dd class="tag-source"><ul class="dummy"><li>
188-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line1126">line 1126</a>
188+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line1129">line 1129</a>
189189
</li></ul></dd>
190190

191191

@@ -268,7 +268,7 @@ <h4 class="name" id="clearUserProperties"><span class="type-signature"></span>cl
268268

269269
<dt class="tag-source">Source:</dt>
270270
<dd class="tag-source"><ul class="dummy"><li>
271-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line669">line 669</a>
271+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line671">line 671</a>
272272
</li></ul></dd>
273273

274274

@@ -355,7 +355,7 @@ <h4 class="name" id="getSessionId"><span class="type-signature"></span>getSessio
355355

356356
<dt class="tag-source">Source:</dt>
357357
<dd class="tag-source"><ul class="dummy"><li>
358-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line231">line 231</a>
358+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line233">line 233</a>
359359
</li></ul></dd>
360360

361361

@@ -534,7 +534,7 @@ <h5>Parameters:</h5>
534534

535535
<dt class="tag-source">Source:</dt>
536536
<dd class="tag-source"><ul class="dummy"><li>
537-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line705">line 705</a>
537+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line707">line 707</a>
538538
</li></ul></dd>
539539

540540

@@ -742,7 +742,7 @@ <h5>Parameters:</h5>
742742

743743
<dt class="tag-source">Source:</dt>
744744
<dd class="tag-source"><ul class="dummy"><li>
745-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line60">line 60</a>
745+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line62">line 62</a>
746746
</li></ul></dd>
747747

748748

@@ -829,7 +829,7 @@ <h4 class="name" id="isNewSession"><span class="type-signature"></span>isNewSess
829829

830830
<dt class="tag-source">Source:</dt>
831831
<dd class="tag-source"><ul class="dummy"><li>
832-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line222">line 222</a>
832+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line224">line 224</a>
833833
</li></ul></dd>
834834

835835

@@ -1029,7 +1029,7 @@ <h5>Parameters:</h5>
10291029

10301030
<dt class="tag-source">Source:</dt>
10311031
<dd class="tag-source"><ul class="dummy"><li>
1032-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line854">line 854</a>
1032+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line857">line 857</a>
10331033
</li></ul></dd>
10341034

10351035

@@ -1240,7 +1240,7 @@ <h5>Parameters:</h5>
12401240

12411241
<dt class="tag-source">Source:</dt>
12421242
<dd class="tag-source"><ul class="dummy"><li>
1243-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line880">line 880</a>
1243+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line883">line 883</a>
12441244
</li></ul></dd>
12451245

12461246

@@ -1424,7 +1424,7 @@ <h5>Parameters:</h5>
14241424

14251425
<dt class="tag-source">Source:</dt>
14261426
<dd class="tag-source"><ul class="dummy"><li>
1427-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line938">line 938</a>
1427+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line941">line 941</a>
14281428
</li></ul></dd>
14291429

14301430

@@ -1563,7 +1563,7 @@ <h5>Parameters:</h5>
15631563

15641564
<dt class="tag-source">Source:</dt>
15651565
<dd class="tag-source"><ul class="dummy"><li>
1566-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line909">line 909</a>
1566+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line912">line 912</a>
15671567
</li></ul></dd>
15681568

15691569

@@ -1654,7 +1654,7 @@ <h4 class="name" id="regenerateDeviceId"><span class="type-signature"></span>reg
16541654

16551655
<dt class="tag-source">Source:</dt>
16561656
<dd class="tag-source"><ul class="dummy"><li>
1657-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line615">line 615</a>
1657+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line617">line 617</a>
16581658
</li></ul></dd>
16591659

16601660

@@ -1787,7 +1787,7 @@ <h5>Parameters:</h5>
17871787

17881788
<dt class="tag-source">Source:</dt>
17891789
<dd class="tag-source"><ul class="dummy"><li>
1790-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line627">line 627</a>
1790+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line629">line 629</a>
17911791
</li></ul></dd>
17921792

17931793

@@ -1923,7 +1923,7 @@ <h5>Parameters:</h5>
19231923

19241924
<dt class="tag-source">Source:</dt>
19251925
<dd class="tag-source"><ul class="dummy"><li>
1926-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line532">line 532</a>
1926+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line534">line 534</a>
19271927
</li></ul></dd>
19281928

19291929

@@ -2012,7 +2012,7 @@ <h4 class="name" id="setGlobalUserProperties"><span class="type-signature"></spa
20122012

20132013
<dt class="tag-source">Source:</dt>
20142014
<dd class="tag-source"><ul class="dummy"><li>
2015-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line1116">line 1116</a>
2015+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line1119">line 1119</a>
20162016
</li></ul></dd>
20172017

20182018

@@ -2175,7 +2175,7 @@ <h5>Parameters:</h5>
21752175

21762176
<dt class="tag-source">Source:</dt>
21772177
<dd class="tag-source"><ul class="dummy"><li>
2178-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line577">line 577</a>
2178+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line579">line 579</a>
21792179
</li></ul></dd>
21802180

21812181

@@ -2311,7 +2311,7 @@ <h5>Parameters:</h5>
23112311

23122312
<dt class="tag-source">Source:</dt>
23132313
<dd class="tag-source"><ul class="dummy"><li>
2314-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line595">line 595</a>
2314+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line597">line 597</a>
23152315
</li></ul></dd>
23162316

23172317

@@ -2442,7 +2442,7 @@ <h5>Parameters:</h5>
24422442

24432443
<dt class="tag-source">Source:</dt>
24442444
<dd class="tag-source"><ul class="dummy"><li>
2445-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line555">line 555</a>
2445+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line557">line 557</a>
24462446
</li></ul></dd>
24472447

24482448

@@ -2602,7 +2602,7 @@ <h5>Parameters:</h5>
26022602

26032603
<dt class="tag-source">Source:</dt>
26042604
<dd class="tag-source"><ul class="dummy"><li>
2605-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line650">line 650</a>
2605+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line652">line 652</a>
26062606
</li></ul></dd>
26072607

26082608

@@ -2738,7 +2738,7 @@ <h5>Parameters:</h5>
27382738

27392739
<dt class="tag-source">Source:</dt>
27402740
<dd class="tag-source"><ul class="dummy"><li>
2741-
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line740">line 740</a>
2741+
<a href="amplitude-client.js.html">amplitude-client.js</a>, <a href="amplitude-client.js.html#line742">line 742</a>
27422742
</li></ul></dd>
27432743

27442744

@@ -2791,7 +2791,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Amplitude
27912791
<br class="clear">
27922792

27932793
<footer>
2794-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 22 2016 14:19:08 GMT-0700 (PDT)
2794+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Jul 05 2016 14:48:35 GMT-0700 (PDT)
27952795
</footer>
27962796

27972797
<script> prettyPrint(); </script>

documentation/Identify.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Amplitude
12951295
<br class="clear">
12961296

12971297
<footer>
1298-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 22 2016 14:19:08 GMT-0700 (PDT)
1298+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Jul 05 2016 14:48:35 GMT-0700 (PDT)
12991299
</footer>
13001300

13011301
<script> prettyPrint(); </script>

documentation/Revenue.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Amplitude
965965
<br class="clear">
966966

967967
<footer>
968-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 22 2016 14:19:08 GMT-0700 (PDT)
968+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Jul 05 2016 14:48:35 GMT-0700 (PDT)
969969
</footer>
970970

971971
<script> prettyPrint(); </script>

documentation/amplitude-client.js.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ <h1 class="page-title">Source: amplitude-client.js</h1>
6969
this._newSession = false;
7070
this._sequenceNumber = 0;
7171
this._sessionId = null;
72+
73+
this._userAgent = (navigator &amp;&amp; navigator.userAgent) || null;
7274
};
7375

7476
AmplitudeClient.prototype.Identify = Identify;
@@ -826,7 +828,8 @@ <h1 class="page-title">Source: amplitude-client.js</h1>
826828
version: version
827829
},
828830
sequence_number: sequenceNumber, // for ordering events and identifys
829-
groups: utils.truncate(utils.validateGroups(groups))
831+
groups: utils.truncate(utils.validateGroups(groups)),
832+
user_agent: this._userAgent
830833
// country: null
831834
};
832835

@@ -1170,7 +1173,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Amplitude
11701173
<br class="clear">
11711174

11721175
<footer>
1173-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 22 2016 14:19:08 GMT-0700 (PDT)
1176+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Jul 05 2016 14:48:35 GMT-0700 (PDT)
11741177
</footer>
11751178

11761179
<script> prettyPrint(); </script>

documentation/amplitude.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Amplitude
409409
<br class="clear">
410410

411411
<footer>
412-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 22 2016 14:19:08 GMT-0700 (PDT)
412+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Jul 05 2016 14:48:35 GMT-0700 (PDT)
413413
</footer>
414414

415415
<script> prettyPrint(); </script>

documentation/identify.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Amplitude
226226
<br class="clear">
227227

228228
<footer>
229-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Wed Jun 22 2016 14:19:08 GMT-0700 (PDT)
229+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Tue Jul 05 2016 14:48:35 GMT-0700 (PDT)
230230
</footer>
231231

232232
<script> prettyPrint(); </script>

0 commit comments

Comments
 (0)