Skip to content

Commit b6a3519

Browse files
committed
[MOENGAGE] Add support for cluster option in MoEngage SDK initialization
1 parent c851772 commit b6a3519

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

integrations/moengage/HISTORY.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.1.0 / 2023-11-16
2+
==================
3+
4+
* Adds support for cluster option
5+
16
1.0.6 / 2019-01-07
27
==================
38

integrations/moengage/lib/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ var find = require('obj-case').find;
1818
var MoEngage = (module.exports = integration('MoEngage')
1919
.option('apiKey', '')
2020
.option('debugMode', false)
21+
.option('cluster', undefined)
2122
.tag(
2223
'<script src="https://cdn.moengage.com/webpush/moe_webSdk.min.latest.js">'
2324
));
@@ -76,7 +77,8 @@ MoEngage.prototype.initialize = function() {
7677
when(self.loaded, function() {
7778
self._client = window.moe({
7879
app_id: self.options.apiKey,
79-
debug_logs: self.options.debugMode ? 1 : 0
80+
debug_logs: self.options.debugMode ? 1 : 0,
81+
cluster: self.options.cluster
8082
});
8183
// we need to store the current anonymousId for later use in `.identify()` to check if it's a new/existing user
8284
self.initializedAnonymousId = self.analytics.user().anonymousId();

integrations/moengage/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@segment/analytics.js-integration-moengage",
33
"description": "The MoEngage analytics.js integration.",
4-
"version": "1.0.8",
4+
"version": "1.1.0",
55
"keywords": [
66
"analytics.js",
77
"analytics.js-integration",

integrations/moengage/test/index.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ describe('MoEngage', function() {
3434
integration('MoEngage')
3535
.option('apiKey', '')
3636
.option('debugMode', false)
37+
.option('cluster', undefined)
3738
);
3839
});
3940

0 commit comments

Comments
 (0)