Skip to content

Commit

Permalink
Merge pull request #44 from adjust/v540
Browse files Browse the repository at this point in the history
Version 5.4.0
  • Loading branch information
YaraMatkova authored Sep 20, 2022
2 parents 32e0436 + 7e80ad5 commit b8e8fd4
Show file tree
Hide file tree
Showing 56 changed files with 2,495 additions and 1,098 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"plugins": [
"es6-promise",
"@babel/plugin-transform-flow-comments",
"@babel/plugin-transform-runtime"
["@babel/plugin-transform-runtime", {"version": "7.18.10"}]
],
"overrides": [
{
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
],
"eol-last": "error",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off"
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-namespace": "warn"
}
},
{
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
### Version 5.3.1 (8st August 2022)
### Version 5.4.0 (20th September 2022)
#### Added
- Added support of Data Residency.
- Added Smart Banner `onCreated` and `onDismissed` optional callbacks. To set callbacks pass them to `initSmartBanner` method.
- Added `showSmartBanner` and `hideSmartBanner` methods to control Smart Banner visibility after initialisation.


#### Fixed
- Fixed issue when Url Strategy ignored SDK config.

---
### Version 5.3.1 (8th August 2022)
#### Added
- Added sending of `deduplication_id` parameter in `event` package.
- Added SRI feature support.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To lazy <a id="loading-snippet">load the Adjust Web SDK through CDN</a> paste th

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

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.
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.

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:
```html
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.1
5.4.0
2 changes: 1 addition & 1 deletion dist/INTEGRITY
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sha384-+pCaiYvw8skhJvXi2IbObtUjc5tGhCdevXsPqeJelEVHz0/mKzMnkvQ758kbYM1k
sha384-LI7u4QN3zwrvM7cl2KryLTxj5wtSZqQ8aV6ORY7gm/zm0lQb32ZQb7l7k0oKIxMq
39 changes: 31 additions & 8 deletions dist/adjust-latest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ declare namespace Adjust {
}

type LogLevel = 'none' | 'error' | 'warning' | 'info' | 'verbose'

interface Attribution {

/** Adjust device identifier */
Expand Down Expand Up @@ -116,16 +116,21 @@ declare namespace Adjust {
/** Optional. */
externalDeviceId?: string;

/** Optional. By default all requests go to Adjust's endpoints. You are able to redirect all requests to your custom
* endpoint. */
customUrl?: string;

/** Optional. By default this param is set to `10`. It is possible to override this limit but make sure that it is a
* positive number and not too big. This will cache last `n` deduplication ids (defined by this param) and use them
* to deduplicate events with repeating ids. */
eventDeduplicationListLimit?: number;

/** Optional. */
/** Optional. By default all requests go to Adjust's endpoints. You are able to redirect all requests to your custom
* endpoint. */
customUrl?: string;

/** Optional. The data residency feature allows you to choose the country in which Adjust will store your data. This
* is useful if you are operating in a country with strict privacy requirements. When you set up data residency,
* Adjust will store your data in a data center located in the region your have chosen. */
dataResidency?: 'EU' | 'TR' | 'US';

/** Optional. The Adjust SDK can use the url strategy setting to prioritise regional endpoints. */
urlStrategy?: 'india' | 'china';

/**
Expand Down Expand Up @@ -202,7 +207,7 @@ declare namespace Adjust {
* @example
* const attribution = Adjust.getAttribution();
*/
function getAttribution (): Attribution | undefined
function getAttribution(): Attribution | undefined

/**
* Get web_uuid - a unique ID of user generated per subdomain and per browser
Expand All @@ -212,7 +217,7 @@ declare namespace Adjust {
* @example
* const webUuid = Adjust.getWebUUID();
*/
function getWebUUID (): string | undefined
function getWebUUID(): string | undefined

/**
* Track event with already initiated Adjust SDK instance
Expand Down Expand Up @@ -363,6 +368,17 @@ declare namespace Adjust {
* - `none` - won't print anything
*/
logLevel?: LogLevel;

/** Optional. The data residency feature allows you to choose the country in which Adjust will store your data. This
* is useful if you are operating in a country with strict privacy requirements. When you set up data residency,
* Adjust will store your data in a data center located in the region your have chosen. */
dataResidency?: 'EU' | 'TR' | 'US';

/** Optional. Callback which is called when SmartBanner view is created and shown. */
onCreated?: () => any;

/** Optional. Callback which is called when SmartBanner is being dismissed with a closing button on it. */
onDismissed?: () => any;
}

/**
Expand All @@ -377,6 +393,13 @@ declare namespace Adjust {
* webToken: 'YOUR_WEB_TOKEN',
* logLevel: 'verbose'
* });
*
* @example
* Adjust.initSmartBanner({
* webToken: 'YOUR_WEB_TOKEN',
* logLevel: 'error',
* dataResidency: 'EU',
* });
*/
function initSmartBanner(options: SmartBannerOptions): void

Expand Down
Loading

0 comments on commit b8e8fd4

Please sign in to comment.