├── .coderabbit └── config.yml ├── .cursor └── rules │ ├── 001-cursor-rules.mdc │ ├── 002-javascript-typescript.mdc │ ├── 003-testing.mdc │ ├── 004-package-management.mdc │ ├── 005-rudderstack-contribution.mdc │ ├── 006-rudderstack-git-standards.mdc │ └── 007-plan-act-workflow.mdc ├── .editorconfig ├── .env.example ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── pull_request_template.md └── workflows │ ├── check_pr_title.yml │ ├── create-hotfix-branch.yml │ ├── deploy-beta.yml │ ├── deploy-dev.yml │ ├── deploy-npm.yml │ ├── deploy-prod.yml │ ├── deploy-sanity-suite.yml │ ├── deploy-staging.yml │ ├── deploy.yml │ ├── draft-new-release.yml │ ├── housekeeping.yaml │ ├── publish-new-release.yml │ ├── rollback.yml │ ├── security-code-quality-and-bundle-size-checks.yml │ ├── trigger-test-suites.yml │ ├── unit-tests-and-lint.yml │ └── validate-actor.yml ├── .gitignore ├── .husky ├── .gitignore ├── commit-msg └── pre-commit ├── .jscpd.json ├── .memorybank ├── 00_memory_bank_maintenance.md ├── 01_project_overview.md ├── 01a_common_terminology.md ├── 02_technical_stack.md ├── 03_system_architecture.md ├── 04_git_workflow_cicd.md ├── 05_code_structure.md ├── 06_task_implementation_workflow.md ├── 07_development_guidelines.md └── README.md ├── .npmrc ├── .nvmrc ├── .nxignore ├── .prettierignore ├── .prettierrc ├── .versionrc ├── CODEOWNERS ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── SECURITY.md ├── assets ├── integrations │ └── AdobeAnalytics │ │ ├── adobe-analytics-js-heartbeat.js │ │ └── adobe-analytics-js.js └── rs-logo-full-light.jpg ├── babel.config.json ├── commitlint.config.js ├── eslint.config.mjs ├── examples ├── angular │ └── sample-app │ │ ├── .editorconfig │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── scripts │ │ └── setup-env.js │ │ ├── src │ │ ├── app │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.spec.ts │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ └── use-rudder-analytics.ts │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── main.ts │ │ ├── styles.css │ │ └── test.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.json │ │ └── tsconfig.spec.json ├── chrome-extension │ ├── USAGE.md │ ├── background-script-websockets │ │ ├── LICENSE │ │ ├── README.md │ │ ├── foreground.js │ │ ├── logo │ │ │ ├── logo-128.png │ │ │ ├── logo-16.png │ │ │ ├── logo-48.png │ │ │ └── logo.svg │ │ ├── manifest.json │ │ ├── popup │ │ │ ├── popup.css │ │ │ └── popup.html │ │ ├── rudderAnalytics.js │ │ ├── service-worker.js │ │ └── settings │ │ │ ├── settings.css │ │ │ └── settings.html │ ├── background-script │ │ ├── LICENSE │ │ ├── README.md │ │ ├── foreground.js │ │ ├── logo │ │ │ ├── logo-128.png │ │ │ ├── logo-16.png │ │ │ ├── logo-48.png │ │ │ └── logo.svg │ │ ├── manifest.json │ │ ├── popup │ │ │ ├── popup.css │ │ │ └── popup.html │ │ ├── rudderAnalytics.js │ │ ├── service-worker.js │ │ └── settings │ │ │ ├── settings.css │ │ │ └── settings.html │ ├── content-script-v1.1 │ │ ├── LICENSE │ │ ├── README.md │ │ ├── foreground.js │ │ ├── logo │ │ │ ├── logo-128.png │ │ │ ├── logo-16.png │ │ │ ├── logo-48.png │ │ │ └── logo.svg │ │ ├── manifest.json │ │ ├── popup │ │ │ ├── popup.css │ │ │ └── popup.html │ │ ├── service-worker-utils.js │ │ ├── service-worker.js │ │ └── settings │ │ │ ├── settings.css │ │ │ └── settings.html │ ├── content-script-v3 │ │ ├── LICENSE │ │ ├── README.md │ │ ├── foreground.js │ │ ├── logo │ │ │ ├── logo-128.png │ │ │ ├── logo-16.png │ │ │ ├── logo-48.png │ │ │ └── logo.svg │ │ ├── manifest.json │ │ ├── popup │ │ │ ├── popup.css │ │ │ └── popup.html │ │ ├── service-worker-utils.js │ │ ├── service-worker.js │ │ └── settings │ │ │ ├── settings.css │ │ │ └── settings.html │ └── websocket-server │ │ └── server.mjs ├── gatsby │ ├── sample-gatsby-plugin-usage │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── gatsby-config.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ │ ├── images │ │ │ │ └── icon.png │ │ │ └── pages │ │ │ │ ├── 404.tsx │ │ │ │ └── index.tsx │ │ └── tsconfig.json │ └── sample-gatsby-site │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── gatsby-browser.js │ │ ├── gatsby-config.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── src │ │ ├── images │ │ │ └── icon.png │ │ ├── pages │ │ │ ├── 404.tsx │ │ │ └── index.tsx │ │ └── utils │ │ │ └── useRudderAnalytics.ts │ │ ├── tsconfig.json │ │ └── tsconfig.node.json ├── integrations │ └── Ninetailed │ │ └── sample-apps │ │ ├── README.md │ │ ├── app-using-npm │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── index.css │ │ │ ├── index.js │ │ │ ├── logo.svg │ │ │ ├── reportWebVitals.js │ │ │ ├── setupTests.js │ │ │ └── useRudderAnalytics.js │ │ └── tsconfig.json │ │ ├── app-using-v1.1-cdn │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── index.css │ │ │ ├── index.js │ │ │ ├── logo.svg │ │ │ ├── reportWebVitals.js │ │ │ ├── setupTests.js │ │ │ └── useRudderAnalytics.js │ │ └── tsconfig.json │ │ └── app-using-v3-cdn │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ │ ├── src │ │ ├── App.css │ │ ├── App.js │ │ ├── index.css │ │ ├── index.js │ │ ├── logo.svg │ │ ├── reportWebVitals.js │ │ ├── setupTests.js │ │ └── useRudderAnalytics.js │ │ └── tsconfig.json ├── nextjs │ ├── hooks │ │ └── sample-app │ │ │ ├── .env.example │ │ │ ├── .eslintrc.json │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── next.config.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── postcss.config.js │ │ │ ├── public │ │ │ ├── next.svg │ │ │ └── vercel.svg │ │ │ ├── src │ │ │ └── app │ │ │ │ ├── favicon.ico │ │ │ │ ├── globals.css │ │ │ │ ├── layout.tsx │ │ │ │ ├── page.tsx │ │ │ │ └── useRudderAnalytics.ts │ │ │ ├── tailwind.config.ts │ │ │ └── tsconfig.json │ ├── js │ │ └── sample-app │ │ │ ├── .env.example │ │ │ ├── .eslintrc.json │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── jsconfig.json │ │ │ ├── next.config.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── postcss.config.js │ │ │ ├── public │ │ │ ├── next.svg │ │ │ └── vercel.svg │ │ │ ├── src │ │ │ └── app │ │ │ │ ├── favicon.ico │ │ │ │ ├── globals.css │ │ │ │ ├── layout.js │ │ │ │ ├── page.js │ │ │ │ └── useRudderAnalytics.js │ │ │ ├── tailwind.config.js │ │ │ └── tsconfig.json │ ├── page-router │ │ └── sample-app │ │ │ ├── .env.example │ │ │ ├── .eslintrc.json │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── next.config.js │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── postcss.config.js │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── next.svg │ │ │ └── vercel.svg │ │ │ ├── src │ │ │ ├── pages │ │ │ │ ├── _app.tsx │ │ │ │ ├── _document.tsx │ │ │ │ ├── api │ │ │ │ │ └── hello.ts │ │ │ │ ├── index.tsx │ │ │ │ └── page2.tsx │ │ │ ├── styles │ │ │ │ └── globals.css │ │ │ └── useRudderAnalytics.ts │ │ │ ├── tailwind.config.ts │ │ │ └── tsconfig.json │ └── ts │ │ └── sample-app │ │ ├── .env.example │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── README.md │ │ ├── next.config.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── public │ │ ├── next.svg │ │ └── vercel.svg │ │ ├── src │ │ └── app │ │ │ ├── favicon.ico │ │ │ ├── globals.css │ │ │ ├── layout.tsx │ │ │ ├── page.tsx │ │ │ └── useRudderAnalytics.ts │ │ ├── tailwind.config.ts │ │ └── tsconfig.json ├── reactjs │ ├── hooks │ │ └── sample-app │ │ │ ├── .env.example │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.test.tsx │ │ │ ├── App.tsx │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ ├── logo.svg │ │ │ ├── react-app-env.d.ts │ │ │ ├── reportWebVitals.ts │ │ │ ├── setupTests.ts │ │ │ └── useRudderAnalytics.ts │ │ │ └── tsconfig.json │ ├── js │ │ └── sample-app │ │ │ ├── .env.example │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ │ └── src │ │ │ ├── App.css │ │ │ ├── App.js │ │ │ ├── App.test.js │ │ │ ├── index.css │ │ │ ├── index.js │ │ │ ├── logo.svg │ │ │ ├── reportWebVitals.js │ │ │ ├── setupTests.js │ │ │ └── useRudderAnalytics.js │ ├── ts │ │ └── sample-app │ │ │ ├── .env.example │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ ├── manifest.json │ │ │ └── robots.txt │ │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.test.tsx │ │ │ ├── App.tsx │ │ │ ├── index.css │ │ │ ├── index.tsx │ │ │ ├── logo.svg │ │ │ ├── react-app-env.d.ts │ │ │ ├── reportWebVitals.ts │ │ │ ├── setupTests.ts │ │ │ └── useRudderAnalytics.ts │ │ │ └── tsconfig.json │ └── vite │ │ └── sample-app │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── README.md │ │ ├── eslint.config.js │ │ ├── index.html │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── public │ │ └── vite.svg │ │ ├── src │ │ ├── App.css │ │ ├── App.tsx │ │ ├── assets │ │ │ └── react.svg │ │ ├── index.css │ │ ├── main.tsx │ │ ├── useRudderAnalytics.ts │ │ └── vite-env.d.ts │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts ├── serverless │ ├── USAGE.md │ ├── cloudflare-worker │ │ ├── .editorconfig │ │ ├── .env.example │ │ ├── .prettierrc │ │ ├── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── scripts │ │ │ └── update-wrangler-config.js │ │ ├── src │ │ │ └── worker.js │ │ └── wrangler.toml │ └── vercel-edge │ │ ├── .env.example │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── README.md │ │ ├── app │ │ ├── api │ │ │ └── edge-function-example │ │ │ │ └── route.ts │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── layout.tsx │ │ └── page.tsx │ │ ├── next.config.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── public │ │ ├── next.svg │ │ └── vercel.svg │ │ ├── tailwind.config.ts │ │ └── tsconfig.json ├── symfony │ ├── USAGE.md │ └── sample │ │ ├── .env.example │ │ ├── .env.test │ │ ├── .gitignore │ │ ├── README.md │ │ ├── assets │ │ ├── app.js │ │ └── styles │ │ │ └── app.css │ │ ├── compose.override.yaml │ │ ├── compose.yaml │ │ ├── composer.json │ │ ├── composer.lock │ │ ├── config │ │ ├── bundles.php │ │ ├── packages │ │ │ ├── cache.yaml │ │ │ ├── csrf.yaml │ │ │ ├── debug.yaml │ │ │ ├── doctrine.yaml │ │ │ ├── doctrine_migrations.yaml │ │ │ ├── framework.yaml │ │ │ ├── mailer.yaml │ │ │ ├── messenger.yaml │ │ │ ├── monolog.yaml │ │ │ ├── notifier.yaml │ │ │ ├── routing.yaml │ │ │ ├── security.yaml │ │ │ ├── translation.yaml │ │ │ ├── twig.yaml │ │ │ ├── validator.yaml │ │ │ ├── web_profiler.yaml │ │ │ └── webpack_encore.yaml │ │ ├── preload.php │ │ ├── routes.yaml │ │ ├── routes │ │ │ ├── annotations.yaml │ │ │ ├── framework.yaml │ │ │ └── web_profiler.yaml │ │ └── services.yaml │ │ ├── migrations │ │ └── .gitignore │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── phpunit.xml.dist │ │ ├── public │ │ ├── .htaccess │ │ └── index.php │ │ ├── src │ │ ├── Controller │ │ │ ├── .gitignore │ │ │ └── RudderstackController.php │ │ ├── Entity │ │ │ └── .gitignore │ │ ├── Kernel.php │ │ └── Repository │ │ │ └── .gitignore │ │ ├── symfony.lock │ │ ├── templates │ │ ├── base.html.twig │ │ └── rudderstack │ │ │ └── index.html.twig │ │ ├── tests │ │ └── bootstrap.php │ │ ├── translations │ │ └── .gitignore │ │ └── webpack.config.js ├── v1.1 │ └── index.html ├── v1 │ └── index.html ├── v2-beacon │ └── index.html ├── v3-beacon │ └── index.html ├── v3-legacy-minimum-plugins │ └── index.html ├── v3-legacy │ └── index.html ├── v3-minimum-plugins │ └── index.html └── v3 │ └── index.html ├── jest.preset.js ├── jest ├── jest.global-setup.js ├── jest.polyfills.js ├── jest.setup-dom.js └── jsdom-extended.js ├── nx.json ├── package-lock.json ├── package.json ├── packages ├── analytics-js-common │ ├── .jscpd.json │ ├── .size-limit.js │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ │ ├── fixtures.ts │ │ ├── msw.handlers.ts │ │ └── msw.server.ts │ ├── __mocks__ │ │ ├── BufferQueue.ts │ │ ├── ErrorHandler.ts │ │ ├── HttpClient.ts │ │ ├── Logger.ts │ │ ├── PluginEngine.ts │ │ ├── PluginsManager.ts │ │ ├── Storage.ts │ │ ├── Store.ts │ │ └── StoreManager.ts │ ├── __tests__ │ │ ├── component-cookie │ │ │ └── index.test.ts │ │ ├── constants │ │ │ └── integrations │ │ │ │ └── constants.test.ts │ │ ├── services │ │ │ ├── BufferQueue │ │ │ │ └── BufferQueue.test.ts │ │ │ └── ExternalSrcLoader │ │ │ │ └── ExternalSrcLoader.test.ts │ │ ├── utilities │ │ │ ├── checks.test.ts │ │ │ ├── destinations.test.ts │ │ │ ├── detect.test.ts │ │ │ ├── errors.test.ts │ │ │ ├── eventMethodOverloads.test.ts │ │ │ ├── http.test.ts │ │ │ ├── json.test.ts │ │ │ ├── object.test.ts │ │ │ ├── page.test.ts │ │ │ ├── string.test.ts │ │ │ ├── timestamp.test.ts │ │ │ ├── timezone.test.ts │ │ │ ├── url.test.ts │ │ │ └── uuid.test.ts │ │ └── v1.1 │ │ │ └── utils │ │ │ ├── ObjectUtils.test.js │ │ │ └── errorHandler.test.js │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── src │ │ ├── component-cookie │ │ │ ├── README.md │ │ │ └── index.ts │ │ ├── constants │ │ │ ├── QueueStatuses.ts │ │ │ ├── consent.ts │ │ │ ├── errors.ts │ │ │ ├── htmlAttributes.ts │ │ │ ├── index.ts │ │ │ ├── integrations │ │ │ │ ├── ActiveCampaign │ │ │ │ │ └── constants.ts │ │ │ │ ├── AdobeAnalytics │ │ │ │ │ └── constants.ts │ │ │ │ ├── Adroll │ │ │ │ │ └── constants.ts │ │ │ │ ├── Amplitude │ │ │ │ │ └── constants.ts │ │ │ │ ├── Appcues │ │ │ │ │ └── constants.ts │ │ │ │ ├── Axeptio │ │ │ │ │ └── constants.ts │ │ │ │ ├── BingAds │ │ │ │ │ └── constants.ts │ │ │ │ ├── Braze │ │ │ │ │ └── constants.ts │ │ │ │ ├── Bugsnag │ │ │ │ │ └── constants.ts │ │ │ │ ├── Chartbeat │ │ │ │ │ └── constants.ts │ │ │ │ ├── Clevertap │ │ │ │ │ └── constants.ts │ │ │ │ ├── CommandBar │ │ │ │ │ └── constants.ts │ │ │ │ ├── CommonIntegrationsConstant │ │ │ │ │ └── constants.ts │ │ │ │ ├── ConvertFlow │ │ │ │ │ └── constants.ts │ │ │ │ ├── Criteo │ │ │ │ │ └── constants.ts │ │ │ │ ├── CustomerIO │ │ │ │ │ └── constants.ts │ │ │ │ ├── DCMFloodlight │ │ │ │ │ └── constants.ts │ │ │ │ ├── Destinations.ts │ │ │ │ ├── Drip │ │ │ │ │ └── constants.ts │ │ │ │ ├── Engage │ │ │ │ │ └── constants.ts │ │ │ │ ├── FacebookPixel │ │ │ │ │ └── constants.ts │ │ │ │ ├── Fullstory │ │ │ │ │ └── constants.ts │ │ │ │ ├── GA │ │ │ │ │ └── constants.ts │ │ │ │ ├── GA360 │ │ │ │ │ └── constants.ts │ │ │ │ ├── GA4 │ │ │ │ │ └── constants.ts │ │ │ │ ├── GA4_V2 │ │ │ │ │ └── constants.ts │ │ │ │ ├── Gainsight_PX │ │ │ │ │ └── constants.ts │ │ │ │ ├── GoogleAds │ │ │ │ │ └── constants.ts │ │ │ │ ├── GoogleOptimize │ │ │ │ │ └── constants.ts │ │ │ │ ├── GoogleTagManager │ │ │ │ │ └── constants.ts │ │ │ │ ├── Heap │ │ │ │ │ └── constants.ts │ │ │ │ ├── Hotjar │ │ │ │ │ └── constants.ts │ │ │ │ ├── HubSpot │ │ │ │ │ └── constants.ts │ │ │ │ ├── INTERCOM │ │ │ │ │ └── constants.ts │ │ │ │ ├── Iterable │ │ │ │ │ └── constants.ts │ │ │ │ ├── June │ │ │ │ │ └── constants.ts │ │ │ │ ├── Keen │ │ │ │ │ └── constants.ts │ │ │ │ ├── Kissmetrics │ │ │ │ │ └── constants.ts │ │ │ │ ├── Klaviyo │ │ │ │ │ └── constants.ts │ │ │ │ ├── LaunchDarkly │ │ │ │ │ └── constants.ts │ │ │ │ ├── Lemnisk │ │ │ │ │ └── constants.ts │ │ │ │ ├── LinkedInInsightTag │ │ │ │ │ └── constants.ts │ │ │ │ ├── LiveChat │ │ │ │ │ └── constants.ts │ │ │ │ ├── Lotame │ │ │ │ │ └── constants.ts │ │ │ │ ├── Lytics │ │ │ │ │ └── constants.ts │ │ │ │ ├── Matomo │ │ │ │ │ └── constants.ts │ │ │ │ ├── MicrosoftClarity │ │ │ │ │ └── constants.ts │ │ │ │ ├── Mixpanel │ │ │ │ │ └── constants.ts │ │ │ │ ├── MoEngage │ │ │ │ │ └── constants.ts │ │ │ │ ├── Mouseflow │ │ │ │ │ └── constants.ts │ │ │ │ ├── Ninetailed │ │ │ │ │ └── constants.ts │ │ │ │ ├── Olark │ │ │ │ │ └── constants.ts │ │ │ │ ├── Optimizely │ │ │ │ │ └── constants.ts │ │ │ │ ├── Pendo │ │ │ │ │ └── constants.ts │ │ │ │ ├── PinterestTag │ │ │ │ │ └── constants.ts │ │ │ │ ├── Podsights │ │ │ │ │ └── constants.ts │ │ │ │ ├── PostAffiliatePro │ │ │ │ │ └── constants.ts │ │ │ │ ├── Posthog │ │ │ │ │ └── constants.ts │ │ │ │ ├── ProfitWell │ │ │ │ │ └── constants.ts │ │ │ │ ├── Qualaroo │ │ │ │ │ └── constants.ts │ │ │ │ ├── Qualtrics │ │ │ │ │ └── constants.ts │ │ │ │ ├── QuantumMetric │ │ │ │ │ └── constants.ts │ │ │ │ ├── QuoraPixel │ │ │ │ │ └── constants.ts │ │ │ │ ├── RedditPixel │ │ │ │ │ └── constants.ts │ │ │ │ ├── Refiner │ │ │ │ │ └── constants.ts │ │ │ │ ├── Rockerbox │ │ │ │ │ └── constants.ts │ │ │ │ ├── RollBar │ │ │ │ │ └── constants.ts │ │ │ │ ├── Satismeter │ │ │ │ │ └── constants.ts │ │ │ │ ├── Sendinblue │ │ │ │ │ └── constants.ts │ │ │ │ ├── Sentry │ │ │ │ │ └── constants.ts │ │ │ │ ├── Shynet │ │ │ │ │ └── constants.ts │ │ │ │ ├── SnapEngage │ │ │ │ │ └── constants.ts │ │ │ │ ├── SnapPixel │ │ │ │ │ └── constants.ts │ │ │ │ ├── SpotifyPixel │ │ │ │ │ └── constants.ts │ │ │ │ ├── Sprig │ │ │ │ │ └── constants.ts │ │ │ │ ├── TVSquared │ │ │ │ │ └── constants.ts │ │ │ │ ├── TiktokAds │ │ │ │ │ └── constants.ts │ │ │ │ ├── Userpilot │ │ │ │ │ └── constants.ts │ │ │ │ ├── VWO │ │ │ │ │ └── constants.ts │ │ │ │ ├── Vero │ │ │ │ │ └── constants.ts │ │ │ │ ├── Woopra │ │ │ │ │ └── constants.ts │ │ │ │ ├── XPixel │ │ │ │ │ └── constants.ts │ │ │ │ ├── YandexMetrica │ │ │ │ │ └── constants.ts │ │ │ │ ├── client_server_name.js │ │ │ │ ├── config_to_integration_names.js │ │ │ │ ├── destDisplayNamesToFileNamesMap.ts │ │ │ │ ├── destinationNames.ts │ │ │ │ └── integration_cname.js │ │ │ ├── integrationsConfig.ts │ │ │ ├── logMessages.ts │ │ │ ├── loggerContexts.ts │ │ │ ├── metrics.ts │ │ │ ├── storages.ts │ │ │ ├── timeouts.ts │ │ │ └── urls.ts │ │ ├── index.ts │ │ ├── services │ │ │ ├── BufferQueue │ │ │ │ └── BufferQueue.ts │ │ │ └── ExternalSrcLoader │ │ │ │ ├── ExternalSrcLoader.ts │ │ │ │ ├── index.ts │ │ │ │ ├── jsFileLoader.ts │ │ │ │ └── types.ts │ │ ├── types │ │ │ ├── ApiObject.ts │ │ │ ├── ApplicationLifecycle.ts │ │ │ ├── ApplicationState.ts │ │ │ ├── Consent.ts │ │ │ ├── Destination.ts │ │ │ ├── ErrorHandler.ts │ │ │ ├── Event.ts │ │ │ ├── EventApi.ts │ │ │ ├── EventContext.ts │ │ │ ├── HttpClient.ts │ │ │ ├── IRudderAnalytics.ts │ │ │ ├── Integration.ts │ │ │ ├── LoadOptions.ts │ │ │ ├── Logger.ts │ │ │ ├── Metrics.ts │ │ │ ├── Nullable.ts │ │ │ ├── PluginEngine.ts │ │ │ ├── PluginsManager.ts │ │ │ ├── Session.ts │ │ │ ├── Source.ts │ │ │ ├── Storage.ts │ │ │ ├── Store.ts │ │ │ ├── UserSessionStorage.ts │ │ │ └── traits.ts │ │ ├── utilities │ │ │ ├── checks.ts │ │ │ ├── crypto.ts │ │ │ ├── destinations.ts │ │ │ ├── detect.ts │ │ │ ├── errors.ts │ │ │ ├── eventMethodOverloads.ts │ │ │ ├── http.ts │ │ │ ├── index.ts │ │ │ ├── json.ts │ │ │ ├── object.ts │ │ │ ├── page.ts │ │ │ ├── string.ts │ │ │ ├── timestamp.ts │ │ │ ├── timezone.ts │ │ │ ├── url.ts │ │ │ └── uuId.ts │ │ └── v1.1 │ │ │ └── utils │ │ │ ├── ObjectUtils.js │ │ │ ├── ScriptLoader.js │ │ │ ├── constants.js │ │ │ ├── errorHandler.js │ │ │ ├── index.ts │ │ │ ├── logUtil.js │ │ │ ├── notifyError.js │ │ │ └── storage │ │ │ ├── cookie.js │ │ │ ├── index.js │ │ │ ├── storage.js │ │ │ ├── store.js │ │ │ └── v3DecryptionUtils.js │ ├── tsconfig.json │ └── tsconfig.spec.json ├── analytics-js-cookies │ ├── .jscpd.json │ ├── .size-limit.mjs │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __tests__ │ │ └── cookieUtilities.test.ts │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── rollup.config.mjs │ ├── src │ │ ├── constants │ │ │ ├── cookies.ts │ │ │ └── logMessages.ts │ │ ├── cookiesUtilities.ts │ │ └── index.ts │ ├── tsconfig.json │ └── tsconfig.spec.json ├── analytics-js-integrations │ ├── .jscpd.json │ ├── .size-limit.js │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ │ └── .gitkeep │ ├── __mocks__ │ │ ├── .gitkeep │ │ └── logger.js │ ├── __tests__ │ │ ├── common │ │ │ └── common.test.js │ │ ├── integrations │ │ │ ├── AdobeAnalytics │ │ │ │ └── util.test.js │ │ │ ├── Adroll │ │ │ │ └── browser.test.js │ │ │ ├── Amplitude │ │ │ │ ├── browser.test.js │ │ │ │ └── util.test.js │ │ │ ├── Appcues │ │ │ │ └── appcues.test.js │ │ │ ├── BingAds │ │ │ │ ├── __fixtures__ │ │ │ │ │ └── data.js │ │ │ │ ├── browser.test.js │ │ │ │ └── utils.test.js │ │ │ ├── Braze │ │ │ │ └── browser.test.js │ │ │ ├── Clevertap │ │ │ │ └── browser.test.js │ │ │ ├── CommandBar │ │ │ │ └── browser.test.js │ │ │ ├── Criteo │ │ │ │ └── utils.test.js │ │ │ ├── DCMFloodlight │ │ │ │ └── browser.test.js │ │ │ ├── FacebookPixel │ │ │ │ ├── browser.test.js │ │ │ │ └── utils.test.js │ │ │ ├── Fullstory │ │ │ │ └── browser.test.js │ │ │ ├── GA │ │ │ │ └── browser.test.js │ │ │ ├── GA4 │ │ │ │ ├── __mocks__ │ │ │ │ │ └── data.js │ │ │ │ ├── browser.test.js │ │ │ │ └── utils.test.js │ │ │ ├── Gainsight_PX │ │ │ │ └── browser.test.js │ │ │ ├── GoogleAds │ │ │ │ ├── __fixtures__ │ │ │ │ │ └── data.js │ │ │ │ ├── browser.test.js │ │ │ │ └── utils.test.js │ │ │ ├── GoogleTagManager │ │ │ │ ├── browser.test.js │ │ │ │ └── nativeSdkLoader.test.js │ │ │ ├── Hotjar │ │ │ │ └── browser.test.js │ │ │ ├── Intercom │ │ │ │ ├── browser.test.js │ │ │ │ └── util.test.js │ │ │ ├── LaunchDarkly │ │ │ │ ├── __fixtures__ │ │ │ │ │ └── data.js │ │ │ │ ├── browser.test.js │ │ │ │ └── utils.test.js │ │ │ ├── Lemnisk │ │ │ │ └── browser.test.js │ │ │ ├── Matomo │ │ │ │ └── browser.test.js │ │ │ ├── Mixpanel │ │ │ │ ├── browser.test.js │ │ │ │ └── util.test.js │ │ │ ├── Ninetailed │ │ │ │ └── browser.test.js │ │ │ ├── PinterestTag │ │ │ │ ├── __fixtures__ │ │ │ │ │ └── data.js │ │ │ │ └── utils.test.js │ │ │ ├── Podsights │ │ │ │ └── utils.test.js │ │ │ ├── Posthog │ │ │ │ ├── browser.test.js │ │ │ │ └── utils.test.js │ │ │ ├── Reddit_pixel │ │ │ │ └── utils.test.js │ │ │ ├── SnapPixel │ │ │ │ └── browser.test.js │ │ │ ├── SpotifyPixel │ │ │ │ └── browser.test.js │ │ │ ├── Sprig │ │ │ │ └── browser.test.js │ │ │ ├── TikTokAds │ │ │ │ └── browser.test.js │ │ │ ├── Userpilot │ │ │ │ └── browser.test.js │ │ │ ├── VWO │ │ │ │ ├── browser.test.js │ │ │ │ └── utils.test.js │ │ │ └── XPixel │ │ │ │ └── browser.test.js │ │ └── utils │ │ │ ├── camelcase.test.js │ │ │ ├── commonUtils.test.js │ │ │ └── utils.test.js │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ │ └── .gitkeep │ ├── rollup.config.mjs │ ├── scripts │ │ └── integrationBuildScript.mjs │ ├── src │ │ ├── integrations │ │ │ ├── ActiveCampaign │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── AdobeAnalytics │ │ │ │ ├── browser.js │ │ │ │ ├── eCommHandle.js │ │ │ │ ├── heartbeatHandle.js │ │ │ │ ├── index.js │ │ │ │ └── util.js │ │ │ ├── Adroll │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── util.js │ │ │ ├── Amplitude │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ ├── test │ │ │ │ │ └── test_amplitude.html │ │ │ │ └── utils.js │ │ │ ├── Appcues │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Axeptio │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── BingAds │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Braze │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Bugsnag │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Chartbeat │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── Clevertap │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── CommandBar │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── ConvertFlow │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Criteo │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── CustomerIO │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── DCMFloodlight │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Drip │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Engage │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── FacebookPixel │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── utils.js │ │ │ │ └── utils.test.js │ │ │ ├── Fullstory │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── GA │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── GA360 │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── GA4 │ │ │ │ ├── browser.js │ │ │ │ ├── config.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── GA4_V2 │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Gainsight_PX │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── GoogleAds │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── GoogleOptimize │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── GoogleTagManager │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── Heap │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── Hotjar │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── HubSpot │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── INTERCOM │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Iterable │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── June │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Keen │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Kissmetrics │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── Klaviyo │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── util.js │ │ │ ├── LaunchDarkly │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Lemnisk │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── LinkedInInsightTag │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── LiveChat │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── Lotame │ │ │ │ ├── LotameStorage.js │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Lytics │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── test │ │ │ │ │ └── script-test-lytics.html │ │ │ ├── Matomo │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── MicrosoftClarity │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── Mixpanel │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── MoEngage │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── test │ │ │ │ │ └── script-test-moengage.html │ │ │ ├── Mouseflow │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Ninetailed │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Olark │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Optimizely │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Pendo │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── PinterestTag │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ ├── propertyMappingConfig.js │ │ │ │ ├── test │ │ │ │ │ ├── input.js │ │ │ │ │ └── output.js │ │ │ │ └── utils.js │ │ │ ├── Podsights │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── PostAffiliatePro │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Posthog │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ ├── test │ │ │ │ │ └── test_posthog.html │ │ │ │ └── utils.js │ │ │ ├── ProfitWell │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── Qualaroo │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Qualtrics │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── QuantumMetric │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── QuoraPixel │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── RedditPixel │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Refiner │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Rockerbox │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── RollBar │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── Satismeter │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── Sendinblue │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Sentry │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Shynet │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── SnapEngage │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── SnapPixel │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── SpotifyPixel │ │ │ │ ├── browser.js │ │ │ │ └── index.js │ │ │ ├── Sprig │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── TVSquared │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── TiktokAds │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── util.js │ │ │ ├── Userpilot │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── VWO │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── Vero │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── utils.js │ │ │ ├── Woopra │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ └── nativeSdkLoader.js │ │ │ ├── XPixel │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ ├── YandexMetrica │ │ │ │ ├── browser.js │ │ │ │ ├── index.js │ │ │ │ ├── nativeSdkLoader.js │ │ │ │ └── utils.js │ │ │ └── index.js │ │ └── utils │ │ │ ├── camelcase.js │ │ │ ├── commonUtils.js │ │ │ ├── constants.js │ │ │ ├── logger.js │ │ │ └── utils.js │ ├── tsconfig.json │ └── tsconfig.spec.json ├── analytics-js-plugins │ ├── .jscpd.json │ ├── .size-limit.mjs │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ │ ├── .gitkeep │ │ ├── fixtures.ts │ │ ├── msw.handlers.js │ │ └── msw.server.js │ ├── __mocks__ │ │ └── state.ts │ ├── __tests__ │ │ ├── beaconQueue │ │ │ └── .gitkeep │ │ ├── customConsentManager │ │ │ └── index.test.ts │ │ ├── deviceModeDestinations │ │ │ ├── index.test.ts │ │ │ └── utils.test.ts │ │ ├── deviceModeTransformation │ │ │ ├── index.test.ts │ │ │ └── utilities.test.ts │ │ ├── externalAnonymousId │ │ │ └── .gitkeep │ │ ├── googleLinker │ │ │ └── .gitkeep │ │ ├── iubendaConsentManager │ │ │ ├── index.test.ts │ │ │ └── utils.test.ts │ │ ├── ketchConsentManager │ │ │ ├── index.test.ts │ │ │ └── utils.test.ts │ │ ├── nativeDestinationQueue │ │ │ └── utilities.test.ts │ │ ├── oneTrustConsentManager │ │ │ └── index.test.ts │ │ ├── storageEncryption │ │ │ └── index.test.ts │ │ ├── storageEncryptionLegacy │ │ │ └── index.test.ts │ │ ├── storageMigrator │ │ │ └── index.test.ts │ │ ├── utilities │ │ │ ├── destination.test.ts │ │ │ ├── queue.test.ts │ │ │ └── retryQueue │ │ │ │ ├── RetryQueue.test.ts │ │ │ │ └── Schedule.test.ts │ │ └── xhrQueue │ │ │ ├── index.test.ts │ │ │ └── utilities.test.ts │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ │ └── .gitkeep │ ├── rollup.config.mjs │ ├── src │ │ ├── beaconQueue │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ ├── types.ts │ │ │ └── utilities.ts │ │ ├── customConsentManager │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ └── logMessages.ts │ │ ├── deviceModeDestinations │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── deviceModeTransformation │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ ├── types.ts │ │ │ └── utilities.ts │ │ ├── externalAnonymousId │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ └── util.ts │ │ ├── googleLinker │ │ │ ├── base64Decoder.ts │ │ │ ├── constants.ts │ │ │ ├── crc32.ts │ │ │ ├── index.ts │ │ │ ├── userLib.ts │ │ │ └── utils.ts │ │ ├── index.ts │ │ ├── iubendaConsentManager │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── ketchConsentManager │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ ├── types.ts │ │ │ └── utils.ts │ │ ├── nativeDestinationQueue │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ └── utilities.ts │ │ ├── oneTrustConsentManager │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ └── types.ts │ │ ├── shared-chunks │ │ │ ├── common.ts │ │ │ └── deviceModeDestinations.ts │ │ ├── storageEncryption │ │ │ └── index.ts │ │ ├── storageEncryptionLegacy │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ └── legacyEncryptionUtils.ts │ │ ├── storageMigrator │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ └── logMessages.ts │ │ ├── types │ │ │ └── plugins.ts │ │ ├── utilities │ │ │ ├── constants.ts │ │ │ ├── destination.ts │ │ │ ├── eventsDelivery.ts │ │ │ └── retryQueue │ │ │ │ ├── README.md │ │ │ │ ├── RetryQueue.ts │ │ │ │ ├── Schedule.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── logMessages.ts │ │ │ │ └── types.ts │ │ └── xhrQueue │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── logMessages.ts │ │ │ ├── types.ts │ │ │ └── utilities.ts │ ├── tsconfig.json │ └── tsconfig.spec.json ├── analytics-js-service-worker │ ├── .jscpd.json │ ├── .size-limit.mjs │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ │ ├── fixtures.ts │ │ └── msw.server.ts │ ├── __mocks__ │ │ └── .gitkeep │ ├── __tests__ │ │ ├── Analytics.test.ts │ │ ├── loosely-validate-event │ │ │ └── index.test.ts │ │ └── utilities.test.ts │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ │ └── .gitkeep │ ├── rollup.config.mjs │ ├── src │ │ ├── Analytics.ts │ │ ├── IAnalytics.ts │ │ ├── index.ts │ │ ├── loosely-validate-event │ │ │ └── index.ts │ │ ├── types.ts │ │ └── utilities.ts │ ├── tsconfig.json │ └── tsconfig.spec.json ├── analytics-js │ ├── .env.example │ ├── .jscpd.json │ ├── .size-limit.mjs │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ │ ├── fixtures.ts │ │ ├── msw.handlers.ts │ │ └── msw.server.ts │ ├── __mocks__ │ │ └── remotePlugins │ │ │ ├── BeaconQueue.ts │ │ │ ├── CustomConsentManager.ts │ │ │ ├── DeviceModeDestinations.ts │ │ │ ├── DeviceModeTransformation.ts │ │ │ ├── ExternalAnonymousId.ts │ │ │ ├── GoogleLinker.ts │ │ │ ├── IubendaConsentManager.ts │ │ │ ├── KetchConsentManager.ts │ │ │ ├── NativeDestinationQueue.ts │ │ │ ├── OneTrustConsentManager.ts │ │ │ ├── StorageEncryption.ts │ │ │ ├── StorageEncryptionLegacy.ts │ │ │ ├── StorageMigrator.ts │ │ │ └── XhrQueue.ts │ ├── __tests__ │ │ ├── app │ │ │ └── RudderAnalytics.test.ts │ │ ├── browser.test.ts │ │ ├── components │ │ │ ├── capabilitiesManager │ │ │ │ ├── CapabilitiesManager.test.ts │ │ │ │ └── detection │ │ │ │ │ ├── adBlockers.test.ts │ │ │ │ │ ├── browser.test.ts │ │ │ │ │ ├── clientHint.test.ts │ │ │ │ │ ├── dom.test.ts │ │ │ │ │ ├── screen.test.ts │ │ │ │ │ └── storage.test.ts │ │ │ ├── configManager │ │ │ │ ├── ConfigManager.test.ts │ │ │ │ ├── cdnPaths.test.ts │ │ │ │ ├── commonUtil.test.ts │ │ │ │ └── validate.test.ts │ │ │ ├── core │ │ │ │ └── Analytics.test.ts │ │ │ ├── eventManager │ │ │ │ ├── EventManager.test.ts │ │ │ │ ├── RudderEventFactory.test.ts │ │ │ │ └── utilities.test.ts │ │ │ ├── eventRepository │ │ │ │ └── EventRepository.test.ts │ │ │ ├── pluginsManager │ │ │ │ └── PluginsManager.test.ts │ │ │ ├── preloadBuffer │ │ │ │ └── index.test.ts │ │ │ ├── userSessionManager │ │ │ │ ├── UserSessionManager.test.ts │ │ │ │ └── utils.test.ts │ │ │ └── utilities │ │ │ │ ├── consent.test.ts │ │ │ │ ├── event.test.ts │ │ │ │ ├── globals.test.ts │ │ │ │ ├── loadOptions.test.ts │ │ │ │ ├── page.test.ts │ │ │ │ ├── sort.test.ts │ │ │ │ ├── statsCollection.test.ts │ │ │ │ └── url.test.ts │ │ ├── nativeSdkLoader.js │ │ └── services │ │ │ ├── ErrorHandler │ │ │ ├── ErrorHandler.test.ts │ │ │ ├── event.test.ts │ │ │ └── utils.test.ts │ │ │ ├── HttpClient │ │ │ └── HttpClient.test.ts │ │ │ ├── Logger │ │ │ └── Logger.test.ts │ │ │ ├── PluginEngine │ │ │ └── PluginEngine.test.ts │ │ │ └── StoreManager │ │ │ ├── Store.test.ts │ │ │ ├── StoreManager.test.ts │ │ │ ├── storages │ │ │ ├── CookieStorage.test.ts │ │ │ ├── InMemoryStorage.test.ts │ │ │ ├── LocalStorage.test.ts │ │ │ ├── defaultOptions.test.ts │ │ │ └── sessionStorage.test.ts │ │ │ └── top-domain │ │ │ └── index.test.ts │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ │ └── index.html │ ├── rollup.config.mjs │ ├── src │ │ ├── app │ │ │ ├── IRudderStackGlobals.ts │ │ │ └── RudderAnalytics.ts │ │ ├── browser.ts │ │ ├── components │ │ │ ├── capabilitiesManager │ │ │ │ ├── CapabilitiesManager.ts │ │ │ │ ├── detection │ │ │ │ │ ├── adBlockers.ts │ │ │ │ │ ├── browser.ts │ │ │ │ │ ├── clientHint.ts │ │ │ │ │ ├── dom.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── screen.ts │ │ │ │ │ └── storage.ts │ │ │ │ ├── index.ts │ │ │ │ ├── polyfill │ │ │ │ │ └── index.ts │ │ │ │ └── types.ts │ │ │ ├── configManager │ │ │ │ ├── ConfigManager.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── util │ │ │ │ │ ├── cdnPaths.ts │ │ │ │ │ ├── commonUtil.ts │ │ │ │ │ └── validate.ts │ │ │ ├── core │ │ │ │ ├── Analytics.ts │ │ │ │ ├── IAnalytics.ts │ │ │ │ └── utilities.ts │ │ │ ├── eventManager │ │ │ │ ├── EventManager.ts │ │ │ │ ├── RudderEventFactory.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── utilities.ts │ │ │ ├── eventRepository │ │ │ │ ├── EventRepository.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ │ ├── pluginsManager │ │ │ │ ├── PluginsManager.ts │ │ │ │ ├── bundledBuildPluginImports.ts │ │ │ │ ├── defaultPluginsList.ts │ │ │ │ ├── federatedModulesBuildPluginImports.ts │ │ │ │ ├── index.ts │ │ │ │ ├── pluginNames.ts │ │ │ │ ├── pluginsInventory.ts │ │ │ │ └── types.ts │ │ │ ├── preloadBuffer │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── userSessionManager │ │ │ │ ├── UserSessionManager.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ │ └── utilities │ │ │ │ ├── callbacks.ts │ │ │ │ ├── consent.ts │ │ │ │ ├── event.ts │ │ │ │ ├── globals.ts │ │ │ │ ├── loadOptions.ts │ │ │ │ ├── number.ts │ │ │ │ ├── page.ts │ │ │ │ ├── sort.ts │ │ │ │ ├── statsCollection.ts │ │ │ │ └── url.ts │ │ ├── constants │ │ │ ├── app.ts │ │ │ ├── encryption.ts │ │ │ ├── logMessages.ts │ │ │ ├── queryParams.ts │ │ │ ├── storage.ts │ │ │ ├── timeouts.ts │ │ │ └── urls.ts │ │ ├── index.ts │ │ ├── services │ │ │ ├── ErrorHandler │ │ │ │ ├── ErrorEvent │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ └── event.ts │ │ │ │ ├── ErrorHandler.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── index.ts │ │ │ │ └── utils.ts │ │ │ ├── HttpClient │ │ │ │ ├── HttpClient.ts │ │ │ │ ├── index.ts │ │ │ │ └── xhr │ │ │ │ │ ├── xhrRequestHandler.ts │ │ │ │ │ └── xhrResponseHandler.ts │ │ │ ├── Logger │ │ │ │ ├── Logger.ts │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ ├── PluginEngine │ │ │ │ ├── PluginEngine.ts │ │ │ │ ├── README.md │ │ │ │ └── index.ts │ │ │ └── StoreManager │ │ │ │ ├── Store.ts │ │ │ │ ├── StoreManager.ts │ │ │ │ ├── index.ts │ │ │ │ ├── storages │ │ │ │ ├── CookieStorage.ts │ │ │ │ ├── InMemoryStorage.ts │ │ │ │ ├── LocalStorage.ts │ │ │ │ ├── defaultOptions.ts │ │ │ │ ├── index.ts │ │ │ │ ├── sessionStorage.ts │ │ │ │ └── storageEngine.ts │ │ │ │ ├── top-domain │ │ │ │ ├── README.md │ │ │ │ └── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── utils.ts │ │ ├── state │ │ │ ├── index.ts │ │ │ └── slices │ │ │ │ ├── autoTrack.ts │ │ │ │ ├── capabilities.ts │ │ │ │ ├── consents.ts │ │ │ │ ├── context.ts │ │ │ │ ├── dataPlaneEvents.ts │ │ │ │ ├── eventBuffer.ts │ │ │ │ ├── lifecycle.ts │ │ │ │ ├── loadOptions.ts │ │ │ │ ├── metrics.ts │ │ │ │ ├── nativeDestinations.ts │ │ │ │ ├── plugins.ts │ │ │ │ ├── reporting.ts │ │ │ │ ├── serverCookies.ts │ │ │ │ ├── session.ts │ │ │ │ ├── source.ts │ │ │ │ └── storage.ts │ │ └── types │ │ │ ├── index.ts │ │ │ ├── remote-plugins.d.ts │ │ │ └── rudderanalytics.d.ts │ ├── tsconfig.json │ └── tsconfig.spec.json ├── analytics-v1.1 │ ├── .env.example │ ├── .jscpd.json │ ├── .size-limit.js │ ├── .versionrc │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ │ ├── fixtures.js │ │ ├── msw.handlers.js │ │ └── msw.server.js │ ├── __mocks__ │ │ ├── .gitkeep │ │ └── BraveBrowser.js │ ├── __tests__ │ │ ├── data-residency.test.js │ │ ├── features │ │ │ └── core │ │ │ │ └── metrics │ │ │ │ └── errorReporting │ │ │ │ └── ErrorReportingService.test.js │ │ ├── ketchConsent.test.js │ │ ├── oneTrustCookieConsent.test.js │ │ ├── script.test.js │ │ ├── transformationHandler.test.js │ │ └── utils │ │ │ ├── IntegrationsData.test.js │ │ │ ├── cdnPaths.test.js │ │ │ ├── clientHint.test.js │ │ │ ├── eventProcessorUtils.test.js │ │ │ ├── navigator.test.js │ │ │ ├── preProcessQueue.test.js │ │ │ ├── screenDetails.test.js │ │ │ └── utils.test.js │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ │ └── index.html │ ├── rollup-configs │ │ ├── rollup.sdk.browser.mjs │ │ ├── rollup.sdk.npm.mjs │ │ └── rollup.utilities.mjs │ ├── src │ │ ├── core │ │ │ └── analytics.js │ │ ├── features │ │ │ └── core │ │ │ │ ├── cookieConsent │ │ │ │ ├── CookieConsentFactory.js │ │ │ │ ├── OneTrust │ │ │ │ │ ├── browser.js │ │ │ │ │ └── index.js │ │ │ │ └── ketch │ │ │ │ │ ├── browser.js │ │ │ │ │ └── index.js │ │ │ │ ├── deviceModeTransformation │ │ │ │ ├── transformationHandler.js │ │ │ │ └── util.js │ │ │ │ ├── metrics │ │ │ │ └── errorReporting │ │ │ │ │ ├── ErrorReportingService.js │ │ │ │ │ └── providers │ │ │ │ │ └── Bugsnag.js │ │ │ │ └── session │ │ │ │ └── index.js │ │ └── utils │ │ │ ├── EventRepository.js │ │ │ ├── IntegrationsData.js │ │ │ ├── JSFileLoader.js │ │ │ ├── PreProcessQueue.js │ │ │ ├── RudderApp.js │ │ │ ├── RudderContext.js │ │ │ ├── RudderElement.js │ │ │ ├── RudderElementBuilder.js │ │ │ ├── RudderInfo.js │ │ │ ├── RudderMessage.js │ │ │ ├── beaconQueue.js │ │ │ ├── cdnPaths.js │ │ │ ├── clientHint.js │ │ │ ├── constants.js │ │ │ ├── eventProcessorUtils.js │ │ │ ├── linker │ │ │ ├── base64decoder.js │ │ │ ├── crc32.js │ │ │ ├── index.js │ │ │ └── userLib.js │ │ │ ├── navigator.js │ │ │ ├── pageProperties.js │ │ │ ├── screenDetails.js │ │ │ ├── utils.js │ │ │ └── xhrModule.js │ ├── tsconfig.json │ ├── tsconfig.spec.json │ └── types │ │ ├── index.d.ts │ │ └── service-worker │ │ └── index.d.ts ├── loading-scripts │ ├── .env.example │ ├── .jscpd.json │ ├── .size-limit.mjs │ ├── CHANGELOG.md │ ├── CHANGELOG_LATEST.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ │ └── .gitkeep │ ├── __mocks__ │ │ └── .gitkeep │ ├── __tests__ │ │ └── .gitkeep │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ │ └── index.html │ ├── rollup.config.mjs │ ├── src │ │ ├── index.ts │ │ └── types │ │ │ └── rudderanalytics.d.ts │ ├── tsconfig.json │ └── tsconfig.spec.json └── sanity-suite │ ├── .env.example │ ├── .jscpd.json │ ├── CHANGELOG.md │ ├── LICENSE.md │ ├── README.md │ ├── __fixtures__ │ ├── alias1.json │ ├── alias2.json │ ├── alias3.json │ ├── alias4.json │ ├── alias5.json │ ├── alias6.json │ ├── eventFiltering1.json │ ├── eventFiltering2.json │ ├── eventFiltering3.json │ ├── group1.json │ ├── group2.json │ ├── group3.json │ ├── group4.json │ ├── group5.json │ ├── group6.json │ ├── group7.json │ ├── identify1.json │ ├── identify2.json │ ├── identify3.json │ ├── identify4.json │ ├── identify5.json │ ├── identify6.json │ ├── identify7.json │ ├── identify8.json │ ├── identify9.json │ ├── page1.json │ ├── page10.json │ ├── page11.json │ ├── page12.json │ ├── page2.json │ ├── page3.json │ ├── page4.json │ ├── page5.json │ ├── page6.json │ ├── page7.json │ ├── page8.json │ ├── page9.json │ ├── sourceConfig1.json │ ├── sourceConfigDMT1.json │ ├── sourceConfigDev1.json │ ├── track1.json │ ├── track2.json │ ├── track3.json │ ├── track4.json │ ├── track5.json │ └── track6.json │ ├── babel.config.json │ ├── jest.config.mjs │ ├── package.json │ ├── project.json │ ├── public │ ├── v1.1 │ │ ├── index-cdn.html │ │ ├── index-local.html │ │ ├── index-npm.html │ │ ├── integrations │ │ │ ├── index-cdn.html │ │ │ ├── index-local.html │ │ │ └── index-npm.html │ │ └── manualLoadCall │ │ │ ├── index-cdn.html │ │ │ ├── index-local.html │ │ │ └── index-npm.html │ └── v3 │ │ ├── index-cdn.html │ │ ├── index-local.html │ │ ├── index-npm-bundled.html │ │ ├── index-npm.html │ │ ├── integrations │ │ ├── index-cdn.html │ │ ├── index-local.html │ │ ├── index-npm-bundled.html │ │ └── index-npm.html │ │ └── manualLoadCall │ │ ├── index-cdn.html │ │ ├── index-local.html │ │ ├── index-npm-bundled.html │ │ └── index-npm.html │ ├── rollup.config.mjs │ ├── serve.json │ ├── src │ ├── ignoredProperties │ │ ├── ignoredProperties.js │ │ └── sourceConfigIgnoredProperties.js │ ├── index-npm-bundled.ts │ ├── index-npm-v1.1.ts │ ├── index-npm.ts │ ├── index.ts │ ├── testBook │ │ ├── ResultAssertions.js │ │ ├── TestBook.js │ │ ├── index.js │ │ └── string.js │ ├── testBookSuites │ │ ├── alias.js │ │ ├── eventFiltering.js │ │ ├── group.js │ │ ├── identify.js │ │ ├── index.js │ │ ├── page.js │ │ ├── sourceConfig.js │ │ ├── sourceConfigDev.js │ │ └── track.js │ └── types │ │ ├── global.d.ts │ │ └── rudderanalytics.d.ts │ ├── tsconfig.json │ └── tsconfig.spec.json ├── patches ├── @digitalroute+cz-conventional-changelog-for-jira+8.0.1.patch ├── @jscutlery+semver+5.6.0.patch ├── @mswjs+interceptors+0.38.7.patch ├── @originjs+vite-plugin-federation+1.4.1.patch ├── @segment+localstorage-retry+1.3.0.patch ├── @segment+top-domain+3.0.1.patch ├── @vespaiach+axios-fetch-adapter+0.3.1.patch ├── crypto-es+2.1.0.patch ├── nx+21.0.0.patch └── rollup-plugin-generate-html-template+1.7.0.patch ├── scripts ├── cleanup-old-branches.sh ├── collect-packages-versions.sh ├── commitizen.js ├── create-hotfix-branch.sh ├── fix-reports-path-in-github-runner.sh ├── generate-last-release-changelog.sh ├── list-sdk-components.sh ├── make-package-json-publish-ready.sh ├── setup-examples-env.sh ├── sync-tags-in-nx-projects.sh └── update-integration-name-constants-references.js ├── sonar-project.properties ├── tsconfig.build.json ├── tsconfig.json ├── tsconfig.paths.json └── types ├── clipboardJs.d.ts ├── component-type.d.ts ├── global.d.ts ├── join-component.d.ts ├── localstorage-retry.d.ts ├── loosely-validate-event.d.ts └── user-agent-data-types.d.ts /.coderabbit/config.yml: -------------------------------------------------------------------------------- 1 | # .coderabbit/config.yml 2 | reviews: 3 | instructions: 4 | - pattern: '**/*' 5 | instruction: | 6 | # Ignore code coverage issues 7 | Do not mention code coverage warnings or code coverage reports in the review. 8 | -------------------------------------------------------------------------------- /.cursor/rules/002-javascript-typescript.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: JavaScript & TypeScript standards for browser and service worker compatibility 3 | globs: 4 | alwaysApply: false 5 | --- 6 | # JavaScript & TypeScript Standards 7 | 8 | **Critical**: Code must work in browsers AND service workers (no Node.js APIs) 9 | 10 | **Complete Guidelines**: [.memorybank/07_development_guidelines.md](mdc:.memorybank/07_development_guidelines.md) 11 | **Project Structure**: [.memorybank/05_code_structure.md](mdc:.memorybank/05_code_structure.md) 12 | -------------------------------------------------------------------------------- /.cursor/rules/003-testing.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: Testing standards for browser and service worker compatibility across the codebase 3 | globs: 4 | alwaysApply: false 5 | --- 6 | # Testing Standards 7 | 8 | **Critical**: Test compatibility across browsers AND service workers 9 | 10 | **Technical Stack**: [.memorybank/02_technical_stack.md](mdc:.memorybank/02_technical_stack.md) 11 | **Development Guidelines**: [.memorybank/07_development_guidelines.md](mdc:.memorybank/07_development_guidelines.md) 12 | -------------------------------------------------------------------------------- /.cursor/rules/004-package-management.mdc: -------------------------------------------------------------------------------- 1 | --- 2 | description: Package management standards for npm workspaces and monorepo structure following NX conventions 3 | globs: 4 | alwaysApply: false 5 | --- 6 | # Package Management Standards 7 | 8 | **Critical**: Use npm workspaces for monorepo, follow NX conventions 9 | 10 | **Monorepo Structure**: [.memorybank/05_code_structure.md](mdc:.memorybank/05_code_structure.md) 11 | **Git Workflow**: [.memorybank/04_git_workflow_cicd.md](mdc:.memorybank/04_git_workflow_cicd.md) 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; top-most EditorConfig file 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_size = 2 7 | indent_style = space 8 | max_line_length = 100 9 | # Force Unix-style newlines with a newline ending every file & trim trailing whitespace 10 | end_of_line = LF 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | 17 | [{*.yaml, *.yml}] 18 | indent_size = 2 19 | 20 | [*.json] 21 | indent_size = 2 22 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Variables required for the example 2 | WRITE_KEY= 3 | DATAPLANE_URL= 4 | TEST_FILE_PATH= 5 | CONFIG_SERVER_HOST= 6 | DEST_SDK_BASE_URL= 7 | BUGSNAG_RELEASE_STAGE= 8 | -------------------------------------------------------------------------------- /.github/workflows/check_pr_title.yml: -------------------------------------------------------------------------------- 1 | name: Check PR Title 2 | 3 | on: 4 | pull_request: 5 | branches: ['main', 'develop', 'hotfix/*'] 6 | types: ['opened', 'reopened', 'edited', 'synchronize'] 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.ref }} 10 | cancel-in-progress: true 11 | 12 | jobs: 13 | check_pr_title: 14 | name: Check PR title 15 | runs-on: [self-hosted, Linux, X64] 16 | steps: 17 | - name: Check PR title 18 | uses: rudderlabs/github-action-check-pr-title@v1.0.11 19 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | npm run commit-msg 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npm run pre-commit 2 | -------------------------------------------------------------------------------- /.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 10, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/(src)/**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ 2 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 22.15.0 2 | -------------------------------------------------------------------------------- /.nxignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/.nxignore -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Include patterns from .gitignore 2 | # .gitignore 3 | 4 | # Additional Prettier-specific ignore patterns 5 | assets/ 6 | CHANGELOG.md 7 | CHANGELOG_LATEST.md 8 | CONTRIBUTING.md 9 | examples/chrome-extension/**/rudderAnalytics.js 10 | examples/chrome-extension/**/foreground.js 11 | examples/**/index.html 12 | examples/gatsby/sample-gatsby-site/public/ 13 | examples/gatsby/sample-gatsby-plugin-usage/public/ 14 | **/nativeSdkLoader.js 15 | composer.lock 16 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "bracketSpacing": true, 4 | "endOfLine": "lf", 5 | "bracketSameLine": true, 6 | "jsxSingleQuote": true, 7 | "printWidth": 100, 8 | "semi": true, 9 | "singleQuote": true, 10 | "tabWidth": 2, 11 | "trailingComma": "all", 12 | "useTabs": false 13 | } 14 | -------------------------------------------------------------------------------- /.versionrc: -------------------------------------------------------------------------------- 1 | { 2 | "bumpFiles": [ 3 | { 4 | "filename": "package-lock.json", 5 | "type": "json" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /assets/rs-logo-full-light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/assets/rs-logo-full-light.jpg -------------------------------------------------------------------------------- /babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [["@babel/plugin-transform-object-assign"], ["babel-plugin-transform-object-hasown"]] 14 | } 15 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | async function getConfig() { 2 | const { 3 | default: { 4 | utils: { getProjects }, 5 | }, 6 | } = await import('@commitlint/config-nx-scopes'); 7 | 8 | return { 9 | rules: { 10 | 'scope-enum': async ctx => [ 11 | 2, 12 | 'always', 13 | [ 14 | ...(await getProjects(ctx)), 15 | // Insert custom scopes below: 16 | 'release', 17 | 'monorepo', 18 | 'examples', 19 | 'deps', 20 | ], 21 | ], 22 | }, 23 | }; 24 | } 25 | 26 | module.exports = getConfig(); 27 | -------------------------------------------------------------------------------- /examples/angular/sample-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /examples/angular/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | NG_APP_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | NG_APP_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/angular/sample-app/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | const routes: Routes = []; 5 | 6 | @NgModule({ 7 | imports: [RouterModule.forRoot(routes)], 8 | exports: [RouterModule], 9 | }) 10 | export class AppRoutingModule {} 11 | -------------------------------------------------------------------------------- /examples/angular/sample-app/src/app/app.component.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/angular/sample-app/src/app/app.component.css -------------------------------------------------------------------------------- /examples/angular/sample-app/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { AppRoutingModule } from './app-routing.module'; 4 | import { AppComponent } from './app.component'; 5 | import { RudderAnalyticsService } from './use-rudder-analytics'; 6 | 7 | @NgModule({ 8 | declarations: [AppComponent], 9 | imports: [BrowserModule, AppRoutingModule], 10 | providers: [RudderAnalyticsService], 11 | bootstrap: [AppComponent], 12 | }) 13 | export class AppModule {} 14 | -------------------------------------------------------------------------------- /examples/angular/sample-app/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/angular/sample-app/src/assets/.gitkeep -------------------------------------------------------------------------------- /examples/angular/sample-app/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true, 3 | RUDDERSTACK_WRITE_KEY: '', 4 | RUDDERSTACK_DATAPLANE_URL: '', 5 | }; 6 | -------------------------------------------------------------------------------- /examples/angular/sample-app/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false, 3 | RUDDERSTACK_WRITE_KEY: '', 4 | RUDDERSTACK_DATAPLANE_URL: '', 5 | }; 6 | -------------------------------------------------------------------------------- /examples/angular/sample-app/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/angular/sample-app/src/favicon.ico -------------------------------------------------------------------------------- /examples/angular/sample-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app/app.module'; 4 | 5 | platformBrowserDynamic() 6 | .bootstrapModule(AppModule) 7 | .catch(err => console.error(err)); 8 | -------------------------------------------------------------------------------- /examples/angular/sample-app/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /examples/angular/sample-app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": ["src/main.ts"], 9 | "include": ["src/**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /examples/angular/sample-app/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": ["jasmine"] 7 | }, 8 | "include": ["src/test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/foreground.js: -------------------------------------------------------------------------------- 1 | // This script gets injected into any opened page 2 | // whose URL matches the pattern defined in the manifest 3 | // (see "content_script" key). 4 | // Several foreground scripts can be declared 5 | // and injected into the same or different pages. 6 | 7 | console.log("This prints to the console of the page (injected only if the page url matched)") 8 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/logo/logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/background-script-websockets/logo/logo-128.png -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/logo/logo-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/background-script-websockets/logo/logo-16.png -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/logo/logo-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/background-script-websockets/logo/logo-48.png -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/popup/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | 5 | width: 16rem; 6 | height: 4rem; 7 | } 8 | 9 | .special-text { 10 | color: red; 11 | } 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/popup/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RudderStack SDK: Chrome Extension Background Script Sample 7 | 8 | 9 | This is the HTML body of the addon. 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/settings/settings.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | } 5 | 6 | .special-text { 7 | color: red; 8 | } 9 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script-websockets/settings/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RudderStack SDK: Chrome Extension Background Script Sample: Settings 8 | 9 | 10 | This is the settings page for the addon. 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/foreground.js: -------------------------------------------------------------------------------- 1 | // This script gets injected into any opened page 2 | // whose URL matches the pattern defined in the manifest 3 | // (see "content_script" key). 4 | // Several foreground scripts can be declared 5 | // and injected into the same or different pages. 6 | 7 | console.log('This prints to the console of the page (injected only if the page url matched)'); 8 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/logo/logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/background-script/logo/logo-128.png -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/logo/logo-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/background-script/logo/logo-16.png -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/logo/logo-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/background-script/logo/logo-48.png -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/popup/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | 5 | width: 16rem; 6 | height: 4rem; 7 | } 8 | 9 | .special-text { 10 | color: red; 11 | } 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/popup/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RudderStack SDK: Chrome Extension Background Script Sample 7 | 8 | 9 | This is the HTML body of the addon. 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/settings/settings.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | } 5 | 6 | .special-text { 7 | color: red; 8 | } 9 | -------------------------------------------------------------------------------- /examples/chrome-extension/background-script/settings/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RudderStack SDK: Chrome Extension Background Script Sample: Settings 8 | 9 | 10 | This is the settings page for the addon. 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/logo/logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/content-script-v1.1/logo/logo-128.png -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/logo/logo-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/content-script-v1.1/logo/logo-16.png -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/logo/logo-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/content-script-v1.1/logo/logo-48.png -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/popup/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | 5 | width: 16rem; 6 | height: 4rem; 7 | } 8 | 9 | .special-text { 10 | color: red; 11 | } 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/popup/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RudderStack SDK: Chrome Extension Content Script Sample 7 | 8 | 9 | This is the HTML body of the addon. 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/service-worker-utils.js: -------------------------------------------------------------------------------- 1 | // This file can be imported inside the service worker, 2 | // which means all of its functions and variables will be accessible 3 | // inside the service worker. 4 | // The importation is done in the file `service-worker.js`. 5 | 6 | console.log('External file is also loaded!'); 7 | 8 | chrome.tabs.onUpdated.addListener((tabId, tab) => { 9 | if (tab.url) { 10 | chrome.tabs.sendMessage(tabId, { 11 | type: 'track', 12 | value: { 13 | url: tab.url, 14 | }, 15 | }); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/settings/settings.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | } 5 | 6 | .special-text { 7 | color: red; 8 | } 9 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v1.1/settings/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RudderStack SDK: Chrome Extension Content Script Sample: Settings 8 | 9 | 10 | This is the settings page for the addon. 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/logo/logo-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/content-script-v3/logo/logo-128.png -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/logo/logo-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/content-script-v3/logo/logo-16.png -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/logo/logo-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/chrome-extension/content-script-v3/logo/logo-48.png -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/popup/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | 5 | width: 16rem; 6 | height: 4rem; 7 | } 8 | 9 | .special-text { 10 | color: red; 11 | } 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/popup/popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | RudderStack SDK: Chrome Extension Content Script Sample 7 | 8 | 9 | This is the HTML body of the addon. 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/service-worker-utils.js: -------------------------------------------------------------------------------- 1 | // This file can be imported inside the service worker, 2 | // which means all of its functions and variables will be accessible 3 | // inside the service worker. 4 | // The importation is done in the file `service-worker.js`. 5 | 6 | console.log('External file is also loaded!'); 7 | 8 | chrome.tabs.onUpdated.addListener((tabId, tab) => { 9 | if (tab.url) { 10 | chrome.tabs.sendMessage(tabId, { 11 | type: 'track', 12 | value: { 13 | url: tab.url, 14 | }, 15 | }); 16 | } 17 | }); 18 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/settings/settings.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #222; 3 | color: #eee; 4 | } 5 | 6 | .special-text { 7 | color: red; 8 | } 9 | -------------------------------------------------------------------------------- /examples/chrome-extension/content-script-v3/settings/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RudderStack SDK: Chrome Extension Content Script Sample: Settings 8 | 9 | 10 | This is the settings page for the addon. 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/chrome-extension/websocket-server/server.mjs: -------------------------------------------------------------------------------- 1 | import { WebSocketServer } from 'ws'; 2 | 3 | const wss = new WebSocketServer({ port: 8080 }); 4 | 5 | wss.on('connection', function connection(ws) { 6 | ws.on('error', console.error); 7 | 8 | ws.on('message', function message(data) { 9 | try { 10 | const event = JSON.parse(data); 11 | console.log('received: %s', event.data.batch[0]); 12 | event.done(); 13 | } catch (e) { 14 | console.log('received: %s', data); 15 | } 16 | }); 17 | 18 | ws.send('something'); 19 | }); 20 | -------------------------------------------------------------------------------- /examples/gatsby/sample-gatsby-plugin-usage/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | GATSBY_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | GATSBY_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/gatsby/sample-gatsby-plugin-usage/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .cache/ 3 | public 4 | src/gatsby-types.d.ts 5 | -------------------------------------------------------------------------------- /examples/gatsby/sample-gatsby-plugin-usage/src/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/gatsby/sample-gatsby-plugin-usage/src/images/icon.png -------------------------------------------------------------------------------- /examples/gatsby/sample-gatsby-site/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | GATSBY_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | GATSBY_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/gatsby/sample-gatsby-site/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .cache/ 3 | public 4 | src/gatsby-types.d.ts 5 | -------------------------------------------------------------------------------- /examples/gatsby/sample-gatsby-site/src/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/gatsby/sample-gatsby-site/src/images/icon.png -------------------------------------------------------------------------------- /examples/gatsby/sample-gatsby-site/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "allowSyntheticDefaultImports": true, 7 | "resolveJsonModule": true, 8 | "skipLibCheck": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "allowJs": true, 11 | "checkJs": false 12 | }, 13 | "include": ["gatsby-config.ts", "gatsby-browser.js", "gatsby-node.js", "gatsby-ssr.js"] 14 | } 15 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | REACT_APP_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | REACT_APP_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-npm/public/favicon.ico -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-npm/public/logo192.png -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-npm/public/logo512.png -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-npm/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | REACT_APP_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | REACT_APP_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/public/favicon.ico -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/public/logo192.png -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/public/logo512.png -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v1.1-cdn/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | REACT_APP_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | REACT_APP_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/public/favicon.ico -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/public/logo192.png -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/public/logo512.png -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /examples/integrations/Ninetailed/sample-apps/app-using-v3-cdn/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /examples/nextjs/hooks/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | NEXT_PUBLIC_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | NEXT_PUBLIC_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/nextjs/hooks/sample-app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /examples/nextjs/hooks/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /examples/nextjs/hooks/sample-app/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | module.exports = nextConfig; 5 | -------------------------------------------------------------------------------- /examples/nextjs/hooks/sample-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | '@tailwindcss/postcss': {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /examples/nextjs/hooks/sample-app/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/nextjs/hooks/sample-app/src/app/favicon.ico -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | NEXT_PUBLIC_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | NEXT_PUBLIC_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals", 3 | "parserOptions": { 4 | "requireConfigFile": false, 5 | "ecmaVersion": 2020 6 | }, 7 | "rules": {} 8 | } 9 | -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "@/*": ["./src/*"] 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | eslint: { 4 | ignoreDuringBuilds: true, // Disables linting during builds 5 | }, 6 | }; 7 | 8 | module.exports = nextConfig; 9 | -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | autoprefixer: {}, 4 | '@tailwindcss/postcss': {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/nextjs/js/sample-app/src/app/favicon.ico -------------------------------------------------------------------------------- /examples/nextjs/js/sample-app/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './src/pages/**/*.{js,ts,jsx,tsx,mdx}', 5 | './src/components/**/*.{js,ts,jsx,tsx,mdx}', 6 | './src/app/**/*.{js,ts,jsx,tsx,mdx}', 7 | ], 8 | theme: { 9 | extend: { 10 | backgroundImage: { 11 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 12 | 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 13 | }, 14 | }, 15 | }, 16 | plugins: [], 17 | }; 18 | -------------------------------------------------------------------------------- /examples/nextjs/page-router/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | NEXT_PUBLIC_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | NEXT_PUBLIC_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/nextjs/page-router/sample-app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"], 3 | "rules": { 4 | "@typescript-eslint/no-throw-literal": "off" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/nextjs/page-router/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /examples/nextjs/page-router/sample-app/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | }; 5 | 6 | module.exports = nextConfig; 7 | -------------------------------------------------------------------------------- /examples/nextjs/page-router/sample-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | '@tailwindcss/postcss': {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /examples/nextjs/page-router/sample-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/nextjs/page-router/sample-app/public/favicon.ico -------------------------------------------------------------------------------- /examples/nextjs/page-router/sample-app/src/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type { NextApiRequest, NextApiResponse } from 'next'; 3 | 4 | type Data = { 5 | name: string; 6 | }; 7 | 8 | export default function handler(req: NextApiRequest, res: NextApiResponse) { 9 | res.status(200).json({ name: 'John Doe' }); 10 | } 11 | -------------------------------------------------------------------------------- /examples/nextjs/ts/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | NEXT_PUBLIC_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | NEXT_PUBLIC_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/nextjs/ts/sample-app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /examples/nextjs/ts/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /examples/nextjs/ts/sample-app/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | module.exports = nextConfig; 5 | -------------------------------------------------------------------------------- /examples/nextjs/ts/sample-app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | '@tailwindcss/postcss': {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /examples/nextjs/ts/sample-app/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/nextjs/ts/sample-app/src/app/favicon.ico -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | REACT_APP_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | REACT_APP_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/hooks/sample-app/public/favicon.ico -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/hooks/sample-app/public/logo192.png -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/hooks/sample-app/public/logo512.png -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | const reportWebVitals = (onPerfEntry?: any) => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => { 4 | onCLS(onPerfEntry); 5 | onFID(onPerfEntry); 6 | onFCP(onPerfEntry); 7 | onLCP(onPerfEntry); 8 | onTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /examples/reactjs/hooks/sample-app/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | REACT_APP_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | REACT_APP_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/js/sample-app/public/favicon.ico -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/js/sample-app/public/logo192.png -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/js/sample-app/public/logo512.png -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders edit text', () => { 5 | render(); 6 | const editText = screen.getByText(/Edit/i); 7 | expect(editText).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => { 4 | onCLS(onPerfEntry); 5 | onFID(onPerfEntry); 6 | onFCP(onPerfEntry); 7 | onLCP(onPerfEntry); 8 | onTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /examples/reactjs/js/sample-app/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | REACT_APP_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | REACT_APP_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/ts/sample-app/public/favicon.ico -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/ts/sample-app/public/logo192.png -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/reactjs/ts/sample-app/public/logo512.png -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/src/App.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders edit instruction text', () => { 5 | render(); 6 | const textElement = screen.getByText(/Edit/i); 7 | expect(textElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | const reportWebVitals = (onPerfEntry?: any) => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => { 4 | onCLS(onPerfEntry); 5 | onFID(onPerfEntry); 6 | onFCP(onPerfEntry); 7 | onLCP(onPerfEntry); 8 | onTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /examples/reactjs/ts/sample-app/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /examples/reactjs/vite/sample-app/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | VITE_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | VITE_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/reactjs/vite/sample-app/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /examples/reactjs/vite/sample-app/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import App from './App'; 4 | import './index.css'; 5 | 6 | ReactDOM.createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ); 11 | -------------------------------------------------------------------------------- /examples/reactjs/vite/sample-app/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/reactjs/vite/sample-app/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /examples/reactjs/vite/sample-app/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import react from '@vitejs/plugin-react-swc'; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }); 8 | -------------------------------------------------------------------------------- /examples/serverless/cloudflare-worker/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = tab 6 | tab_width = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.yml] 13 | indent_style = space 14 | -------------------------------------------------------------------------------- /examples/serverless/cloudflare-worker/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/serverless/cloudflare-worker/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 140, 3 | "singleQuote": true, 4 | "semi": true, 5 | "useTabs": true 6 | } 7 | -------------------------------------------------------------------------------- /examples/serverless/cloudflare-worker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-cloudflare-worker", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "deploy": "wrangler deploy", 7 | "start": "wrangler dev", 8 | "config": "node scripts/update-wrangler-config.js" 9 | }, 10 | "devDependencies": { 11 | "dotenv": "16.4.5", 12 | "wrangler": "3.82.0" 13 | }, 14 | "dependencies": { 15 | "@rudderstack/analytics-js-service-worker": "*", 16 | "@vespaiach/axios-fetch-adapter": "0.3.1", 17 | "host-proxy": "1.0.2", 18 | "http-forward": "0.1.3" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /examples/serverless/vercel-edge/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | NEXT_PUBLIC_RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | NEXT_PUBLIC_RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/serverless/vercel-edge/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /examples/serverless/vercel-edge/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /examples/serverless/vercel-edge/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/serverless/vercel-edge/app/favicon.ico -------------------------------------------------------------------------------- /examples/serverless/vercel-edge/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import './globals.css'; 2 | import type { Metadata } from 'next'; 3 | import { Inter } from 'next/font/google'; 4 | 5 | const inter = Inter({ subsets: ['latin'] }); 6 | 7 | export const metadata: Metadata = { 8 | title: 'Create Next App', 9 | description: 'Generated by create next app', 10 | }; 11 | 12 | export default function RootLayout({ children }: { children: React.ReactNode }) { 13 | return ( 14 | 15 | {children} 16 | 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /examples/serverless/vercel-edge/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | module.exports = nextConfig; 5 | -------------------------------------------------------------------------------- /examples/serverless/vercel-edge/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | '@tailwindcss/postcss': {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /examples/symfony/sample/.env.example: -------------------------------------------------------------------------------- 1 | # RudderStack Configuration 2 | RUDDERSTACK_WRITE_KEY=${WRITE_KEY} 3 | RUDDERSTACK_DATAPLANE_URL=${DATAPLANE_URL} 4 | -------------------------------------------------------------------------------- /examples/symfony/sample/.env.test: -------------------------------------------------------------------------------- 1 | # define your env variables for the test env here 2 | KERNEL_CLASS='App\Kernel' 3 | APP_SECRET='$ecretf0rt3st' 4 | SYMFONY_DEPRECATIONS_HELPER=999999 5 | PANTHER_APP_ENV=panther 6 | PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots 7 | -------------------------------------------------------------------------------- /examples/symfony/sample/assets/styles/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #f8f9fa; 3 | } 4 | 5 | .container { 6 | max-width: 1140px; 7 | margin: 0 auto; 8 | padding: 0 15px; 9 | } 10 | 11 | .card { 12 | box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); 13 | } 14 | 15 | .card-header { 16 | font-weight: 600; 17 | } 18 | 19 | .bg-light { 20 | background-color: #f8f9fa; 21 | } 22 | 23 | .rounded { 24 | border-radius: 0.25rem; 25 | } 26 | -------------------------------------------------------------------------------- /examples/symfony/sample/compose.override.yaml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | ###> doctrine/doctrine-bundle ### 4 | database: 5 | ports: 6 | - "5432" 7 | ###< doctrine/doctrine-bundle ### 8 | 9 | ###> symfony/mailer ### 10 | mailer: 11 | image: axllent/mailpit 12 | ports: 13 | - "1025" 14 | - "8025" 15 | environment: 16 | MP_SMTP_AUTH_ACCEPT_ANY: 1 17 | MP_SMTP_AUTH_ALLOW_INSECURE: 1 18 | ###< symfony/mailer ### 19 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/csrf.yaml: -------------------------------------------------------------------------------- 1 | # Enable stateless CSRF protection for forms and logins/logouts 2 | framework: 3 | form: 4 | csrf_protection: 5 | token_id: submit 6 | 7 | csrf_protection: 8 | stateless_token_ids: 9 | - submit 10 | - authenticate 11 | - logout 12 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/debug.yaml: -------------------------------------------------------------------------------- 1 | when@dev: 2 | debug: 3 | # Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser. 4 | # See the "server:dump" command to start a new server. 5 | dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%" 6 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/doctrine_migrations.yaml: -------------------------------------------------------------------------------- 1 | doctrine_migrations: 2 | migrations_paths: 3 | # namespace is arbitrary but should be different from App\Migrations 4 | # as migrations classes should NOT be autoloaded 5 | 'DoctrineMigrations': '%kernel.project_dir%/migrations' 6 | enable_profiler: false 7 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/mailer.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | mailer: 3 | dsn: '%env(MAILER_DSN)%' 4 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/notifier.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | notifier: 3 | chatter_transports: 4 | texter_transports: 5 | channel_policy: 6 | # use chat/slack, chat/telegram, sms/twilio or sms/nexmo 7 | urgent: ['email'] 8 | high: ['email'] 9 | medium: ['email'] 10 | low: ['email'] 11 | admin_recipients: 12 | - { email: admin@example.com } 13 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/routing.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | router: 3 | utf8: true 4 | 5 | # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. 6 | # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands 7 | #default_uri: http://localhost 8 | 9 | when@prod: 10 | framework: 11 | router: 12 | strict_requirements: null 13 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/translation.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | default_locale: en 3 | translator: 4 | default_path: '%kernel.project_dir%/translations' 5 | fallbacks: 6 | - en 7 | providers: 8 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/twig.yaml: -------------------------------------------------------------------------------- 1 | twig: 2 | default_path: '%kernel.project_dir%/templates' 3 | 4 | when@test: 5 | twig: 6 | strict_variables: true 7 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/validator.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | validation: 3 | email_validation_mode: html5 4 | 5 | # Enables validator auto-mapping support. 6 | # For instance, basic validation constraints will be inferred from Doctrine's metadata. 7 | #auto_mapping: 8 | # App\Entity\: [] 9 | 10 | when@test: 11 | framework: 12 | validation: 13 | not_compromised_password: false 14 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/packages/web_profiler.yaml: -------------------------------------------------------------------------------- 1 | when@dev: 2 | web_profiler: 3 | toolbar: true 4 | intercept_redirects: false 5 | 6 | framework: 7 | profiler: { only_exceptions: false } 8 | 9 | when@test: 10 | web_profiler: 11 | toolbar: false 12 | intercept_redirects: false 13 | 14 | framework: 15 | profiler: { collect: false } 16 | -------------------------------------------------------------------------------- /examples/symfony/sample/config/preload.php: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteRule ^(.*)$ index.php [QSA,L] 5 | 6 | -------------------------------------------------------------------------------- /examples/symfony/sample/public/index.php: -------------------------------------------------------------------------------- 1 | bootEnv(dirname(__DIR__).'/.env'); 9 | } 10 | -------------------------------------------------------------------------------- /examples/symfony/sample/translations/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/examples/symfony/sample/translations/.gitignore -------------------------------------------------------------------------------- /jest/jest.global-setup.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | process.env.TZ = 'Asia/Kolkata'; 3 | }; 4 | -------------------------------------------------------------------------------- /jest/jest.polyfills.js: -------------------------------------------------------------------------------- 1 | require('isomorphic-fetch'); 2 | 3 | // Mocking Math random 4 | global.Math.random = () => 0.5; 5 | 6 | // Mocking crypto.getRandomValues 7 | // global.crypto.getRandomValues = (arr) => arr; 8 | 9 | // Fail tests on warnings, not only errors 10 | // console.error = message => { 11 | // throw new Error(message); 12 | // }; 13 | 14 | // Suppress Console output from tested code to terminal 15 | console.warn = jest.fn(); 16 | console.error = jest.fn(); 17 | // Mock browsers sendBeacon utility 18 | navigator.sendBeacon = jest.fn(); 19 | -------------------------------------------------------------------------------- /packages/analytics-js-common/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/analytics-js-common/.size-limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * DO NOT EDIT the size limits configured in this file. 3 | * Should you update them, please contact CODEOWNERS. 4 | */ 5 | module.exports = [ 6 | { 7 | name: 'Common - No bundling', 8 | path: 'dist/npm/**/*.js', 9 | limit: '19 KiB', 10 | }, 11 | ]; 12 | -------------------------------------------------------------------------------- /packages/analytics-js-common/__fixtures__/msw.server.ts: -------------------------------------------------------------------------------- 1 | import { setupServer } from 'msw/node'; 2 | import { handlers } from './msw.handlers'; 3 | 4 | const server = setupServer(...handlers); 5 | 6 | export { server }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js-common/__mocks__/BufferQueue.ts: -------------------------------------------------------------------------------- 1 | class BufferQueue { 2 | items: T[] = []; 3 | enqueue = jest.fn(); 4 | dequeue = jest.fn(); 5 | isEmpty = jest.fn(); 6 | size = jest.fn(); 7 | clear = jest.fn(); 8 | } 9 | 10 | export { BufferQueue }; 11 | -------------------------------------------------------------------------------- /packages/analytics-js-common/__mocks__/Logger.ts: -------------------------------------------------------------------------------- 1 | import type { ILogger } from '../src/types/Logger'; 2 | 3 | class Logger implements ILogger { 4 | warn = jest.fn(); 5 | log = jest.fn(); 6 | error = jest.fn(); 7 | info = jest.fn(); 8 | debug = jest.fn(); 9 | minLogLevel = 0; 10 | scope = 'test scope'; 11 | setMinLogLevel = jest.fn(); 12 | setScope = jest.fn(); 13 | logProvider = console; 14 | } 15 | 16 | const defaultLogger = new Logger(); 17 | 18 | export { Logger, defaultLogger }; 19 | -------------------------------------------------------------------------------- /packages/analytics-js-common/__tests__/utilities/timezone.test.ts: -------------------------------------------------------------------------------- 1 | import { getTimezone } from '../../src/utilities/timezone'; 2 | 3 | describe('Common Utils - Timezone', () => { 4 | it('should return timezone of the user', () => { 5 | const timezone = getTimezone(); 6 | expect(typeof timezone).toBe('string'); 7 | expect(timezone.startsWith('GMT')).toBe(true); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/analytics-js-common/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: '@rudderstack/analytics-js-common', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coverageThreshold: { 7 | global: { 8 | branches: 0, 9 | functions: 0, 10 | lines: 0, 11 | statements: 0, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/component-cookie/README.md: -------------------------------------------------------------------------------- 1 | # cookie 2 | 3 | Cookie component. 4 | 5 | ## Example 6 | 7 | ```js 8 | // set 9 | cookie('name', 'tobi'); 10 | cookie('name', 'tobi', { path: '/' }); 11 | cookie('name', 'tobi', { maxage: 60000 }); // in milliseconds 12 | cookie('species', 'ferret'); 13 | 14 | // get 15 | var name = cookie('name'); 16 | // => "tobi" 17 | 18 | var cookies = cookie(); 19 | // => { name: "tobi", species: "ferret" } 20 | 21 | // clear 22 | cookie('name', null); 23 | ``` 24 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/QueueStatuses.ts: -------------------------------------------------------------------------------- 1 | const QueueStatuses = { 2 | IN_PROGRESS: 'inProgress', 3 | QUEUE: 'queue', 4 | RECLAIM_START: 'reclaimStart', 5 | RECLAIM_END: 'reclaimEnd', 6 | ACK: 'ack', 7 | BATCH_QUEUE: 'batchQueue', 8 | }; 9 | 10 | export { QueueStatuses }; 11 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/consent.ts: -------------------------------------------------------------------------------- 1 | import type { DeliveryType, StorageStrategy } from '../types/LoadOptions'; 2 | 3 | const DEFAULT_PRE_CONSENT_STORAGE_STRATEGY: StorageStrategy = 'none'; 4 | const DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE: DeliveryType = 'immediate'; 5 | 6 | export { DEFAULT_PRE_CONSENT_STORAGE_STRATEGY, DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/htmlAttributes.ts: -------------------------------------------------------------------------------- 1 | const EXTERNAL_SOURCE_LOAD_ORIGIN = 'RS_JS_SDK'; 2 | 3 | export { EXTERNAL_SOURCE_LOAD_ORIGIN }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * as htmlAttributes from './htmlAttributes'; 2 | export * as loggerContexts from './loggerContexts'; 3 | export * as logMessages from './logMessages'; 4 | export * as QueueStatuses from './QueueStatuses'; 5 | export * as storages from './storages'; 6 | export * as timeouts from './timeouts'; 7 | export * as urls from './urls'; 8 | export * as consent from './consent'; 9 | export * as integrationsConfig from './integrationsConfig'; 10 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Adroll/constants.ts: -------------------------------------------------------------------------------- 1 | import { ADROLL_NAME as NAME, ADROLL_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Adroll'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Adroll: NAME, 9 | 'Ad roll': NAME, 10 | 'ad roll': NAME, 11 | adroll: NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Amplitude/constants.ts: -------------------------------------------------------------------------------- 1 | import { AM_NAME as NAME, AM_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Amplitude'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | AMPLITUDE: NAME, 9 | Amplitude: NAME, 10 | am: NAME, 11 | }; 12 | 13 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Appcues/constants.ts: -------------------------------------------------------------------------------- 1 | import { APPCUES_NAME as NAME, APPCUES_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Appcues'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Appcues: NAME, 9 | 'App Cues': NAME, 10 | appcues: NAME, 11 | }; 12 | 13 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Axeptio/constants.ts: -------------------------------------------------------------------------------- 1 | import { AXEPTIO_NAME as NAME, AXEPTIO_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Axeptio'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Axeptio: NAME, 9 | axeptio: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/BingAds/constants.ts: -------------------------------------------------------------------------------- 1 | import { BINGADS_NAME as NAME, BINGADS_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'BingAds'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | BingAds: NAME, 9 | bingads: NAME, 10 | 'Bing Ads': NAME, 11 | 'Bing ads': NAME, 12 | 'bing Ads': NAME, 13 | 'bing ads': NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Bugsnag/constants.ts: -------------------------------------------------------------------------------- 1 | import { BUGSNAG_NAME as NAME, BUGSNAG_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Bugsnag'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | bugsnag: NAME, 9 | Bugsnag: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Chartbeat/constants.ts: -------------------------------------------------------------------------------- 1 | import { CHARTBEAT_NAME as NAME, CHARTBEAT_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Chartbeat'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Chartbeat: NAME, 9 | chartbeat: NAME, 10 | 'Chart Beat': NAME, 11 | 'chart beat': NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Clevertap/constants.ts: -------------------------------------------------------------------------------- 1 | import { CLEVERTAP_NAME as NAME, CLEVERTAP_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Clevertap'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Clevertap: NAME, 9 | clevertap: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/CommandBar/constants.ts: -------------------------------------------------------------------------------- 1 | import { COMMANDBAR_NAME as NAME, COMMANDBAR_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'CommandBar'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | 'Command Bar': NAME, 9 | Commandbar: NAME, 10 | COMMAND_BAR: NAME, 11 | commandbar: NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/CustomerIO/constants.ts: -------------------------------------------------------------------------------- 1 | import { CUSTOMERIO_NAME as NAME, CUSTOMERIO_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'CustomerIO'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Customerio: NAME, 9 | 'Customer.io': NAME, 10 | 'CUSTOMER.IO': NAME, 11 | 'customer.io': NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Drip/constants.ts: -------------------------------------------------------------------------------- 1 | import { DRIP_NAME as NAME, DRIP_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Drip'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Drip: NAME, 9 | drip: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/GA/constants.ts: -------------------------------------------------------------------------------- 1 | import { GA_NAME as NAME, GA_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'GA'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | 'Google Analytics': NAME, 9 | GoogleAnalytics: NAME, 10 | 'GOOGLE ANALYTICS': NAME, 11 | 'google analytics': NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Gainsight_PX/constants.ts: -------------------------------------------------------------------------------- 1 | import { 2 | GAINSIGHT_PX_NAME as NAME, 3 | GAINSIGHT_PX_DISPLAY_NAME as DISPLAY_NAME, 4 | } from '../Destinations'; 5 | 6 | const DIR_NAME = 'Gainsight_PX'; 7 | 8 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 9 | const CNameMapping = { 10 | [NAME]: NAME, 11 | Gainsight_PX: NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/GoogleAds/constants.ts: -------------------------------------------------------------------------------- 1 | import { GOOGLEADS_NAME as NAME, GOOGLEADS_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'GoogleAds'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | 'Google Ads': NAME, 9 | GoogleAds: NAME, 10 | 'GOOGLE ADS': NAME, 11 | 'google ads': NAME, 12 | googleads: NAME, 13 | }; 14 | 15 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/GoogleTagManager/constants.ts: -------------------------------------------------------------------------------- 1 | import { GTM_NAME as NAME, GTM_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'GoogleTagManager'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | 'Google Tag Manager': NAME, 9 | 'google tag manager': NAME, 10 | 'googletag manager': NAME, 11 | googletagmanager: NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Heap/constants.ts: -------------------------------------------------------------------------------- 1 | import { HEAP_NAME as NAME, HEAP_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Heap'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Heap: NAME, 9 | heap: NAME, 10 | 'Heap.io': NAME, 11 | }; 12 | 13 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Hotjar/constants.ts: -------------------------------------------------------------------------------- 1 | import { HOTJAR_NAME as NAME, HOTJAR_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Hotjar'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Hotjar: NAME, 9 | hotjar: NAME, 10 | 'Hot Jar': NAME, 11 | 'hot jar': NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/HubSpot/constants.ts: -------------------------------------------------------------------------------- 1 | import { HS_NAME as NAME, HS_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'HubSpot'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Hubspot: NAME, 9 | HUBSPOT: NAME, 10 | 'hub spot': NAME, 11 | 'Hub Spot': NAME, 12 | 'Hub spot': NAME, 13 | }; 14 | 15 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/INTERCOM/constants.ts: -------------------------------------------------------------------------------- 1 | import { INTERCOM_NAME as NAME, INTERCOM_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'INTERCOM'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Intercom: NAME, 9 | intercom: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Iterable/constants.ts: -------------------------------------------------------------------------------- 1 | import { ITERABLE_NAME as NAME, ITERABLE_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Iterable'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Iterable: NAME, 9 | iterable: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/June/constants.ts: -------------------------------------------------------------------------------- 1 | import { JUNE_NAME as NAME, JUNE_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'June'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | June: NAME, 9 | june: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Keen/constants.ts: -------------------------------------------------------------------------------- 1 | import { KEEN_NAME as NAME, KEEN_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Keen'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Keen: NAME, 9 | 'Keen.io': NAME, 10 | keen: NAME, 11 | 'keen.io': NAME, 12 | }; 13 | 14 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Kissmetrics/constants.ts: -------------------------------------------------------------------------------- 1 | import { 2 | KISSMETRICS_NAME as NAME, 3 | KISSMETRICS_DISPLAY_NAME as DISPLAY_NAME, 4 | } from '../Destinations'; 5 | 6 | const DIR_NAME = 'Kissmetrics'; 7 | 8 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 9 | const CNameMapping = { 10 | [NAME]: NAME, 11 | Kissmetrics: NAME, 12 | kissmetrics: NAME, 13 | }; 14 | 15 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Klaviyo/constants.ts: -------------------------------------------------------------------------------- 1 | import { KLAVIYO_NAME as NAME, KLAVIYO_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Klaviyo'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Klaviyo: NAME, 9 | klaviyo: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/LiveChat/constants.ts: -------------------------------------------------------------------------------- 1 | import { LIVECHAT_NAME as NAME, LIVECHAT_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'LiveChat'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | LiveChat: NAME, 9 | Live_Chat: NAME, 10 | livechat: NAME, 11 | 'LIVE CHAT': NAME, 12 | 'Live Chat': NAME, 13 | 'live chat': NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Lotame/constants.ts: -------------------------------------------------------------------------------- 1 | import { LOTAME_NAME as NAME, LOTAME_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Lotame'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Lotame: NAME, 9 | lotame: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Lytics/constants.ts: -------------------------------------------------------------------------------- 1 | import { LYTICS_NAME as NAME, LYTICS_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Lytics'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Lytics: NAME, 9 | lytics: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Matomo/constants.ts: -------------------------------------------------------------------------------- 1 | import { MATOMO_NAME as NAME, MATOMO_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Matomo'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Matomo: NAME, 9 | matomo: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Mixpanel/constants.ts: -------------------------------------------------------------------------------- 1 | import { MP_NAME as NAME, MP_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Mixpanel'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | MIXPANEL: NAME, 9 | Mixpanel: NAME, 10 | 'MIX PANEL': NAME, 11 | 'Mix panel': NAME, 12 | 'Mix Panel': NAME, 13 | }; 14 | 15 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/MoEngage/constants.ts: -------------------------------------------------------------------------------- 1 | import { MOENGAGE_NAME as NAME, MOENGAGE_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'MoEngage'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | MoEngage: NAME, 9 | moengage: NAME, 10 | Moengage: NAME, 11 | 'Mo Engage': NAME, 12 | 'mo engage': NAME, 13 | 'Mo engage': NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Ninetailed/constants.ts: -------------------------------------------------------------------------------- 1 | import { NINETAILED_NAME as NAME, NINETAILED_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Ninetailed'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Ninetailed: NAME, 9 | ninetailed: NAME, 10 | NineTailed: NAME, 11 | }; 12 | 13 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Olark/constants.ts: -------------------------------------------------------------------------------- 1 | import { OLARK_NAME as NAME, OLARK_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Olark'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Olark: NAME, 9 | olark: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Optimizely/constants.ts: -------------------------------------------------------------------------------- 1 | import { OPTIMIZELY_NAME as NAME, OPTIMIZELY_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Optimizely'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Optimizely: NAME, 9 | optimizely: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Pendo/constants.ts: -------------------------------------------------------------------------------- 1 | import { PENDO_NAME as NAME, PENDO_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Pendo'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Pendo: NAME, 9 | pendo: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Posthog/constants.ts: -------------------------------------------------------------------------------- 1 | import { POSTHOG_NAME as NAME, POSTHOG_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Posthog'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | PostHog: NAME, 9 | Posthog: NAME, 10 | posthog: NAME, 11 | 'Post Hog': NAME, 12 | 'Post hog': NAME, 13 | 'post hog': NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/ProfitWell/constants.ts: -------------------------------------------------------------------------------- 1 | import { PROFITWELL_NAME as NAME, PROFITWELL_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'ProfitWell'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | ProfitWell: NAME, 9 | profitwell: NAME, 10 | Profitwell: NAME, 11 | 'Profit Well': NAME, 12 | 'profit well': NAME, 13 | 'Profit well': NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Qualaroo/constants.ts: -------------------------------------------------------------------------------- 1 | import { QUALAROO_NAME as NAME, QUALAROO_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Qualaroo'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Qualaroo: NAME, 9 | qualaroo: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Qualtrics/constants.ts: -------------------------------------------------------------------------------- 1 | import { QUALTRICS_NAME as NAME, QUALTRICS_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Qualtrics'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Qualtrics: NAME, 9 | qualtrics: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Refiner/constants.ts: -------------------------------------------------------------------------------- 1 | import { REFINER_NAME as NAME, REFINER_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Refiner'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Refiner: NAME, 9 | refiner: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Rockerbox/constants.ts: -------------------------------------------------------------------------------- 1 | import { ROCKERBOX_NAME as NAME, ROCKERBOX_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Rockerbox'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Rockerbox: NAME, 9 | rockerbox: NAME, 10 | RockerBox: NAME, 11 | 'Rocker box': NAME, 12 | 'rocker box': NAME, 13 | 'Rocker Box': NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/RollBar/constants.ts: -------------------------------------------------------------------------------- 1 | import { ROLLBAR_NAME as NAME, ROLLBAR_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'RollBar'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | RollBar: NAME, 9 | Roll_Bar: NAME, 10 | rollbar: NAME, 11 | Rollbar: NAME, 12 | 'ROLL BAR': NAME, 13 | 'Roll Bar': NAME, 14 | 'roll bar': NAME, 15 | }; 16 | 17 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 18 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Satismeter/constants.ts: -------------------------------------------------------------------------------- 1 | import { SATISMETER_NAME as NAME, SATISMETER_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Satismeter'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Satismeter: NAME, 9 | SatisMeter: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Sentry/constants.ts: -------------------------------------------------------------------------------- 1 | import { SENTRY_NAME as NAME, SENTRY_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Sentry'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | sentry: NAME, 9 | Sentry: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/SnapEngage/constants.ts: -------------------------------------------------------------------------------- 1 | import { SNAPENGAGE_NAME as NAME, SNAPENGAGE_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'SnapEngage'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | SnapEngage: NAME, 9 | Snap_Engage: NAME, 10 | snapengage: NAME, 11 | 'SNAP ENGAGE': NAME, 12 | 'Snap Engage': NAME, 13 | 'snap engage': NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/SpotifyPixel/constants.ts: -------------------------------------------------------------------------------- 1 | import { 2 | SPOTIFYPIXEL_NAME as NAME, 3 | SPOTIFYPIXEL_DISPLAY_NAME as DISPLAY_NAME, 4 | } from '../Destinations'; 5 | 6 | const DIR_NAME = 'SpotifyPixel'; 7 | 8 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 9 | const CNameMapping = { 10 | [NAME]: NAME, 11 | 'Spotify Pixel': NAME, 12 | 'spotify pixel': NAME, 13 | SPOTIFY_PIXEL: NAME, 14 | }; 15 | 16 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Sprig/constants.ts: -------------------------------------------------------------------------------- 1 | import { SPRIG_NAME as NAME, SPRIG_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Sprig'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Sprig: NAME, 9 | sprig: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Vero/constants.ts: -------------------------------------------------------------------------------- 1 | import { VERO_NAME as NAME, VERO_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Vero'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Vero: NAME, 9 | vero: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/Woopra/constants.ts: -------------------------------------------------------------------------------- 1 | import { WOOPRA_NAME as NAME, WOOPRA_DISPLAY_NAME as DISPLAY_NAME } from '../Destinations'; 2 | 3 | const DIR_NAME = 'Woopra'; 4 | 5 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 6 | const CNameMapping = { 7 | [NAME]: NAME, 8 | Woopra: NAME, 9 | woopra: NAME, 10 | }; 11 | 12 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrations/YandexMetrica/constants.ts: -------------------------------------------------------------------------------- 1 | import { 2 | YANDEX_METRICA_NAME as NAME, 3 | YANDEX_METRICA_DISPLAY_NAME as DISPLAY_NAME, 4 | } from '../Destinations'; 5 | 6 | const DIR_NAME = 'YandexMetrica'; 7 | 8 | const DISPLAY_NAME_TO_DIR_NAME_MAP = { [DISPLAY_NAME]: DIR_NAME }; 9 | const CNameMapping = { 10 | [NAME]: NAME, 11 | Yandexmetrica: NAME, 12 | yandexmetrica: NAME, 13 | yandexMetrica: NAME, 14 | YandexMetrica: NAME, 15 | }; 16 | 17 | export { NAME, CNameMapping, DISPLAY_NAME_TO_DIR_NAME_MAP, DISPLAY_NAME, DIR_NAME }; 18 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/integrationsConfig.ts: -------------------------------------------------------------------------------- 1 | const DEFAULT_INTEGRATIONS_CONFIG = { 2 | All: true, 3 | }; 4 | 5 | export { DEFAULT_INTEGRATIONS_CONFIG }; 6 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/metrics.ts: -------------------------------------------------------------------------------- 1 | const METRICS_PAYLOAD_VERSION = '1'; 2 | 3 | export { METRICS_PAYLOAD_VERSION }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/storages.ts: -------------------------------------------------------------------------------- 1 | import type { StorageType } from '../types/Storage'; 2 | 3 | const COOKIE_STORAGE: StorageType = 'cookieStorage'; 4 | const LOCAL_STORAGE: StorageType = 'localStorage'; 5 | const SESSION_STORAGE: StorageType = 'sessionStorage'; 6 | const MEMORY_STORAGE: StorageType = 'memoryStorage'; 7 | const NO_STORAGE: StorageType = 'none'; 8 | 9 | export { COOKIE_STORAGE, LOCAL_STORAGE, SESSION_STORAGE, MEMORY_STORAGE, NO_STORAGE }; 10 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/constants/timeouts.ts: -------------------------------------------------------------------------------- 1 | const DEFAULT_EXT_SRC_LOAD_TIMEOUT_MS = 10 * 1000; // 10 seconds 2 | 3 | export { DEFAULT_EXT_SRC_LOAD_TIMEOUT_MS }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as constants from './constants'; 2 | export * from './services/ExternalSrcLoader'; 3 | export * as utilities from './utilities'; 4 | export * as v1_1Utils from './v1.1/utils'; 5 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/services/ExternalSrcLoader/index.ts: -------------------------------------------------------------------------------- 1 | export { ExternalSrcLoader } from './ExternalSrcLoader'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/types/ApiObject.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Represents a generic object in the APIs 3 | * Use for parameters like properties, traits etc. 4 | */ 5 | export type ApiObject = { 6 | [index: string]: 7 | | string 8 | | number 9 | | boolean 10 | | ApiObject 11 | | null 12 | | Date 13 | | (string | number | boolean | null | Date | ApiObject | undefined)[] 14 | | undefined; 15 | }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/types/ApplicationLifecycle.ts: -------------------------------------------------------------------------------- 1 | export type LifecycleStatus = 2 | | 'mounted' 3 | | 'browserCapabilitiesReady' 4 | | 'configured' 5 | | 'pluginsLoading' 6 | | 'pluginsReady' 7 | | 'initialized' 8 | | 'loaded' 9 | | 'destinationsLoading' 10 | | 'destinationsReady' 11 | | 'ready' 12 | | 'readyExecuted'; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/types/Nullable.ts: -------------------------------------------------------------------------------- 1 | export type Nullable = T | null; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/types/Session.ts: -------------------------------------------------------------------------------- 1 | export type SessionInfo = { 2 | autoTrack?: boolean; 3 | manualTrack?: boolean; 4 | timeout?: number; 5 | expiresAt?: number; 6 | id?: number; 7 | sessionStart?: boolean; 8 | cutOff?: { 9 | enabled?: boolean; 10 | duration?: number; 11 | expiresAt?: number; 12 | }; 13 | }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/types/Source.ts: -------------------------------------------------------------------------------- 1 | export type StatsCollection = { 2 | errors: { 3 | enabled: boolean; 4 | provider?: string; 5 | }; 6 | metrics: { 7 | enabled: boolean; 8 | }; 9 | }; 10 | 11 | export type SourceConfig = { 12 | statsCollection?: StatsCollection; 13 | }; 14 | 15 | export type Source = { 16 | id: string; 17 | config?: SourceConfig; 18 | name: string; 19 | workspaceId: string; 20 | }; 21 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/types/UserSessionStorage.ts: -------------------------------------------------------------------------------- 1 | export type UserSessionKey = 2 | | 'userId' 3 | | 'userTraits' 4 | | 'anonymousId' 5 | | 'groupId' 6 | | 'groupTraits' 7 | | 'initialReferrer' 8 | | 'initialReferringDomain' 9 | | 'sessionInfo' 10 | | 'authToken'; 11 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/utilities/crypto.ts: -------------------------------------------------------------------------------- 1 | import { isFunction, isNullOrUndefined } from './checks'; 2 | 3 | const hasCrypto = (): boolean => 4 | !isNullOrUndefined(globalThis.crypto) && isFunction(globalThis.crypto.getRandomValues); 5 | 6 | export { hasCrypto }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/utilities/detect.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Determines if the SDK is running inside a chrome extension 3 | * @returns boolean 4 | */ 5 | const isSDKRunningInChromeExtension = (): boolean => !!(window as any).chrome?.runtime?.id; 6 | 7 | export { isSDKRunningInChromeExtension }; 8 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/utilities/http.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This function is used to determine if the input status code is retryable. 3 | * @param status - The status code. 4 | * @returns True if the status code is not 4xx (except 429), false otherwise. 5 | */ 6 | const isErrRetryable = (status: number) => { 7 | if (status === 429) { 8 | return true; 9 | } 10 | 11 | return !(status >= 400 && status < 500); 12 | }; 13 | 14 | export { isErrRetryable }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/utilities/timestamp.ts: -------------------------------------------------------------------------------- 1 | const getFormattedTimestamp = (date: Date): string => date.toISOString(); 2 | 3 | /** 4 | * To get the current timestamp in ISO string format 5 | * @returns ISO formatted timestamp string 6 | */ 7 | const getCurrentTimeFormatted = (): string => getFormattedTimestamp(new Date()); 8 | 9 | export { getCurrentTimeFormatted, getFormattedTimestamp }; 10 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/utilities/timezone.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * To get the timezone of the user 3 | * 4 | * @returns string 5 | */ 6 | const getTimezone = (): string => { 7 | // Not susceptible to super-linear backtracking 8 | // eslint-disable-next-line sonarjs/slow-regex 9 | const timezone = /([A-Z]+[+-]\d+)/.exec(new Date().toString()); 10 | return timezone?.[1] ? timezone[1] : 'NA'; 11 | }; 12 | 13 | export { getTimezone }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/utilities/uuId.ts: -------------------------------------------------------------------------------- 1 | import { v4 as uuidSecure } from '@lukeed/uuid/secure'; 2 | import { v4 as uuid } from '@lukeed/uuid'; 3 | import { hasCrypto } from './crypto'; 4 | 5 | const generateUUID = (): string => { 6 | if (hasCrypto()) { 7 | return uuidSecure(); 8 | } 9 | 10 | return uuid(); 11 | }; 12 | 13 | export { generateUUID }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/v1.1/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * as storage from './storage'; 2 | export * as constants from './constants'; 3 | export * as errorHandler from './errorHandler'; 4 | export * as logUtil from './logUtil'; 5 | export * as notifyError from './notifyError'; 6 | export * as ObjectUtils from './ObjectUtils'; 7 | export * as ScriptLoader from './ScriptLoader'; 8 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/v1.1/utils/notifyError.js: -------------------------------------------------------------------------------- 1 | import { ERROR_REPORTING_SERVICE_GLOBAL_KEY_NAME } from './constants'; 2 | 3 | /** 4 | * This function is to send handled errors to available error reporting client 5 | * 6 | * @param {Error} error Error instance from handled error 7 | */ 8 | const notifyError = error => { 9 | const errorReportingClient = window.RudderStackGlobals?.[ERROR_REPORTING_SERVICE_GLOBAL_KEY_NAME]; 10 | if (errorReportingClient && error instanceof Error) { 11 | errorReportingClient.notify(error); 12 | } 13 | }; 14 | 15 | export { notifyError }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-common/src/v1.1/utils/storage/index.js: -------------------------------------------------------------------------------- 1 | import { Storage as StorageFactory } from './storage'; 2 | 3 | const Storage = new StorageFactory(); 4 | 5 | export { Storage }; 6 | -------------------------------------------------------------------------------- /packages/analytics-js-common/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "rootDir": "./src/", 5 | "target": "es2018", 6 | "declarationDir": "./dist/npm", 7 | "outDir": "./dist/npm", 8 | "emitDeclarationOnly": false, 9 | "sourceMap": false, 10 | "declarationMap": false 11 | }, 12 | "include": ["./src/**/*", "../../types/**/*"], 13 | "references": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/analytics-js-cookies/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/analytics-js-cookies/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [0.4.25](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-cookies@0.4.24...@rudderstack/analytics-js-cookies@0.4.25) (2025-05-09) 2 | 3 | ### Dependency Updates 4 | 5 | * `@rudderstack/analytics-js-common` updated to version `3.19.0` 6 | -------------------------------------------------------------------------------- /packages/analytics-js-cookies/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/analytics-js-cookies/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: '@rudderstack/analytics-js-cookies', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coverageThreshold: { 7 | global: { 8 | branches: 0, 9 | functions: 0, 10 | lines: 0, 11 | statements: 0, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-cookies/src/constants/logMessages.ts: -------------------------------------------------------------------------------- 1 | const COOKIE_DATA_ENCODING_ERROR = `Failed to encode the cookie data.`; 2 | 3 | export { COOKIE_DATA_ENCODING_ERROR }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-cookies/src/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | getDecryptedValueBrowser, 3 | getDecryptedCookieBrowser, 4 | getEncryptedValueBrowser, 5 | getDecryptedValue, 6 | getEncryptedValue, 7 | } from './cookiesUtilities'; 8 | 9 | export { 10 | userIdKey, 11 | userTraitsKey, 12 | anonymousUserIdKey, 13 | groupIdKey, 14 | groupTraitsKey, 15 | pageInitialReferrerKey, 16 | pageInitialReferringDomainKey, 17 | sessionInfoKey, 18 | authTokenKey, 19 | } from './constants/cookies'; 20 | -------------------------------------------------------------------------------- /packages/analytics-js-cookies/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts" 6 | }, 7 | "include": [ 8 | "./package.json", 9 | "./src/**/*", 10 | "../../types/**/*", 11 | "../analytics-js-common/src/**/*" 12 | ], 13 | "references": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/.size-limit.js: -------------------------------------------------------------------------------- 1 | /** 2 | * DO NOT EDIT the size limits configured in this file. 3 | * Should you update them, please contact CODEOWNERS. 4 | */ 5 | module.exports = [ 6 | { 7 | name: 'All Integrations - Legacy - CDN', 8 | path: 'dist/cdn/legacy/js-integrations/*.min.js', 9 | limit: '97 KiB', 10 | }, 11 | { 12 | name: 'All Integrations - Modern - CDN', 13 | path: 'dist/cdn/modern/js-integrations/*.min.js', 14 | limit: '93.5 KiB', 15 | }, 16 | ]; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [3.14.1](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-integrations@3.14.0...@rudderstack/analytics-js-integrations@3.14.1) (2025-05-26) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * use klaviyo push function to send events ([#2190](https://github.com/rudderlabs/rudder-sdk-js/issues/2190)) ([7691d9d](https://github.com/rudderlabs/rudder-sdk-js/commit/7691d9d3ecdf7f35b0719291518e57535d1151e4)) 7 | 8 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/__fixtures__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-integrations/__fixtures__/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-integrations/__mocks__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-integrations/__mocks__/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-integrations/__tests__/integrations/BingAds/__fixtures__/data.js: -------------------------------------------------------------------------------- 1 | const event = 'Add to Cart'; 2 | const query = 'Sport T-Shirt'; 3 | const products = [ 4 | { 5 | product_id: '123', 6 | sku: 'G-14', 7 | price: 14.99, 8 | quantity: 2, 9 | }, 10 | { 11 | product_id: '345', 12 | sku: 'G-32', 13 | price: 3.99, 14 | }, 15 | ]; 16 | 17 | export { event, query, products }; 18 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/__tests__/integrations/PinterestTag/__fixtures__/data.js: -------------------------------------------------------------------------------- 1 | const eventMapping = [ 2 | { 3 | from: 'ABC Searched', 4 | to: 'WatchVideo', 5 | }, 6 | { 7 | from: 'ABC Searched', 8 | to: 'ViewCategory', 9 | }, 10 | ]; 11 | 12 | const googleAdsConfigs = [ 13 | { 14 | eventsMapping: eventMapping, 15 | }, 16 | { 17 | sendAsCustomEvent: true, 18 | }, 19 | { 20 | sendAsCustomEvent: false, 21 | }, 22 | ]; 23 | 24 | export { eventMapping, googleAdsConfigs }; 25 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-integrations/public/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/ActiveCampaign/index.js: -------------------------------------------------------------------------------- 1 | export { default as ActiveCampaign } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/AdobeAnalytics/index.js: -------------------------------------------------------------------------------- 1 | export { default as AdobeAnalytics } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Adroll/index.js: -------------------------------------------------------------------------------- 1 | export { default as Adroll } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Amplitude/index.js: -------------------------------------------------------------------------------- 1 | export { default as Amplitude } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Appcues/index.js: -------------------------------------------------------------------------------- 1 | export { default as Appcues } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Axeptio/index.js: -------------------------------------------------------------------------------- 1 | export { default as Axeptio } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Axeptio/nativeSdkLoader.js: -------------------------------------------------------------------------------- 1 | import { LOAD_ORIGIN } from '@rudderstack/analytics-js-common/v1.1/utils/constants'; 2 | 3 | function loadNativeSdk(d, s, clientId) { 4 | window.axeptioSettings = { 5 | clientId, 6 | }; 7 | var t = d.getElementsByTagName(s)[0], 8 | e = d.createElement(s); 9 | e.async = true; 10 | e.src = '//static.axept.io/sdk.js'; 11 | e.setAttribute('data-loader', LOAD_ORIGIN), t.parentNode.insertBefore(e, t); 12 | } 13 | 14 | export { loadNativeSdk }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Axeptio/utils.js: -------------------------------------------------------------------------------- 1 | import { isDefinedAndNotNull } from '../../utils/utils'; 2 | 3 | /** 4 | * This function is used to trigger a callback. 5 | * @param {*} event name fo the event triggered 6 | * @param {*} payload payload of the triggered event 7 | * @param {*} analytics rudderanalytics object 8 | */ 9 | const makeACall = (event, payload, analytics) => { 10 | if (isDefinedAndNotNull(payload)) { 11 | analytics.track(event, payload); 12 | } else { 13 | analytics.track(event); 14 | } 15 | }; 16 | export default makeACall; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/BingAds/index.js: -------------------------------------------------------------------------------- 1 | export { default as BingAds } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Braze/index.js: -------------------------------------------------------------------------------- 1 | export { default as Braze } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Bugsnag/index.js: -------------------------------------------------------------------------------- 1 | export { default as Bugsnag } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Chartbeat/index.js: -------------------------------------------------------------------------------- 1 | export { default as Chartbeat } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Chartbeat/nativeSdkLoader.js: -------------------------------------------------------------------------------- 1 | import { ScriptLoader } from '@rudderstack/analytics-js-common/v1.1/utils/ScriptLoader'; 2 | 3 | function loadNativeSdk(script) { 4 | ScriptLoader('chatbeat', `//static.chartbeat.com/js/${script}`); 5 | } 6 | 7 | export { loadNativeSdk }; 8 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Clevertap/index.js: -------------------------------------------------------------------------------- 1 | export { default as Clevertap } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/CommandBar/index.js: -------------------------------------------------------------------------------- 1 | export { default as CommandBar } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/ConvertFlow/index.js: -------------------------------------------------------------------------------- 1 | export { default as ConvertFlow } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Criteo/index.js: -------------------------------------------------------------------------------- 1 | export { default as Criteo } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/CustomerIO/index.js: -------------------------------------------------------------------------------- 1 | export { default as CustomerIO } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/DCMFloodlight/index.js: -------------------------------------------------------------------------------- 1 | export { default as DCMFloodlight } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Drip/index.js: -------------------------------------------------------------------------------- 1 | export { default as Drip } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Drip/nativeSdkLoader.js: -------------------------------------------------------------------------------- 1 | import { ScriptLoader } from '@rudderstack/analytics-js-common/v1.1/utils/ScriptLoader'; 2 | 3 | function loadNativeSdk(accountId) { 4 | window._dcq = window._dcq || []; 5 | window._dcs = window._dcs || {}; 6 | window._dcs.account = accountId; 7 | ScriptLoader('drip', `//tag.getdrip.com/${window._dcs.account}.js`); 8 | } 9 | 10 | export { loadNativeSdk }; 11 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Engage/index.js: -------------------------------------------------------------------------------- 1 | export { default as Engage } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/FacebookPixel/index.js: -------------------------------------------------------------------------------- 1 | export { default as FacebookPixel } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Fullstory/index.js: -------------------------------------------------------------------------------- 1 | export { default as Fullstory } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/GA/index.js: -------------------------------------------------------------------------------- 1 | export { default as GA } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/GA360/index.js: -------------------------------------------------------------------------------- 1 | export { default as GA360 } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/GA4/index.js: -------------------------------------------------------------------------------- 1 | export { default as GA4 } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/GA4_V2/index.js: -------------------------------------------------------------------------------- 1 | export { default as GA4_V2 } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Gainsight_PX/index.js: -------------------------------------------------------------------------------- 1 | export { default as Gainsight_PX } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/GoogleAds/index.js: -------------------------------------------------------------------------------- 1 | export { default as GoogleAds } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/GoogleOptimize/index.js: -------------------------------------------------------------------------------- 1 | export { default as GoogleOptimize } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/GoogleTagManager/index.js: -------------------------------------------------------------------------------- 1 | export { default as GoogleTagManager } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Heap/index.js: -------------------------------------------------------------------------------- 1 | export { default as Heap } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Hotjar/index.js: -------------------------------------------------------------------------------- 1 | export { default as Hotjar } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/HubSpot/index.js: -------------------------------------------------------------------------------- 1 | export { default as HubSpot } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/INTERCOM/index.js: -------------------------------------------------------------------------------- 1 | export { default as INTERCOM } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Iterable/index.js: -------------------------------------------------------------------------------- 1 | export { default as Iterable } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/June/index.js: -------------------------------------------------------------------------------- 1 | export { default as June } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Keen/index.js: -------------------------------------------------------------------------------- 1 | export { default as Keen } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Kissmetrics/index.js: -------------------------------------------------------------------------------- 1 | export { default as Kissmetrics } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Klaviyo/index.js: -------------------------------------------------------------------------------- 1 | export { default as Klaviyo } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/LaunchDarkly/index.js: -------------------------------------------------------------------------------- 1 | export { default as LaunchDarkly } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Lemnisk/index.js: -------------------------------------------------------------------------------- 1 | export { default as Lemnisk } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/LinkedInInsightTag/index.js: -------------------------------------------------------------------------------- 1 | export { default as LinkedInInsightTag } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/LiveChat/index.js: -------------------------------------------------------------------------------- 1 | export { default as LiveChat } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Lotame/index.js: -------------------------------------------------------------------------------- 1 | export { default as Lotame } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Lytics/index.js: -------------------------------------------------------------------------------- 1 | export { default as Lytics } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Matomo/index.js: -------------------------------------------------------------------------------- 1 | export { default as Matomo } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/MicrosoftClarity/index.js: -------------------------------------------------------------------------------- 1 | export { default as MicrosoftClarity } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Mixpanel/index.js: -------------------------------------------------------------------------------- 1 | export { default as Mixpanel } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/MoEngage/index.js: -------------------------------------------------------------------------------- 1 | export { default as MoEngage } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Mouseflow/index.js: -------------------------------------------------------------------------------- 1 | export { default as Mouseflow } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Ninetailed/index.js: -------------------------------------------------------------------------------- 1 | export { default as Ninetailed } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Olark/index.js: -------------------------------------------------------------------------------- 1 | export { default as Olark } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Optimizely/index.js: -------------------------------------------------------------------------------- 1 | export { default as Optimizely } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Pendo/index.js: -------------------------------------------------------------------------------- 1 | export { default as Pendo } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/PinterestTag/index.js: -------------------------------------------------------------------------------- 1 | export { default as PinterestTag } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Podsights/index.js: -------------------------------------------------------------------------------- 1 | export { default as Podsights } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/PostAffiliatePro/index.js: -------------------------------------------------------------------------------- 1 | export { default as PostAffiliatePro } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Posthog/index.js: -------------------------------------------------------------------------------- 1 | export { default as Posthog } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/ProfitWell/index.js: -------------------------------------------------------------------------------- 1 | export { default as ProfitWell } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Qualaroo/index.js: -------------------------------------------------------------------------------- 1 | export { default as Qualaroo } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Qualtrics/index.js: -------------------------------------------------------------------------------- 1 | export { default as Qualtrics } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/QuantumMetric/index.js: -------------------------------------------------------------------------------- 1 | export { default as QuantumMetric } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/QuoraPixel/index.js: -------------------------------------------------------------------------------- 1 | export { default as QuoraPixel } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/RedditPixel/index.js: -------------------------------------------------------------------------------- 1 | export { default as RedditPixel } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Refiner/index.js: -------------------------------------------------------------------------------- 1 | export { default as Refiner } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Rockerbox/index.js: -------------------------------------------------------------------------------- 1 | export { default as Rockerbox } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/RollBar/index.js: -------------------------------------------------------------------------------- 1 | export { default as RollBar } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Satismeter/index.js: -------------------------------------------------------------------------------- 1 | export { default as Satismeter } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Sendinblue/index.js: -------------------------------------------------------------------------------- 1 | export { default as Sendinblue } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Sentry/index.js: -------------------------------------------------------------------------------- 1 | export { default as Sentry } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Shynet/index.js: -------------------------------------------------------------------------------- 1 | export { default as Shynet } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/SnapEngage/index.js: -------------------------------------------------------------------------------- 1 | export { default as SnapEngage } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/SnapPixel/index.js: -------------------------------------------------------------------------------- 1 | export { default as SnapPixel } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/SpotifyPixel/index.js: -------------------------------------------------------------------------------- 1 | export { default as SpotifyPixel } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Sprig/index.js: -------------------------------------------------------------------------------- 1 | export { default as Sprig } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/TVSquared/index.js: -------------------------------------------------------------------------------- 1 | export { default as TVSquared } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/TiktokAds/index.js: -------------------------------------------------------------------------------- 1 | export { default as TiktokAds } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Userpilot/index.js: -------------------------------------------------------------------------------- 1 | export { default as Userpilot } from './browser'; -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/VWO/index.js: -------------------------------------------------------------------------------- 1 | export { default as VWO } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Vero/index.js: -------------------------------------------------------------------------------- 1 | export { default as Vero } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/Woopra/index.js: -------------------------------------------------------------------------------- 1 | export { default as Woopra } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/XPixel/index.js: -------------------------------------------------------------------------------- 1 | export { default as XPixel } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/integrations/YandexMetrica/index.js: -------------------------------------------------------------------------------- 1 | export { default as YandexMetrica } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/src/utils/constants.js: -------------------------------------------------------------------------------- 1 | const GENERIC_TRUE_VALUES = ['true', 'True', 'TRUE', 't', 'T', '1']; 2 | const GENERIC_FALSE_VALUES = ['false', 'False', 'FALSE', 'f', 'F', '0']; 3 | 4 | export { GENERIC_TRUE_VALUES, GENERIC_FALSE_VALUES }; 5 | -------------------------------------------------------------------------------- /packages/analytics-js-integrations/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts" 6 | }, 7 | "include": ["./package.json", "./src/**/*", "../../types/**/*", "../analytics-js-common/src/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 20, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/__fixtures__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-plugins/__fixtures__/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-plugins/__fixtures__/msw.server.js: -------------------------------------------------------------------------------- 1 | import { setupServer } from 'msw/node'; 2 | import { handlers } from './msw.handlers'; 3 | 4 | const server = setupServer(...handlers); 5 | 6 | export { server }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/__tests__/beaconQueue/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-plugins/__tests__/beaconQueue/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-plugins/__tests__/externalAnonymousId/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-plugins/__tests__/externalAnonymousId/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-plugins/__tests__/googleLinker/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-plugins/__tests__/googleLinker/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-plugins/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: '@rudderstack/analytics-js-plugins', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coveragePathIgnorePatterns: ['src/errorReporting/event'], 7 | coverageThreshold: { 8 | global: { 9 | branches: 0, 10 | functions: 0, 11 | lines: 0, 12 | statements: 0, 13 | }, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-plugins/public/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/beaconQueue/types.ts: -------------------------------------------------------------------------------- 1 | import type { RudderEvent } from '@rudderstack/analytics-js-common/types/Event'; 2 | 3 | export type BeaconQueueItemData = { 4 | event: RudderEvent; 5 | }; 6 | 7 | export type BeaconQueueBatchItemData = BeaconQueueItemData[]; 8 | 9 | export type BeaconBatchData = { 10 | batch: RudderEvent[]; 11 | sentAt: string; 12 | }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/customConsentManager/constants.ts: -------------------------------------------------------------------------------- 1 | const CUSTOM_CONSENT_MANAGER_PLUGIN = 'CustomConsentManagerPlugin'; 2 | 3 | export { CUSTOM_CONSENT_MANAGER_PLUGIN }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/customConsentManager/logMessages.ts: -------------------------------------------------------------------------------- 1 | const DESTINATION_CONSENT_STATUS_ERROR = `Failed to determine the consent status for the destination. Please check the destination configuration and try again.`; 2 | 3 | export { DESTINATION_CONSENT_STATUS_ERROR }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/deviceModeDestinations/constants.ts: -------------------------------------------------------------------------------- 1 | const READY_CHECK_TIMEOUT_MS = 11 * 1000; // 11 seconds 2 | const SCRIPT_LOAD_TIMEOUT_MS = 10 * 1000; // 10 seconds 3 | const READY_CHECK_INTERVAL_MS = 100; // 100 milliseconds 4 | 5 | const DEVICE_MODE_DESTINATIONS_PLUGIN = 'DeviceModeDestinationsPlugin'; 6 | 7 | export { 8 | READY_CHECK_TIMEOUT_MS, 9 | DEVICE_MODE_DESTINATIONS_PLUGIN, 10 | SCRIPT_LOAD_TIMEOUT_MS, 11 | READY_CHECK_INTERVAL_MS, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/deviceModeTransformation/constants.ts: -------------------------------------------------------------------------------- 1 | const DEFAULT_TRANSFORMATION_QUEUE_OPTIONS = { 2 | minRetryDelay: 500, 3 | backoffFactor: 2, 4 | maxAttempts: 3, 5 | }; 6 | 7 | const REQUEST_TIMEOUT_MS = 10 * 1000; // 10 seconds 8 | 9 | const QUEUE_NAME = 'rudder'; 10 | const DMT_PLUGIN = 'DeviceModeTransformationPlugin'; 11 | 12 | export { DEFAULT_TRANSFORMATION_QUEUE_OPTIONS, REQUEST_TIMEOUT_MS, QUEUE_NAME, DMT_PLUGIN }; 13 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/externalAnonymousId/constants.ts: -------------------------------------------------------------------------------- 1 | const externallyLoadedSessionStorageKeys = { 2 | segment: 'ajs_anonymous_id', 3 | }; 4 | 5 | export { externallyLoadedSessionStorageKeys }; 6 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/googleLinker/constants.ts: -------------------------------------------------------------------------------- 1 | export const AMP_LINKER_ANONYMOUS_ID_KEY = 'rs_amp_id'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/googleLinker/userLib.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * An interface to fetch user device details. 3 | */ 4 | const USER_INTERFACE = { 5 | /** 6 | * @returns {string} user language 7 | */ 8 | getUserLanguage: (): string => navigator?.language, 9 | 10 | /** 11 | * @returns {string} userAgent 12 | */ 13 | getUserAgent: (): string => navigator?.userAgent, 14 | }; 15 | 16 | export { USER_INTERFACE }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/iubendaConsentManager/constants.ts: -------------------------------------------------------------------------------- 1 | const IUBENDA_CONSENT_MANAGER_PLUGIN = 'IubendaConsentManagerPlugin'; 2 | const IUBENDA_CONSENT_EXAMPLE_COOKIE_NAME = '_iub_cs-252372'; 3 | const IUBENDA_CONSENT_COOKIE_NAME_PATTERN = /^_iub_cs-\d+$/; 4 | export { 5 | IUBENDA_CONSENT_MANAGER_PLUGIN, 6 | IUBENDA_CONSENT_COOKIE_NAME_PATTERN, 7 | IUBENDA_CONSENT_EXAMPLE_COOKIE_NAME, 8 | }; 9 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/iubendaConsentManager/types.ts: -------------------------------------------------------------------------------- 1 | export type IubendaConsentCookieData = { 2 | timestamp: string; // ISO 8601 format date string 3 | version: string; // Version number in string format 4 | purposes: IubendaConsentData; // Object holding purpose consent data 5 | id: number; // Unique ID number 6 | cons: Consent; // Additional consent details 7 | }; 8 | 9 | export type IubendaConsentData = { 10 | [purposeId: string]: boolean; 11 | }; 12 | 13 | export type Consent = { 14 | rand: string; // A random string associated with consent 15 | }; 16 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/ketchConsentManager/constants.ts: -------------------------------------------------------------------------------- 1 | const KETCH_CONSENT_MANAGER_PLUGIN = 'KetchConsentManagerPlugin'; 2 | const KETCH_CONSENT_COOKIE_NAME_V1 = '_ketch_consent_v1_'; 3 | 4 | export { KETCH_CONSENT_MANAGER_PLUGIN, KETCH_CONSENT_COOKIE_NAME_V1 }; 5 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/ketchConsentManager/types.ts: -------------------------------------------------------------------------------- 1 | export type KetchPurpose = { 2 | status: string; 3 | }; 4 | 5 | export type KetchConsentCookieData = { 6 | [purposeCode: string]: KetchPurpose | undefined; 7 | }; 8 | 9 | export type KetchConsentData = { 10 | [purposeCode: string]: boolean; 11 | }; 12 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/nativeDestinationQueue/constants.ts: -------------------------------------------------------------------------------- 1 | const DEFAULT_QUEUE_OPTIONS = { 2 | maxItems: 100, 3 | }; 4 | 5 | const QUEUE_NAME = 'rudder_destinations_events'; 6 | 7 | const NATIVE_DESTINATION_QUEUE_PLUGIN = 'NativeDestinationQueuePlugin'; 8 | 9 | export { DEFAULT_QUEUE_OPTIONS, QUEUE_NAME, NATIVE_DESTINATION_QUEUE_PLUGIN }; 10 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/oneTrustConsentManager/constants.ts: -------------------------------------------------------------------------------- 1 | const ONETRUST_CONSENT_MANAGER_PLUGIN = 'OneTrustConsentManagerPlugin'; 2 | 3 | export { ONETRUST_CONSENT_MANAGER_PLUGIN }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/oneTrustConsentManager/types.ts: -------------------------------------------------------------------------------- 1 | export type OneTrustGroup = { 2 | CustomGroupId: string; 3 | GroupName: string; 4 | }; 5 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/storageEncryptionLegacy/constants.ts: -------------------------------------------------------------------------------- 1 | export const ENCRYPTION_PREFIX_V1 = 'RudderEncrypt:'; 2 | export const ENCRYPTION_KEY_V1 = 'Rudder'; 3 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/storageMigrator/constants.ts: -------------------------------------------------------------------------------- 1 | const STORAGE_MIGRATOR_PLUGIN = 'StorageMigratorPlugin'; 2 | 3 | export { STORAGE_MIGRATOR_PLUGIN }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/storageMigrator/logMessages.ts: -------------------------------------------------------------------------------- 1 | const STORAGE_MIGRATION_ERROR = (key: string): string => 2 | `Failed to retrieve or parse data for ${key} from storage.`; 3 | 4 | export { STORAGE_MIGRATION_ERROR }; 5 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/utilities/constants.ts: -------------------------------------------------------------------------------- 1 | const EVENT_PAYLOAD_SIZE_BYTES_LIMIT = 32 * 1024; // 32 KB 2 | 3 | export { EVENT_PAYLOAD_SIZE_BYTES_LIMIT }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/xhrQueue/constants.ts: -------------------------------------------------------------------------------- 1 | const DEFAULT_RETRY_QUEUE_OPTIONS = { 2 | maxRetryDelay: 360000, 3 | minRetryDelay: 1000, 4 | backoffFactor: 2, 5 | maxAttempts: 10, 6 | maxItems: 100, 7 | }; 8 | 9 | const REQUEST_TIMEOUT_MS = 30 * 1000; // 30 seconds 10 | 11 | const DATA_PLANE_API_VERSION = 'v1'; 12 | 13 | const QUEUE_NAME = 'rudder'; 14 | 15 | const XHR_QUEUE_PLUGIN = 'XhrQueuePlugin'; 16 | 17 | export { 18 | DEFAULT_RETRY_QUEUE_OPTIONS, 19 | REQUEST_TIMEOUT_MS, 20 | DATA_PLANE_API_VERSION, 21 | QUEUE_NAME, 22 | XHR_QUEUE_PLUGIN, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/xhrQueue/logMessages.ts: -------------------------------------------------------------------------------- 1 | import { LOG_CONTEXT_SEPARATOR } from '../shared-chunks/common'; 2 | 3 | const EVENT_DELIVERY_FAILURE_ERROR_PREFIX = (context: string, originalErrorMsg: string): string => 4 | `${context}${LOG_CONTEXT_SEPARATOR}Failed to deliver event(s). Cause: ${originalErrorMsg}.`; 5 | 6 | export { EVENT_DELIVERY_FAILURE_ERROR_PREFIX }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/src/xhrQueue/types.ts: -------------------------------------------------------------------------------- 1 | import type { RudderEvent } from '@rudderstack/analytics-js-common/types/Event'; 2 | 3 | export type XHRQueueItemData = { 4 | url: string; 5 | headers: Record; 6 | event: RudderEvent; 7 | }; 8 | 9 | export type XHRQueueBatchItemData = XHRQueueItemData[]; 10 | 11 | export type XHRRetryQueueItemData = XHRQueueItemData | XHRQueueBatchItemData; 12 | 13 | export type XHRBatchPayload = { 14 | batch: RudderEvent[]; 15 | sentAt: string; 16 | }; 17 | -------------------------------------------------------------------------------- /packages/analytics-js-plugins/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts" 6 | }, 7 | "include": [ 8 | "./package.json", 9 | "./src/**/*", 10 | "../../types/**/*", 11 | "../analytics-js-common/src/**/*", 12 | "../analytics-js-cookies/src/**/*", 13 | "../analytics-js/src/**/*" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 20, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [3.2.25](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-service-worker@3.2.24...@rudderstack/analytics-js-service-worker@3.2.25) (2025-05-09) 2 | 3 | ### Dependency Updates 4 | 5 | * `@rudderstack/analytics-js-common` updated to version `3.19.0` 6 | -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/__fixtures__/msw.server.ts: -------------------------------------------------------------------------------- 1 | import { setupServer } from 'msw/node'; 2 | import { http, HttpResponse } from 'msw'; 3 | import { dummyDataplaneHost } from './fixtures'; 4 | 5 | const server = setupServer( 6 | http.post(`${dummyDataplaneHost}/v1/batch`, () => { 7 | return new HttpResponse(null, { 8 | status: 200, 9 | }); 10 | }), 11 | ); 12 | 13 | export { server }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/__mocks__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-service-worker/__mocks__/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true, 9 | "debug": false 10 | } 11 | ], 12 | "@babel/typescript" 13 | ], 14 | "plugins": [["@babel/plugin-transform-object-assign"], ["babel-plugin-transform-object-hasown"]] 15 | } 16 | -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: '@rudderstack/analytics-js-service-worker', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coverageThreshold: { 7 | global: { 8 | branches: 0, 9 | functions: 0, 10 | lines: 0, 11 | statements: 0, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/public/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-js-service-worker/public/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/src/index.ts: -------------------------------------------------------------------------------- 1 | export { Analytics } from './Analytics'; 2 | 3 | export { 4 | type ApiObject, 5 | type IntegrationOptions, 6 | type FlushOverrideMessage, 7 | type ConstructorOptions, 8 | type ApiCallback, 9 | } from './types'; 10 | -------------------------------------------------------------------------------- /packages/analytics-js-service-worker/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts" 6 | }, 7 | "include": ["./package.json", "./src/**/*", "../../types/**/*", "../analytics-js-common/src/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/analytics-js/.env.example: -------------------------------------------------------------------------------- 1 | # Variables required for the example 2 | WRITE_KEY= 3 | DATAPLANE_URL= 4 | 5 | # Optional variables 6 | CONFIG_SERVER_HOST= 7 | DEST_SDK_BASE_URL= 8 | REMOTE_MODULES_BASE_PATH= 9 | BUGSNAG_RELEASE_STAGE= 10 | -------------------------------------------------------------------------------- /packages/analytics-js/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/analytics-js/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [3.19.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.18.2...@rudderstack/analytics-js@3.19.0) (2025-06-03) 2 | 3 | ### Dependency Updates 4 | 5 | * `@rudderstack/analytics-js-plugins` updated to version `3.9.0` 6 | 7 | ### Features 8 | 9 | * retry delivery failures in beacon plugin when page is unloaded ([#2269](https://github.com/rudderlabs/rudder-sdk-js/issues/2269)) ([cec81f3](https://github.com/rudderlabs/rudder-sdk-js/commit/cec81f3d2aca443f6d2c209941dd28fffd65888c)) 10 | 11 | -------------------------------------------------------------------------------- /packages/analytics-js/__fixtures__/msw.server.ts: -------------------------------------------------------------------------------- 1 | import { setupServer } from 'msw/node'; 2 | import { handlers } from './msw.handlers'; 3 | 4 | const server = setupServer(...handlers); 5 | 6 | export { server }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/BeaconQueue.ts: -------------------------------------------------------------------------------- 1 | const BeaconQueue = () => ({ 2 | name: 'BeaconQueue', 3 | dataplaneEventsQueue: { 4 | init: jest.fn(() => {}), 5 | enqueue: jest.fn(() => {}), 6 | }, 7 | }); 8 | 9 | export default BeaconQueue; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/CustomConsentManager.ts: -------------------------------------------------------------------------------- 1 | const CustomConsentManager = () => ({ 2 | name: 'CustomConsentManager', 3 | consentManager: { 4 | init: jest.fn(() => {}), 5 | updateConsentsInfo: jest.fn(() => {}), 6 | isDestinationConsented: jest.fn(() => {}), 7 | }, 8 | }); 9 | 10 | export default CustomConsentManager; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/DeviceModeDestinations.ts: -------------------------------------------------------------------------------- 1 | const DeviceModeDestinations = () => ({ 2 | name: 'DeviceModeDestinations', 3 | nativeDestinations: { 4 | setActiveDestinations: jest.fn(() => {}), 5 | load: jest.fn(() => {}), 6 | }, 7 | }); 8 | 9 | export default DeviceModeDestinations; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/DeviceModeTransformation.ts: -------------------------------------------------------------------------------- 1 | const DeviceModeTransformation = () => ({ 2 | name: 'DeviceModeTransformation', 3 | transformEvent: { 4 | init: jest.fn(() => {}), 5 | enqueue: jest.fn(() => {}), 6 | }, 7 | }); 8 | 9 | export default DeviceModeTransformation; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/ExternalAnonymousId.ts: -------------------------------------------------------------------------------- 1 | const ExternalAnonymousId = () => ({ 2 | name: 'ExternalAnonymousId', 3 | storage: { 4 | getAnonymousId: jest.fn(() => { 5 | return 'dummy-anonymousId-12345678'; 6 | }), 7 | }, 8 | }); 9 | 10 | export default ExternalAnonymousId; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/GoogleLinker.ts: -------------------------------------------------------------------------------- 1 | const GoogleLinker = () => ({ 2 | name: 'GoogleLinker', 3 | userSession: { 4 | anonymousIdGoogleLinker: jest.fn((value: any) => value), 5 | }, 6 | }); 7 | 8 | export default GoogleLinker; 9 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/IubendaConsentManager.ts: -------------------------------------------------------------------------------- 1 | const IubendaConsentManager = () => ({ 2 | name: 'IubendaConsentManager', 3 | consentManager: { 4 | init: jest.fn(() => {}), 5 | updateConsentsInfo: jest.fn(() => {}), 6 | isDestinationConsented: jest.fn(() => {}), 7 | }, 8 | }); 9 | 10 | export default IubendaConsentManager; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/KetchConsentManager.ts: -------------------------------------------------------------------------------- 1 | const KetchConsentManager = () => ({ 2 | name: 'KetchConsentManager', 3 | consentManager: { 4 | init: jest.fn(() => {}), 5 | updateConsentsInfo: jest.fn(() => {}), 6 | isDestinationConsented: jest.fn(() => {}), 7 | }, 8 | }); 9 | 10 | export default KetchConsentManager; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/NativeDestinationQueue.ts: -------------------------------------------------------------------------------- 1 | const NativeDestinationQueue = () => ({ 2 | name: 'NativeDestinationQueue', 3 | destinationsEventsQueue: { 4 | init: jest.fn(() => {}), 5 | enqueue: jest.fn(() => {}), 6 | enqueueEventToDestination: jest.fn(() => {}), 7 | }, 8 | }); 9 | 10 | export default NativeDestinationQueue; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/OneTrustConsentManager.ts: -------------------------------------------------------------------------------- 1 | const OneTrustConsentManager = () => ({ 2 | name: 'OneTrustConsentManager', 3 | consentManager: { 4 | init: jest.fn(() => {}), 5 | updateConsentsInfo: jest.fn(() => {}), 6 | isDestinationConsented: jest.fn(() => {}), 7 | }, 8 | }); 9 | 10 | export default OneTrustConsentManager; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/StorageEncryption.ts: -------------------------------------------------------------------------------- 1 | const StorageEncryption = () => ({ 2 | name: 'StorageEncryption', 3 | storage: { 4 | encrypt: jest.fn((value: any) => value), 5 | decrypt: jest.fn((value: any) => value), 6 | }, 7 | }); 8 | 9 | export default StorageEncryption; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/StorageEncryptionLegacy.ts: -------------------------------------------------------------------------------- 1 | const StorageEncryptionLegacy = () => ({ 2 | name: 'StorageEncryptionLegacy', 3 | storage: { 4 | encrypt: jest.fn((value: any) => value), 5 | decrypt: jest.fn((value: any) => value), 6 | }, 7 | }); 8 | 9 | export default StorageEncryptionLegacy; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/StorageMigrator.ts: -------------------------------------------------------------------------------- 1 | const StorageMigrator = () => ({ 2 | name: 'StorageMigrator', 3 | storage: { 4 | migrate: jest.fn((key: any, storageEngine: any, errorHandler?: any, logger?: any) => key), 5 | }, 6 | }); 7 | 8 | export default StorageMigrator; 9 | -------------------------------------------------------------------------------- /packages/analytics-js/__mocks__/remotePlugins/XhrQueue.ts: -------------------------------------------------------------------------------- 1 | const XhrQueue = () => ({ 2 | name: 'XhrQueue', 3 | dataplaneEventsQueue: { 4 | init: jest.fn(() => {}), 5 | enqueue: jest.fn(() => {}), 6 | }, 7 | }); 8 | 9 | export default XhrQueue; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/__tests__/components/capabilitiesManager/detection/dom.test.ts: -------------------------------------------------------------------------------- 1 | import { 2 | isDatasetAvailable, 3 | isLegacyJSEngine, 4 | } from '../../../../src/components/capabilitiesManager/detection/dom'; 5 | 6 | describe('Capabilities Detection - DOM', () => { 7 | it('should detect dataset', () => { 8 | expect(isDatasetAvailable()).toBeTruthy(); 9 | }); 10 | it('should detect not supported javascript features', () => { 11 | expect(isLegacyJSEngine()).toBeFalsy(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/analytics-js/__tests__/components/capabilitiesManager/detection/screen.test.ts: -------------------------------------------------------------------------------- 1 | import { getScreenDetails } from '../../../../src/components/capabilitiesManager/detection/screen'; 2 | 3 | describe('Capabilities Detection - Screen', () => { 4 | it('should get screen details', () => { 5 | expect(getScreenDetails()).toStrictEqual({ 6 | density: 1, 7 | height: 0, 8 | innerHeight: 1024, 9 | innerWidth: 1680, 10 | width: 0, 11 | }); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/analytics-js/__tests__/components/utilities/event.test.ts: -------------------------------------------------------------------------------- 1 | import { isEvent } from '../../../src/components/utilities/event'; 2 | 3 | describe('Common Utils - Event', () => { 4 | it('should check if is Event or Error', () => { 5 | expect(isEvent(new Event('dummyEvent'))).toBeTruthy(); 6 | expect(isEvent(new Error('dummyEvent'))).toBeFalsy(); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/analytics-js/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true, 9 | "debug": false 10 | } 11 | ], 12 | "@babel/typescript" 13 | ], 14 | "plugins": [] 15 | } 16 | -------------------------------------------------------------------------------- /packages/analytics-js/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: '@rudderstack/analytics-js', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coverageThreshold: { 7 | global: { 8 | branches: 0, 9 | functions: 0, 10 | lines: 0, 11 | statements: 0, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/capabilitiesManager/detection/index.ts: -------------------------------------------------------------------------------- 1 | export { detectAdBlockers } from './adBlockers'; 2 | export { isBrowser, isNode, hasCrypto, hasUAClientHints, hasBeacon, isIE11 } from './browser'; 3 | export { getUserAgentClientHint } from './clientHint'; 4 | export { isDatasetAvailable, legacyJSEngineRequiredPolyfills, isLegacyJSEngine } from './dom'; 5 | export { getScreenDetails } from './screen'; 6 | export { isStorageAvailable, isStorageQuotaExceeded } from './storage'; 7 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/capabilitiesManager/index.ts: -------------------------------------------------------------------------------- 1 | export { CapabilitiesManager } from './CapabilitiesManager'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/configManager/index.ts: -------------------------------------------------------------------------------- 1 | export { ConfigManager } from './ConfigManager'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/eventManager/index.ts: -------------------------------------------------------------------------------- 1 | export { EventManager } from './EventManager'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/eventManager/types.ts: -------------------------------------------------------------------------------- 1 | import type { APIEvent } from '@rudderstack/analytics-js-common/types/EventApi'; 2 | 3 | export interface IEventManager { 4 | init(): void; 5 | addEvent(event: APIEvent): void; 6 | resume(): void; 7 | } 8 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/eventRepository/constants.ts: -------------------------------------------------------------------------------- 1 | const DATA_PLANE_QUEUE_EXT_POINT_PREFIX = 'dataplaneEventsQueue'; 2 | const DESTINATIONS_QUEUE_EXT_POINT_PREFIX = 'destinationsEventsQueue'; 3 | const DMT_EXT_POINT_PREFIX = 'transformEvent'; 4 | 5 | export { 6 | DATA_PLANE_QUEUE_EXT_POINT_PREFIX, 7 | DESTINATIONS_QUEUE_EXT_POINT_PREFIX, 8 | DMT_EXT_POINT_PREFIX, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/eventRepository/index.ts: -------------------------------------------------------------------------------- 1 | export { EventRepository } from './EventRepository'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/eventRepository/types.ts: -------------------------------------------------------------------------------- 1 | import type { RudderEvent } from '@rudderstack/analytics-js-common/types/Event'; 2 | import type { ApiCallback } from '@rudderstack/analytics-js-common/types/EventApi'; 3 | 4 | interface IEventRepository { 5 | init(): void; 6 | enqueue(event: RudderEvent, callback?: ApiCallback): void; 7 | resume(): void; 8 | } 9 | 10 | export type { IEventRepository }; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/pluginsManager/index.ts: -------------------------------------------------------------------------------- 1 | export { PluginsManager } from './PluginsManager'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/preloadBuffer/types.ts: -------------------------------------------------------------------------------- 1 | export type PreloadedEventCall = Array; 2 | 3 | export type RudderAnalyticsPreloader = { 4 | [index: string]: (...args: any[]) => any; 5 | }; 6 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/userSessionManager/index.ts: -------------------------------------------------------------------------------- 1 | export { UserSessionManager } from './UserSessionManager'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/utilities/event.ts: -------------------------------------------------------------------------------- 1 | const isEvent = (error: unknown): boolean => error instanceof Event; 2 | 3 | export { isEvent }; 4 | -------------------------------------------------------------------------------- /packages/analytics-js/src/components/utilities/statsCollection.ts: -------------------------------------------------------------------------------- 1 | import type { SourceConfig } from '@rudderstack/analytics-js-common/types/Source'; 2 | 3 | const isErrorReportingEnabled = (sourceConfig?: SourceConfig): boolean => 4 | sourceConfig?.statsCollection?.errors?.enabled === true; 5 | 6 | const isMetricsReportingEnabled = (sourceConfig?: SourceConfig): boolean => 7 | sourceConfig?.statsCollection?.metrics?.enabled === true; 8 | 9 | export { isErrorReportingEnabled, isMetricsReportingEnabled }; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/src/constants/encryption.ts: -------------------------------------------------------------------------------- 1 | const ENCRYPTION_PREFIX_V1 = 'RudderEncrypt:'; 2 | const ENCRYPTION_KEY_V1 = 'Rudder'; 3 | const ENCRYPTION_PREFIX_V3 = 'v3_RudderEncrypt:'; 4 | const ENCRYPTION_KEY_V3 = 'Rudder'; 5 | 6 | export { ENCRYPTION_PREFIX_V1, ENCRYPTION_KEY_V1, ENCRYPTION_PREFIX_V3, ENCRYPTION_KEY_V3 }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js/src/constants/queryParams.ts: -------------------------------------------------------------------------------- 1 | const QUERY_PARAM_TRAIT_PREFIX = 'ajs_trait_'; 2 | const QUERY_PARAM_PROPERTY_PREFIX = 'ajs_prop_'; 3 | const QUERY_PARAM_ANONYMOUS_ID_KEY = 'ajs_aid'; 4 | const QUERY_PARAM_USER_ID_KEY = 'ajs_uid'; 5 | const QUERY_PARAM_TRACK_EVENT_NAME_KEY = 'ajs_event'; 6 | 7 | export { 8 | QUERY_PARAM_TRAIT_PREFIX, 9 | QUERY_PARAM_PROPERTY_PREFIX, 10 | QUERY_PARAM_ANONYMOUS_ID_KEY, 11 | QUERY_PARAM_USER_ID_KEY, 12 | QUERY_PARAM_TRACK_EVENT_NAME_KEY, 13 | }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js/src/services/ErrorHandler/index.ts: -------------------------------------------------------------------------------- 1 | export { ErrorHandler, defaultErrorHandler } from './ErrorHandler'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/services/HttpClient/index.ts: -------------------------------------------------------------------------------- 1 | export { HttpClient, defaultHttpClient } from './HttpClient'; 2 | export { 3 | createXhrRequestOptions, 4 | xhrRequest, 5 | DEFAULT_XHR_REQUEST_OPTIONS, 6 | } from './xhr/xhrRequestHandler'; 7 | export { responseTextToJson } from './xhr/xhrResponseHandler'; 8 | -------------------------------------------------------------------------------- /packages/analytics-js/src/services/Logger/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | Logger, 3 | DEFAULT_LOG_LEVEL, 4 | LOG_LEVEL_MAP, 5 | defaultLogger, 6 | POST_LOAD_LOG_LEVEL, 7 | } from './Logger'; 8 | -------------------------------------------------------------------------------- /packages/analytics-js/src/services/Logger/types.ts: -------------------------------------------------------------------------------- 1 | import type { LogLevel } from '@rudderstack/analytics-js-common/types/Logger'; 2 | 3 | export type LoggerProvider = Record< 4 | Exclude, Lowercase<'NONE'>>, 5 | (...data: any[]) => void 6 | >; 7 | -------------------------------------------------------------------------------- /packages/analytics-js/src/services/PluginEngine/index.ts: -------------------------------------------------------------------------------- 1 | export { PluginEngine, defaultPluginEngine } from './PluginEngine'; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/services/StoreManager/index.ts: -------------------------------------------------------------------------------- 1 | export { StoreManager } from './StoreManager'; 2 | export { Store } from './Store'; 3 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/autoTrack.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { AutoTrackState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const autoTrackState: AutoTrackState = { 5 | enabled: signal(false), 6 | pageLifecycle: { 7 | enabled: signal(false), 8 | pageViewId: signal(undefined), 9 | pageLoadedTimestamp: signal(undefined), 10 | }, 11 | }; 12 | 13 | export { autoTrackState }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/dataPlaneEvents.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { DataPlaneEventsState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | import type { PluginName } from '@rudderstack/analytics-js-common/types/PluginsManager'; 4 | 5 | const dataPlaneEventsState: DataPlaneEventsState = { 6 | eventsQueuePluginName: signal(undefined), 7 | deliveryEnabled: signal(true), // Delivery should always happen 8 | }; 9 | 10 | export { dataPlaneEventsState }; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/eventBuffer.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { EventBufferState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const eventBufferState: EventBufferState = { 5 | toBeProcessedArray: signal([]), 6 | readyCallbacksArray: signal([]), 7 | }; 8 | 9 | export { eventBufferState }; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/metrics.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { MetricsState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const metricsState: MetricsState = { 5 | retries: signal(0), 6 | dropped: signal(0), 7 | sent: signal(0), 8 | queued: signal(0), 9 | triggered: signal(0), 10 | metricsServiceUrl: signal(undefined), 11 | }; 12 | 13 | export { metricsState }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/plugins.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { PluginsState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const pluginsState: PluginsState = { 5 | ready: signal(false), 6 | loadedPlugins: signal([]), 7 | failedPlugins: signal([]), 8 | pluginsToLoadFromConfig: signal([]), 9 | activePlugins: signal([]), 10 | totalPluginsToLoad: signal(0), 11 | }; 12 | 13 | export { pluginsState }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/reporting.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { ReportingState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const reportingState: ReportingState = { 5 | isErrorReportingEnabled: signal(false), 6 | isMetricsReportingEnabled: signal(false), 7 | breadcrumbs: signal([]), 8 | }; 9 | 10 | export { reportingState }; 11 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/serverCookies.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { ServerCookiesState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const serverSideCookiesState: ServerCookiesState = { 5 | isEnabledServerSideCookies: signal(false), 6 | dataServiceUrl: signal(undefined), 7 | }; 8 | 9 | export { serverSideCookiesState }; 10 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/source.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { SourceConfigState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const sourceConfigState: SourceConfigState = signal(undefined); 5 | 6 | export { sourceConfigState }; 7 | -------------------------------------------------------------------------------- /packages/analytics-js/src/state/slices/storage.ts: -------------------------------------------------------------------------------- 1 | import { signal } from '@preact/signals-core'; 2 | import type { StorageState } from '@rudderstack/analytics-js-common/types/ApplicationState'; 3 | 4 | const storageState: StorageState = { 5 | encryptionPluginName: signal(undefined), 6 | migrate: signal(false), 7 | type: signal(undefined), 8 | cookie: signal(undefined), 9 | entries: signal({}), 10 | trulyAnonymousTracking: signal(false), 11 | }; 12 | 13 | export { storageState }; 14 | -------------------------------------------------------------------------------- /packages/analytics-js/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /packages/analytics-js/src/types/rudderanalytics.d.ts: -------------------------------------------------------------------------------- 1 | import type { IRudderStackGlobals, RudderAnalytics, RudderAnalyticsPreloader } from '../index'; 2 | 3 | declare global { 4 | interface Window { 5 | rudderanalytics: RudderAnalytics | RudderAnalyticsPreloader | undefined; 6 | RudderStackGlobals: IRudderStackGlobals; 7 | RudderSnippetVersion?: string; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/analytics-js/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts" 6 | }, 7 | "include": [ 8 | "./package.json", 9 | "./src/**/*", 10 | "../../types/**/*", 11 | "../analytics-js-plugins/src/**/*", 12 | "../analytics-js-common/src/**/*", 13 | "../analytics-js-cookies/src/**/*" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/.env.example: -------------------------------------------------------------------------------- 1 | # Variables required for the example 2 | WRITE_KEY= 3 | DATAPLANE_URL= 4 | TEST_FILE_PATH= 5 | CONFIG_SERVER_HOST= 6 | DEST_SDK_BASE_URL= 7 | BUGSNAG_API_KEY= 8 | BUGSNAG_RELEASE_STAGE= 9 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/.versionrc: -------------------------------------------------------------------------------- 1 | { 2 | "bumpFiles": [ 3 | { 4 | "filename": "package.json", 5 | "type": "json" 6 | }, 7 | { 8 | "filename": "packages/npm/package.json", 9 | "type": "json" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [2.51.2](https://github.com/rudderlabs/rudder-sdk-js/compare/rudder-sdk-js@2.51.1...rudder-sdk-js@2.51.2) (2025-05-09) 2 | 3 | ### Dependency Updates 4 | 5 | * `@rudderstack/analytics-js-common` updated to version `3.19.0` 6 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/__fixtures__/msw.server.js: -------------------------------------------------------------------------------- 1 | import { setupServer } from 'msw/node'; 2 | import { handlers } from './msw.handlers'; 3 | 4 | const server = setupServer(...handlers); 5 | 6 | export { server }; 7 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/__mocks__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/analytics-v1.1/__mocks__/.gitkeep -------------------------------------------------------------------------------- /packages/analytics-v1.1/__mocks__/BraveBrowser.js: -------------------------------------------------------------------------------- 1 | class BraveBrowser { 2 | constructor() {} 3 | 4 | isBrave() { 5 | return true; 6 | } 7 | } 8 | 9 | export default BraveBrowser; 10 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [["@babel/plugin-transform-object-assign"], ["babel-plugin-transform-object-hasown"]] 14 | } 15 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'rudder-sdk-js', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coverageThreshold: { 7 | global: { 8 | branches: 0, 9 | functions: 0, 10 | lines: 0, 11 | statements: 0, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/src/features/core/cookieConsent/OneTrust/index.js: -------------------------------------------------------------------------------- 1 | export { default as OneTrust } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/src/features/core/cookieConsent/ketch/index.js: -------------------------------------------------------------------------------- 1 | export { default as Ketch } from './browser'; 2 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/src/utils/RudderApp.js: -------------------------------------------------------------------------------- 1 | // Application class 2 | class RudderApp { 3 | constructor() { 4 | this.name = 'RudderLabs JavaScript SDK'; 5 | this.namespace = 'com.rudderlabs.javascript'; 6 | this.version = '__PACKAGE_VERSION__'; 7 | } 8 | } 9 | export default RudderApp; 10 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/src/utils/linker/userLib.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @description An interface to fetch user device details. 3 | * @version v1.0.0 4 | */ 5 | 6 | const USER_INTERFACE = { 7 | /** 8 | * @param {*} req 9 | * @returns {string} user language 10 | */ 11 | getUserLanguage: () => navigator && navigator.language, 12 | 13 | /** 14 | * @param {*} req 15 | * @returns {string} userAgent 16 | */ 17 | getUserAgent: () => navigator && navigator.userAgent, 18 | }; 19 | 20 | export default USER_INTERFACE; 21 | -------------------------------------------------------------------------------- /packages/analytics-v1.1/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts" 6 | }, 7 | "include": ["./package.json", "./src/**/*", "../../types/**/*", "../analytics-js-common/src/**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/loading-scripts/.env.example: -------------------------------------------------------------------------------- 1 | # Variables required for the example 2 | WRITE_KEY= 3 | DATAPLANE_URL= 4 | -------------------------------------------------------------------------------- /packages/loading-scripts/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/loading-scripts/.size-limit.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * DO NOT EDIT the size limits configured in this file. 3 | * Should you update them, please contact CODEOWNERS. 4 | */ 5 | export default [ 6 | { 7 | name: 'Load Snippet', 8 | path: 'dist/loading-script.min.js', 9 | limit: '1 KiB', 10 | }, 11 | ]; 12 | -------------------------------------------------------------------------------- /packages/loading-scripts/CHANGELOG_LATEST.md: -------------------------------------------------------------------------------- 1 | ## [3.0.60](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.59...@rudderstack/analytics-js-loading-scripts@3.0.60) (2025-02-20) 2 | 3 | 4 | ### Bug Fixes 5 | 6 | * sdk loading snippet to reduce ambiguity in updating url ([#2048](https://github.com/rudderlabs/rudder-sdk-js/issues/2048)) ([843d944](https://github.com/rudderlabs/rudder-sdk-js/commit/843d944f2d63ee414cbcf9d7c991ba97567cdac3)) 7 | 8 | -------------------------------------------------------------------------------- /packages/loading-scripts/__fixtures__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/loading-scripts/__fixtures__/.gitkeep -------------------------------------------------------------------------------- /packages/loading-scripts/__mocks__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/loading-scripts/__mocks__/.gitkeep -------------------------------------------------------------------------------- /packages/loading-scripts/__tests__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rudderlabs/rudder-sdk-js/6fed4f6a7bf338e6040e2292e965acc06fa3c1a6/packages/loading-scripts/__tests__/.gitkeep -------------------------------------------------------------------------------- /packages/loading-scripts/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/loading-scripts/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: '@rudderstack/analytics-js-loading-scripts', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coverageThreshold: { 7 | global: { 8 | branches: 0, 9 | functions: 0, 10 | lines: 0, 11 | statements: 0, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/loading-scripts/src/types/rudderanalytics.d.ts: -------------------------------------------------------------------------------- 1 | import type { RudderAnalytics, RudderAnalyticsPreloader } from '@rudderstack/analytics-js'; 2 | 3 | declare global { 4 | interface Window { 5 | rudderanalytics: RudderAnalytics | RudderAnalyticsPreloader | undefined; 6 | rudderAnalyticsMount: () => void; 7 | rudderAnalyticsBuildType: 'legacy' | 'modern'; 8 | RudderSnippetVersion: string; 9 | rudderAnalyticsAddScript: ( 10 | url: string, 11 | extraAttributeKey?: string, 12 | extraAttributeVal?: string, 13 | ) => void; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/loading-scripts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts", 6 | "isolatedModules": false 7 | }, 8 | "include": [ 9 | "./package.json", 10 | "./src/**/*", 11 | "./__mocks__/*.json", 12 | "./__fixtures__/*.json", 13 | "../../types/**/*" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/sanity-suite/.env.example: -------------------------------------------------------------------------------- 1 | WRITE_KEY= 2 | DATAPLANE_URL= 3 | CONFIG_SERVER_HOST= 4 | SDK_CDN_VERSION_PATH_PREFIX= 5 | DEST_SDK_BASE_URL= 6 | 7 | # v3 8 | # PLUGINS_SDK_BASE_URL= 9 | 10 | # DEV environment 11 | # IS_DEV_TESTBOOK=true 12 | 13 | # DMT 14 | # IS_DMT=true 15 | -------------------------------------------------------------------------------- /packages/sanity-suite/.jscpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 5, 3 | "reporters": ["html", "console"], 4 | "pattern": "**/*", 5 | "ignore": [ 6 | "**/__tests__/**", 7 | "**/__mocks__/**", 8 | "**/__fixtures__/**", 9 | "**/node_modules/**", 10 | "*.test.*" 11 | ], 12 | "absolute": true, 13 | "gitignore": true, 14 | "output": "./reports/", 15 | "mode": "strict", 16 | "format": ["typescript", "tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/sanity-suite/babel.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/env", 5 | { 6 | "corejs": "3.6", 7 | "useBuiltIns": "entry", 8 | "bugfixes": true 9 | } 10 | ], 11 | "@babel/typescript" 12 | ], 13 | "plugins": [] 14 | } 15 | -------------------------------------------------------------------------------- /packages/sanity-suite/jest.config.mjs: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: '@rudderstack/analytics-js-sanity-suite', 4 | preset: '../../jest.preset.js', 5 | rootDir: './', 6 | coverageThreshold: { 7 | global: { 8 | branches: 0, 9 | functions: 0, 10 | lines: 0, 11 | statements: 0, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /packages/sanity-suite/serve.json: -------------------------------------------------------------------------------- 1 | { 2 | "cleanUrls": false, 3 | "trailingSlash": false 4 | } 5 | -------------------------------------------------------------------------------- /packages/sanity-suite/src/index.ts: -------------------------------------------------------------------------------- 1 | import { initSanitySuite } from './testBook'; 2 | 3 | (window.rudderanalytics as any).ready(() => { 4 | console.log('We are all set!!!'); 5 | initSanitySuite(); 6 | }); 7 | -------------------------------------------------------------------------------- /packages/sanity-suite/src/testBook/index.js: -------------------------------------------------------------------------------- 1 | import { TestBook } from './TestBook'; 2 | import { devSanityTestBookData, sanityTestBookData } from '../testBookSuites'; 3 | 4 | const initSanitySuite = () => { 5 | setTimeout(() => { 6 | console.log('Mount sanity suite test book'); 7 | // eslint-disable-next-line no-undef 8 | const testBookData = IS_DEV_TESTBOOK === true ? devSanityTestBookData : sanityTestBookData; 9 | return new TestBook(testBookData); 10 | }, 1); 11 | }; 12 | 13 | export { initSanitySuite }; 14 | -------------------------------------------------------------------------------- /packages/sanity-suite/src/types/global.d.ts: -------------------------------------------------------------------------------- 1 | declare const IS_DEV_TESTBOOK: boolean | undefined; 2 | declare const IS_DMT: boolean | undefined; 3 | -------------------------------------------------------------------------------- /packages/sanity-suite/src/types/rudderanalytics.d.ts: -------------------------------------------------------------------------------- 1 | import type { RudderAnalytics, RudderAnalyticsPreloader } from '@rudderstack/analytics-js'; 2 | 3 | declare global { 4 | interface Window { 5 | rudderanalytics: RudderAnalytics | RudderAnalyticsPreloader | undefined; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/sanity-suite/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build.json", 3 | "compilerOptions": { 4 | "target": "es5", 5 | "declarationDir": "./dist/dts" 6 | }, 7 | "include": [ 8 | "./package.json", 9 | "./src/**/*", 10 | "./__mocks__/*.json", 11 | "./__fixtures__/*.json", 12 | "../../types/**/*" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": false, 5 | "emitDeclarationOnly": true, 6 | "declarationMap": true, 7 | "declarationDir": "dist/dts" 8 | }, 9 | "include": ["./package.json", "./packages/**/src/**/*", "./types/**/*"], 10 | "exclude": ["node_modules/", "dist/", "__tests__/", "__mocks__/", "__fixtures__/"], 11 | "references": [] 12 | } 13 | -------------------------------------------------------------------------------- /types/clipboardJs.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'ClipboardJS'; 2 | -------------------------------------------------------------------------------- /types/component-type.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'component-type'; 2 | -------------------------------------------------------------------------------- /types/global.d.ts: -------------------------------------------------------------------------------- 1 | // @ts-ignore 2 | declare global { 3 | namespace NodeJS { 4 | interface Global extends Window { 5 | document: Document; 6 | navigator: Navigator; 7 | [name: string]: any; 8 | } 9 | } 10 | } 11 | 12 | declare const __BUNDLE_ALL_PLUGINS__: boolean; 13 | 14 | declare const __IS_LEGACY_BUILD__: boolean; 15 | 16 | declare const __LOCK_DEPS_VERSION__: boolean; 17 | -------------------------------------------------------------------------------- /types/join-component.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'join-component'; 2 | -------------------------------------------------------------------------------- /types/localstorage-retry.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@segment/localstorage-retry'; 2 | -------------------------------------------------------------------------------- /types/loosely-validate-event.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@segment/loosely-validate-event'; 2 | -------------------------------------------------------------------------------- /types/user-agent-data-types.d.ts: -------------------------------------------------------------------------------- 1 | // Add data types to window.navigator ambiently for implicit use in the entire project. 2 | // See https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types- for more info. 3 | /// 4 | --------------------------------------------------------------------------------