Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pull release/3.31.0-SDK-2229 into main #1830

Merged
merged 15 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,7 @@ The JavaScript SDK lets you track customer event data from your website and send

### Using CDN

To integrate the JavaScript SDK with your website, place the following code snippet in the `<head>` section of your website.

```javascript
<script type="text/javascript">
!function(){"use strict";window.RudderSnippetVersion="3.0.10";var e="rudderanalytics";window[e]||(window[e]=[])
;var t=window[e];if(Array.isArray(t)){if(true===t.snippetExecuted&&window.console&&console.error){
console.error("RudderStack JavaScript SDK snippet included more than once.")}else{t.snippetExecuted=true,
window.rudderAnalyticsBuildType="legacy";var sdkBaseUrl="https://cdn.rudderlabs.com/v3";var sdkName="rsa.min.js"
;var r="async"
;var n=["setDefaultInstanceKey","load","ready","page","track","identify","alias","group","reset","setAnonymousId","startSession","endSession","consent"]
;for(var i=0;i<n.length;i++){var d=n[i];t[d]=function(r){return function(){var n
;Array.isArray(window[e])?t.push([r].concat(Array.prototype.slice.call(arguments))):null===(n=window[e][r])||void 0===n||n.apply(window[e],arguments)
}}(d)}try{new Function('return import("")'),window.rudderAnalyticsBuildType="modern"}catch(c){}
var o=document.head||document.getElementsByTagName("head")[0]
;var a=document.body||document.getElementsByTagName("body")[0];window.rudderAnalyticsAddScript=function(e,t,n){
var i=document.createElement("script");i.src=e,i.setAttribute("data-loader","RS_JS_SDK"),t&&n&&i.setAttribute(t,n),
"async"===r?i.async=true:"defer"===r&&(i.defer=true),o?o.insertBefore(i,o.firstChild):a.insertBefore(i,a.firstChild)},
window.rudderAnalyticsMount=function(){
"undefined"==typeof globalThis&&(Object.defineProperty(Object.prototype,"__globalThis_magic__",{get:function get(){
return this},configurable:true}),__globalThis_magic__.globalThis=__globalThis_magic__,
delete Object.prototype.__globalThis_magic__),
window.rudderAnalyticsAddScript("".concat(sdkBaseUrl,"/").concat(window.rudderAnalyticsBuildType,"/").concat(sdkName),"data-rsa-write-key",<WRITE_KEY>)
},
"undefined"==typeof Promise||"undefined"==typeof globalThis?window.rudderAnalyticsAddScript("https://polyfill-fastly.io/v3/polyfill.min.js?version=3.111.0&features=Symbol%2CPromise&callback=rudderAnalyticsMount"):window.rudderAnalyticsMount()
;t.load(<WRITE_KEY>,<DATA_PLANE_URL>,{})}}}();
</script>
```

<br>

> The above snippet lets you integrate the SDK with your website and load it asynchronously to avoid impacting the performance of your webpages.
See [CDN installation](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/quickstart/#using-cdn) for detailed steps.

To load SDK script on to your page synchronously, see the [**JavaScript SDK documentation**](https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-javascript-sdk/installation/#synchronous-loading).

Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-monorepo",
"version": "3.30.0",
"version": "3.31.0",
"private": true,
"description": "Monorepo for RudderStack Analytics JS SDK",
"workspaces": [
Expand Down
7 changes: 7 additions & 0 deletions packages/analytics-js-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.9.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-08-16)


### Features

* onboarded XPixel Integration ([#1783](https://github.com/rudderlabs/rudder-sdk-js/issues/1783)) ([cf9b8cc](https://github.com/rudderlabs/rudder-sdk-js/commit/cf9b8cc41de341be781fae3108e4a07f2b553dda))

## [3.8.1](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-08-02)


Expand Down
7 changes: 3 additions & 4 deletions packages/analytics-js-common/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
## [3.8.1](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].0...@rudderstack/analytics-js-common@3.8.1) (2024-08-02)
## [3.9.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].1...@rudderstack/analytics-js-common@3.9.0) (2024-08-16)


### Bug Fixes
### Features

* error filtering of non-errors ([#1811](https://github.com/rudderlabs/rudder-sdk-js/issues/1811)) ([7b83e16](https://github.com/rudderlabs/rudder-sdk-js/commit/7b83e1661b1e0ce0b6b5ae45d3a2e08db97ddcb3))
* npm sanity suites ([#1810](https://github.com/rudderlabs/rudder-sdk-js/issues/1810)) ([22e43da](https://github.com/rudderlabs/rudder-sdk-js/commit/22e43da01f750a5cb23a2fce50de3744c54a197e))
* onboarded XPixel Integration ([#1783](https://github.com/rudderlabs/rudder-sdk-js/issues/1783)) ([cf9b8cc](https://github.com/rudderlabs/rudder-sdk-js/commit/cf9b8cc41de341be781fae3108e4a07f2b553dda))

2 changes: 1 addition & 1 deletion packages/analytics-js-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-common",
"version": "3.8.1",
"version": "3.9.0",
"private": true,
"description": "RudderStack JavaScript SDK common code",
"module": "dist/npm/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js-common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/analytics-js-common@3.8.1",
"title": "@rudderstack/analytics-js-common@3.8.1",
"discussion-category": "@rudderstack/analytics-js-common@3.8.1",
"tag": "@rudderstack/analytics-js-common@3.9.0",
"title": "@rudderstack/analytics-js-common@3.9.0",
"discussion-category": "@rudderstack/analytics-js-common@3.9.0",
"notesFile": "./packages/analytics-js-common/CHANGELOG_LATEST.md"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
const DIR_NAME = 'XPixel';
const NAME = 'XPIXEL';
const DISPLAY_NAME = 'XPixel';

Check warning on line 3 in packages/analytics-js-common/src/constants/integrations/XPixel/constants.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-common/src/constants/integrations/XPixel/constants.js#L1-L3

Added lines #L1 - L3 were not covered by tests

const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME };
const CNameMapping = {

Check warning on line 6 in packages/analytics-js-common/src/constants/integrations/XPixel/constants.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-common/src/constants/integrations/XPixel/constants.js#L5-L6

Added lines #L5 - L6 were not covered by tests
[NAME]: NAME,
XPIXEL: NAME,
XPixel: NAME,
Xpixel: NAME,
xpixel: NAME,
xPixel: NAME,
};

const trackPropertyMapping = [

Check warning on line 15 in packages/analytics-js-common/src/constants/integrations/XPixel/constants.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-common/src/constants/integrations/XPixel/constants.js#L15

Added line #L15 was not covered by tests
{
destKey: 'event_id',
sourceKeys: ['properties.eventId', 'properties.event_id', 'messageId'],
},
{
destKey: 'status',
sourceKeys: 'properties.status',
},
{
destKey: 'currency',
sourceKeys: 'properties.currency',
},
{
destKey: 'value',
sourceKeys: 'properties.value',
},
{
destKey: 'search_string',
sourceKeys: ['properties.search_string', 'properties.searchString'],
},
{
destKey: 'description',
sourceKeys: 'properties.description',
},
{
destKey: 'conversion_id',
sourceKeys: ['properties.conversion_id', 'properties.conversionId'],
},
{
destKey: 'twclid',
sourceKeys: 'properties.twclid',
},
{
destKey: 'contents',
sourceKeys: 'properties.contents',
},
];

export {
NAME,
CNameMapping,
DISPLAY_NAME_TO_DIR_NAME_MAP,
DISPLAY_NAME,
DIR_NAME,
trackPropertyMapping,

Check warning on line 60 in packages/analytics-js-common/src/constants/integrations/XPixel/constants.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-common/src/constants/integrations/XPixel/constants.js#L55-L60

Added lines #L55 - L60 were not covered by tests
};
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ const clientToServerNames = {
SPOTIFYPIXEL: 'Spotify Pixel',
COMMANDBAR: 'CommandBar',
NINETAILED: 'Ninetailed',
XPIXEL: 'XPixel',
};

export { clientToServerNames };
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const configToIntNames = {
SPOTIFYPIXEL: 'SpotifyPixel',
COMMANDBAR: 'CommandBar',
NINETAILED: 'Ninetailed',
XPIXEL: 'XPixel',
};

export { configToIntNames };
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
import { CNameMapping as SpotifyPixel } from './SpotifyPixel/constants';
import { CNameMapping as CommandBar } from './CommandBar/constants';
import { CNameMapping as Ninetailed } from './Ninetailed/constants';

import { CNameMapping as XPixel } from './XPixel/constants';

Check warning on line 80 in packages/analytics-js-common/src/constants/integrations/integration_cname.js

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-common/src/constants/integrations/integration_cname.js#L80

Added line #L80 was not covered by tests
// for sdk side native integration identification
// add a mapping from common names to index.js exported key names as identified by Rudder
const commonNames = {
Expand Down Expand Up @@ -161,6 +161,7 @@
...ActiveCampaign,
...Sprig,
...SpotifyPixel,
...XPixel,
};

export { commonNames };
5 changes: 5 additions & 0 deletions packages/analytics-js-cookies/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [0.3.6](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-08-16)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.9.0`
## [0.3.5](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-08-02)

### Dependency Updates
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics-js-cookies/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [0.3.5](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].4...@rudderstack/[email protected].5) (2024-08-02)
## [0.3.6](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].5...@rudderstack/[email protected].6) (2024-08-16)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.8.1`
* `@rudderstack/analytics-js-common` updated to version `3.9.0`
2 changes: 1 addition & 1 deletion packages/analytics-js-cookies/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-cookies",
"version": "0.3.5",
"version": "0.3.6",
"description": "RudderStack JavaScript SDK Cookies Utilities",
"main": "dist/npm/modern/cjs/index.cjs",
"module": "dist/npm/modern/esm/index.mjs",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js-cookies/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/[email protected].5",
"title": "@rudderstack/[email protected].5",
"discussion-category": "@rudderstack/[email protected].5",
"tag": "@rudderstack/[email protected].6",
"title": "@rudderstack/[email protected].6",
"discussion-category": "@rudderstack/[email protected].6",
"notesFile": "./packages/analytics-js-cookies/CHANGELOG_LATEST.md"
}
}
Expand Down
10 changes: 10 additions & 0 deletions packages/analytics-js-integrations/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.8.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-08-16)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.9.0`

### Features

* onboarded XPixel Integration ([#1783](https://github.com/rudderlabs/rudder-sdk-js/issues/1783)) ([cf9b8cc](https://github.com/rudderlabs/rudder-sdk-js/commit/cf9b8cc41de341be781fae3108e4a07f2b553dda))

## [3.7.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-08-02)

### Dependency Updates
Expand Down
11 changes: 3 additions & 8 deletions packages/analytics-js-integrations/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
## [3.7.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-integrations@3.6.0...@rudderstack/analytics-js-integrations@3.7.0) (2024-08-02)
## [3.8.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-integrations@3.7.0...@rudderstack/analytics-js-integrations@3.8.0) (2024-08-16)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.8.1`
* `@rudderstack/analytics-js-common` updated to version `3.9.0`

### Features

* criteo add support for multiple hash methods ([#1812](https://github.com/rudderlabs/rudder-sdk-js/issues/1812)) ([23a0e37](https://github.com/rudderlabs/rudder-sdk-js/commit/23a0e37d274647cb3e2505694522080d7f5b98f3))


### Bug Fixes

* npm sanity suites ([#1810](https://github.com/rudderlabs/rudder-sdk-js/issues/1810)) ([22e43da](https://github.com/rudderlabs/rudder-sdk-js/commit/22e43da01f750a5cb23a2fce50de3744c54a197e))
* onboarded XPixel Integration ([#1783](https://github.com/rudderlabs/rudder-sdk-js/issues/1783)) ([cf9b8cc](https://github.com/rudderlabs/rudder-sdk-js/commit/cf9b8cc41de341be781fae3108e4a07f2b553dda))

Loading
Loading