Skip to content

Commit b8e8fd4

Browse files
authored
Merge pull request #44 from adjust/v540
Version 5.4.0
2 parents 32e0436 + 7e80ad5 commit b8e8fd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2495
-1098
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"plugins": [
99
"es6-promise",
1010
"@babel/plugin-transform-flow-comments",
11-
"@babel/plugin-transform-runtime"
11+
["@babel/plugin-transform-runtime", {"version": "7.18.10"}]
1212
],
1313
"overrides": [
1414
{

.eslintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
],
5252
"eol-last": "error",
5353
"@typescript-eslint/ban-types": "warn",
54-
"@typescript-eslint/explicit-module-boundary-types": "off"
54+
"@typescript-eslint/explicit-module-boundary-types": "off",
55+
"@typescript-eslint/no-namespace": "warn"
5556
}
5657
},
5758
{

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
### Version 5.3.1 (8st August 2022)
1+
### Version 5.4.0 (20th September 2022)
2+
#### Added
3+
- Added support of Data Residency.
4+
- Added Smart Banner `onCreated` and `onDismissed` optional callbacks. To set callbacks pass them to `initSmartBanner` method.
5+
- Added `showSmartBanner` and `hideSmartBanner` methods to control Smart Banner visibility after initialisation.
6+
7+
8+
#### Fixed
9+
- Fixed issue when Url Strategy ignored SDK config.
10+
11+
---
12+
### Version 5.3.1 (8th August 2022)
213
#### Added
314
- Added sending of `deduplication_id` parameter in `event` package.
415
- Added SRI feature support.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To lazy <a id="loading-snippet">load the Adjust Web SDK through CDN</a> paste th
3737

3838
The Adjust Web SDK should be loaded only once per page and it should be initiated once per page load.
3939

40-
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-5.3.1.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
40+
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-5.4.0.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
4141

4242
You may want to use [Subresource Integrity (SRI)](sri-mdn) feature to mitigate XSS attacks risk. In this case you could use the loading snippet that enables SRI check instructing browser to validate the script before running it:
4343
```html

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.1
1+
5.4.0

dist/INTEGRITY

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sha384-+pCaiYvw8skhJvXi2IbObtUjc5tGhCdevXsPqeJelEVHz0/mKzMnkvQ758kbYM1k
1+
sha384-LI7u4QN3zwrvM7cl2KryLTxj5wtSZqQ8aV6ORY7gm/zm0lQb32ZQb7l7k0oKIxMq

dist/adjust-latest.d.ts

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ declare namespace Adjust {
6868
}
6969

7070
type LogLevel = 'none' | 'error' | 'warning' | 'info' | 'verbose'
71-
71+
7272
interface Attribution {
7373

7474
/** Adjust device identifier */
@@ -116,16 +116,21 @@ declare namespace Adjust {
116116
/** Optional. */
117117
externalDeviceId?: string;
118118

119-
/** Optional. By default all requests go to Adjust's endpoints. You are able to redirect all requests to your custom
120-
* endpoint. */
121-
customUrl?: string;
122-
123119
/** Optional. By default this param is set to `10`. It is possible to override this limit but make sure that it is a
124120
* positive number and not too big. This will cache last `n` deduplication ids (defined by this param) and use them
125121
* to deduplicate events with repeating ids. */
126122
eventDeduplicationListLimit?: number;
127123

128-
/** Optional. */
124+
/** Optional. By default all requests go to Adjust's endpoints. You are able to redirect all requests to your custom
125+
* endpoint. */
126+
customUrl?: string;
127+
128+
/** Optional. The data residency feature allows you to choose the country in which Adjust will store your data. This
129+
* is useful if you are operating in a country with strict privacy requirements. When you set up data residency,
130+
* Adjust will store your data in a data center located in the region your have chosen. */
131+
dataResidency?: 'EU' | 'TR' | 'US';
132+
133+
/** Optional. The Adjust SDK can use the url strategy setting to prioritise regional endpoints. */
129134
urlStrategy?: 'india' | 'china';
130135

131136
/**
@@ -202,7 +207,7 @@ declare namespace Adjust {
202207
* @example
203208
* const attribution = Adjust.getAttribution();
204209
*/
205-
function getAttribution (): Attribution | undefined
210+
function getAttribution(): Attribution | undefined
206211

207212
/**
208213
* Get web_uuid - a unique ID of user generated per subdomain and per browser
@@ -212,7 +217,7 @@ declare namespace Adjust {
212217
* @example
213218
* const webUuid = Adjust.getWebUUID();
214219
*/
215-
function getWebUUID (): string | undefined
220+
function getWebUUID(): string | undefined
216221

217222
/**
218223
* Track event with already initiated Adjust SDK instance
@@ -363,6 +368,17 @@ declare namespace Adjust {
363368
* - `none` - won't print anything
364369
*/
365370
logLevel?: LogLevel;
371+
372+
/** Optional. The data residency feature allows you to choose the country in which Adjust will store your data. This
373+
* is useful if you are operating in a country with strict privacy requirements. When you set up data residency,
374+
* Adjust will store your data in a data center located in the region your have chosen. */
375+
dataResidency?: 'EU' | 'TR' | 'US';
376+
377+
/** Optional. Callback which is called when SmartBanner view is created and shown. */
378+
onCreated?: () => any;
379+
380+
/** Optional. Callback which is called when SmartBanner is being dismissed with a closing button on it. */
381+
onDismissed?: () => any;
366382
}
367383

368384
/**
@@ -377,6 +393,13 @@ declare namespace Adjust {
377393
* webToken: 'YOUR_WEB_TOKEN',
378394
* logLevel: 'verbose'
379395
* });
396+
*
397+
* @example
398+
* Adjust.initSmartBanner({
399+
* webToken: 'YOUR_WEB_TOKEN',
400+
* logLevel: 'error',
401+
* dataResidency: 'EU',
402+
* });
380403
*/
381404
function initSmartBanner(options: SmartBannerOptions): void
382405

0 commit comments

Comments
 (0)