Skip to content

Commit ccd6f40

Browse files
Update consent string param
1 parent 79b813a commit ccd6f40

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

react-native-userreport-sdk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const fireTrackingPixel = async (trackingCode, consentString) => {
115115
+ `&osv=${encodeURIComponent(systemVersion)}`
116116
+ `&dn=${encodeURIComponent(deviceName)}`
117117
+ `&dr=${encodeURIComponent(deviceResolution)}`
118-
+ (consentString ? `&iab_consent=${encodeURIComponent(consentString)}` : '');
118+
+ (consentString ? `&gdpr_consent=${encodeURIComponent(consentString)}` : '');
119119

120120
const url = path + params;
121121
debugInfo(`Firing tracking pixel ${url}`);

test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ test('regular mode', async () => {
103103
+ '&osv=__DeviceInfoSystemVersion__'
104104
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
105105
+ '&dr=150x300'
106-
+ '&iab_consent=__FetchConsent__');
106+
+ '&gdpr_consent=__FetchConsent__');
107107

108108
expect(fetch).toHaveBeenNthCalledWith(3,
109109
'https://visitanalytics.userreport.com/hit.gif'
@@ -116,7 +116,7 @@ test('regular mode', async () => {
116116
+ '&osv=__DeviceInfoSystemVersion__'
117117
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
118118
+ '&dr=150x300'
119-
+ '&iab_consent=__FetchConsent__');
119+
+ '&gdpr_consent=__FetchConsent__');
120120
});
121121

122122
test('legacy idfa', async () => {
@@ -138,7 +138,7 @@ test('legacy idfa', async () => {
138138
+ '&osv=__DeviceInfoSystemVersion__'
139139
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
140140
+ '&dr=150x300'
141-
+ '&iab_consent=__FetchConsent__');
141+
+ '&gdpr_consent=__FetchConsent__');
142142
});
143143

144144
test('dnt mode', async () => {
@@ -166,7 +166,7 @@ test('dnt mode', async () => {
166166
+ '&osv=__DeviceInfoSystemVersion__'
167167
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
168168
+ '&dr=150x300'
169-
+ '&iab_consent=__FetchConsent__');
169+
+ '&gdpr_consent=__FetchConsent__');
170170

171171
expect(fetch).toHaveBeenNthCalledWith(3,
172172
'https://visitanalytics.dnt-userreport.com/hit.gif'
@@ -177,5 +177,5 @@ test('dnt mode', async () => {
177177
+ '&osv=__DeviceInfoSystemVersion__'
178178
+ '&dn=__DeviceInfoBrand__%20__DeviceInfoDeviceId__'
179179
+ '&dr=150x300'
180-
+ '&iab_consent=__FetchConsent__');
180+
+ '&gdpr_consent=__FetchConsent__');
181181
});

0 commit comments

Comments
 (0)