|
196 | 196 | statusCode: "cly_hc_status_code",
|
197 | 197 | errorMessage: "cly_hc_error_message"
|
198 | 198 | });
|
199 |
| - var SDK_VERSION = "23.12.0"; |
| 199 | + var SDK_VERSION = "23.12.1"; |
200 | 200 | var SDK_NAME = "javascript_native_web";
|
201 | 201 |
|
202 | 202 | // Using this on document.referrer would return an array with 15 elements in it. The 12th element (array[11]) would be the path we are looking for. Others would be things like password and such (use https://regex101.com/ to check more)
|
|
807 | 807 | var currentViewId = null; // this is the global variable for tracking the current view's ID. Used in view tracking. Becomes previous view ID at the end.
|
808 | 808 | var previousViewId = null; // this is the global variable for tracking the previous view's ID. Used in view tracking. First view has no previous view ID.
|
809 | 809 | var freshUTMTags = null;
|
| 810 | + var sdkName = getConfig("sdk_name", ob, SDK_NAME); |
| 811 | + var sdkVersion = getConfig("sdk_version", ob, SDK_VERSION); |
810 | 812 | try {
|
811 | 813 | localStorage.setItem("cly_testLocal", true);
|
812 | 814 | // clean up test
|
|
970 | 972 |
|
971 | 973 | // init configuration is printed out here:
|
972 | 974 | // key values should be printed out as is
|
| 975 | + if (sdkName === SDK_NAME && sdkVersion === SDK_VERSION) { |
| 976 | + log(logLevelEnums.DEBUG, "initialize, SDK name:[" + sdkName + "], version:[" + sdkVersion + "]"); |
| 977 | + } else { |
| 978 | + log(logLevelEnums.DEBUG, "initialize, SDK name:[" + sdkName + "], version:[" + sdkVersion + "], default name:[" + SDK_NAME + "] and default version:[" + SDK_VERSION + "]"); |
| 979 | + } |
973 | 980 | log(logLevelEnums.DEBUG, "initialize, app_key:[" + this.app_key + "], url:[" + this.url + "]");
|
974 | 981 | log(logLevelEnums.DEBUG, "initialize, device_id:[" + getConfig("device_id", ob, undefined) + "]");
|
975 | 982 | log(logLevelEnums.DEBUG, "initialize, require_consent is enabled:[" + this.require_consent + "]");
|
|
3540 | 3547 | var data = {
|
3541 | 3548 | widget_id: CountlyFeedbackWidget._id,
|
3542 | 3549 | shown: 1,
|
3543 |
| - sdk_version: SDK_VERSION, |
3544 |
| - sdk_name: SDK_NAME, |
| 3550 | + sdk_version: sdkVersion, |
| 3551 | + sdk_name: sdkName, |
3545 | 3552 | platform: this.platform,
|
3546 | 3553 | app_version: this.app_version
|
3547 | 3554 | };
|
|
3646 | 3653 | url += "?widget_id=" + presentableFeedback._id;
|
3647 | 3654 | url += "&app_key=" + this.app_key;
|
3648 | 3655 | url += "&device_id=" + this.device_id;
|
3649 |
| - url += "&sdk_name=" + SDK_NAME; |
| 3656 | + url += "&sdk_name=" + sdkName; |
3650 | 3657 | url += "&platform=" + this.platform;
|
3651 | 3658 | url += "&app_version=" + this.app_version;
|
3652 |
| - url += "&sdk_version=" + SDK_VERSION; |
| 3659 | + url += "&sdk_version=" + sdkVersion; |
3653 | 3660 | if (feedbackWidgetSegmentation) {
|
3654 | 3661 | var customObjectToSendWithTheWidget = {};
|
3655 | 3662 | customObjectToSendWithTheWidget.sg = feedbackWidgetSegmentation;
|
|
4049 | 4056 | var iframe = document.createElement("iframe");
|
4050 | 4057 | iframe.name = "countly-feedback-iframe";
|
4051 | 4058 | iframe.id = "countly-feedback-iframe";
|
4052 |
| - iframe.src = self.url + "/feedback?widget_id=" + currentWidget._id + "&app_key=" + self.app_key + "&device_id=" + self.device_id + "&sdk_version=" + SDK_VERSION; |
| 4059 | + iframe.src = self.url + "/feedback?widget_id=" + currentWidget._id + "&app_key=" + self.app_key + "&device_id=" + self.device_id + "&sdk_version=" + sdkVersion; |
4053 | 4060 | // inject them to dom
|
4054 | 4061 | document.body.appendChild(wrapper);
|
4055 | 4062 | wrapper.appendChild(closeIcon);
|
|
4173 | 4180 | function prepareRequest(request) {
|
4174 | 4181 | request.app_key = self.app_key;
|
4175 | 4182 | request.device_id = self.device_id;
|
4176 |
| - request.sdk_name = SDK_NAME; |
4177 |
| - request.sdk_version = SDK_VERSION; |
| 4183 | + request.sdk_name = sdkName; |
| 4184 | + request.sdk_version = sdkVersion; |
4178 | 4185 | request.t = deviceIdType;
|
4179 | 4186 | request.av = self.app_version;
|
4180 | 4187 | var ua = getUA();
|
|
0 commit comments