File tree Expand file tree Collapse file tree 4 files changed +24
-0
lines changed
Expand file tree Collapse file tree 4 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4+ 8.4.0
5+ ------------------
6+
7+ * Added the input ` /device/tracking_token ` . This is the token generated by
8+ the [ Device Tracking Add-on] ( https://dev.maxmind.com/minfraud/track-devices )
9+ for explicit device linking. You may provide this by providing
10+ ` trackingToken ` to ` Device ` .
11+
4128.3.0 (2026-01-20)
513------------------
614
Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ try {
179179 transaction = new minFraud.Transaction ({
180180 device: new minFraud.Device ({
181181 ipAddress: " 81.2.69.160" ,
182+ trackingToken: " abc123" ,
182183 }),
183184 event : new minFraud.Event ({
184185 party: minFraud .Constants .EventParty .Customer ,
Original file line number Diff line number Diff line change @@ -27,4 +27,12 @@ describe('Device()', () => {
2727 } ) ;
2828 } ) . not . toThrow ( ) ;
2929 } ) ;
30+
31+ it ( 'sets trackingToken correctly' , ( ) => {
32+ const device = new Device ( {
33+ ipAddress : '1.1.1.1' ,
34+ trackingToken : 'abc123' ,
35+ } ) ;
36+ expect ( device . trackingToken ) . toBe ( 'abc123' ) ;
37+ } ) ;
3038} ) ;
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ interface DeviceProps {
2626 * identifies a visitor's session on the site.
2727 */
2828 sessionId ?: string ;
29+ /**
30+ * The tracking token from the Device Tracking Add-on for explicit device
31+ * linking.
32+ */
33+ trackingToken ?: string ;
2934}
3035
3136/**
@@ -42,6 +47,8 @@ export default class Device implements DeviceProps {
4247 public sessionAge ?: number ;
4348 /** @inheritDoc DeviceProps.sessionId */
4449 public sessionId ?: string ;
50+ /** @inheritDoc DeviceProps.trackingToken */
51+ public trackingToken ?: string ;
4552
4653 public constructor ( device : DeviceProps ) {
4754 if ( device . ipAddress != null && isIP ( device . ipAddress ) === 0 ) {
You can’t perform that action at this time.
0 commit comments