[WEB-273] Update WebSDK integration snippet to new format - #48
Open
Aman-engg-sdk wants to merge 1 commit into
Open
[WEB-273] Update WebSDK integration snippet to new format#48Aman-engg-sdk wants to merge 1 commit into
Aman-engg-sdk wants to merge 1 commit into
Conversation
- Replace old IIFE loader with new version across 13 integration files - Add sdkVersion variable and versioned CDN URL path - Fix double-init guard to check both initialized/initialised spellings - Expand stub methods list with 18 new API methods - Change app_id to appId in all moe() init calls Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WEB-273 Update WebSDK integration snippet to new format
Summary
Updates the MoEngage WebSDK loader snippet across all 13 integration sample files to the latest format. The new snippet adds versioned CDN URL support, a stricter data-center validation regex, an expanded API stubs list, and fixes the double-init guard to handle both US/UK spellings of "initialized".
Changes
var sdkVersion = "2"to all integration filesinitializedandinitialisedapp_id:toappId:in allmoe()init callseu-cluster.htmlfrom legacy hardcoded webpush URL to DC-based formatFiles Changed
index.html,self-handled-push.html,custom-serviceworker.html,web-personalization.html,debug.html,eu-cluster.html,angular-sample/src/index.html,react-sample/public/index.html,lg-web-os/index.html,samsung-tizen-os/samsungTizenOs/index.html,nuxt-spa/plugins/moe.js,nextjs/pages/_document.js,chrome-extension/popup.jsTech Stack
Plain HTML/JS integration samples covering: Vanilla JS, Angular, React, Nuxt.js (SPA), Next.js, Chrome Extension, LG WebOS, Samsung Tizen OS — all integrating the MoEngage WebSDK via CDN loader snippet.
CSS Architecture
N/A — this PR contains no CSS changes.
Bundle Optimization
N/A — snippet changes are minimal (~41 insertions / 27 deletions). The new versioned CDN URL (
/versions/2/) pins the SDK to a major version, avoiding unintended breaking updates.Code Quality
Jira Ticket
WEB-273
Release Ticket
N/A
Test Cases
N/A
Testing Done