Skip to content

Commit

Permalink
Merge pull request #233 from CleverTap/develop
Browse files Browse the repository at this point in the history
Web SDK Release v1.8.2
  • Loading branch information
KambleSonam authored Jun 18, 2024
2 parents e5cd9f3 + eef647f commit f35a7fd
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 52 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [1.8.2] - 18 June, 2024
- Fixes an issue in getLocation function where the location data was not sent in requests.
- Exposes a method getSDKVersion

## [1.8.1] - 14 June, 2024
- Fixes an issue with Preview of webpopups related XSS changes.

Expand Down
101 changes: 56 additions & 45 deletions clevertap.js

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

2 changes: 1 addition & 1 deletion clevertap.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clevertap.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clevertap-web-sdk",
"version": "1.8.1",
"version": "1.8.2",
"description": "",
"main": "clevertap.js",
"scripts": {
Expand Down
10 changes: 7 additions & 3 deletions src/clevertap.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ export default class CleverTap {
return
}
$ct.location = { Latitude: lat, Longitude: lng }
this.sendLocationData({ Latitude: lat, Longitude: lng })
this.#sendLocationData({ Latitude: lat, Longitude: lng })
} else {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition.bind(this), showError)
Expand All @@ -482,7 +482,7 @@ export default class CleverTap {
var lat = position.coords.latitude
var lng = position.coords.longitude
$ct.location = { Latitude: lat, Longitude: lng }
this.sendLocationData({ Latitude: lat, Longitude: lng })
this.#sendLocationData({ Latitude: lat, Longitude: lng })
}

function showError (error) {
Expand Down Expand Up @@ -781,7 +781,7 @@ export default class CleverTap {
*
* @param {object} payload
*/
sendLocationData (payload) {
#sendLocationData (payload) {
// Send the updated value to LC
let data = {}
data.af = {}
Expand Down Expand Up @@ -830,6 +830,10 @@ export default class CleverTap {
}
}

getSDKVersion () {
return 'web-sdk-v$$PACKAGE_VERSION$$'
}

defineVariable (name, defaultValue) {
return Variable.define(name, defaultValue, this.#variableStore)
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class RequestManager {
dataObject.pg = (typeof obj.p === 'undefined') ? 1 : obj.p // Page count
let proto = document.location.protocol
proto = proto.replace(':', '')
dataObject.af = { lib: 'web-sdk-v$$PACKAGE_VERSION$$', protocol: proto, ...$ct.flutterVersion } // app fields
dataObject.af = { ...dataObject.af, lib: 'web-sdk-v$$PACKAGE_VERSION$$', protocol: proto, ...$ct.flutterVersion } // app fields
if (sessionStorage.hasOwnProperty('WZRK_D')) { dataObject.debug = true }

return dataObject
Expand Down

0 comments on commit f35a7fd

Please sign in to comment.