Skip to content

Commit

Permalink
Merge pull request #19 from Countly/minor-fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
turtledreams authored Nov 12, 2024
2 parents 5dfe7c7 + f86fa0b commit 0af8398
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions modules/CountlyClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ constructor(ob) {

notifyLoaders();

setTimeout(function () {
setTimeout(() => {
if (!Countly.noHeartBeat) {
heartBeat();
} else {
Expand Down Expand Up @@ -801,13 +801,17 @@ constructor(ob) {
/**
* Remove consent for specific feature, meaning, user opted out to track that data (either core feature of from custom feature group)
* @param {string|array} feature - name of the feature, possible values, "sessions","events","views","scrolls","clicks","forms","crashes","attribution","users", etc or custom provided through {@link Countly.group_features}
* @param {Boolean} enforceConsentUpdate - regulates if a request will be sent to the server or not. If true, removing consents will send a request to the server and if false, consents will be removed without a request
*/
this.remove_consent = function (feature) {
log(logLevelEnums.INFO, "remove_consent, Removing consent for [" + feature + "]");
this.remove_consent_internal(feature, true);
};
// removes consent without updating

/**
* Remove consent for specific feature, meaning, user opted out to track that data (either core feature of from custom feature group)
* @param {string|array} feature - name of the feature, possible values, "sessions","events","views","scrolls","clicks","forms","crashes","attribution","users", etc or custom provided through {@link Countly.group_features}
* @param {Boolean} enforceConsentUpdate - regulates if a request will be sent to the server or not. If true, removing consents will send a request to the server and if false, consents will be removed without a request
*/
this.remove_consent_internal = function (feature, enforceConsentUpdate) {
// if true updateConsent will execute when possible
enforceConsentUpdate = enforceConsentUpdate || false;
Expand Down Expand Up @@ -1540,7 +1544,7 @@ constructor(ob) {

/**
* Automatically track javascript errors that happen on the website and report them to the server
* @param {string=} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc.
* @param {Object} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc.
* */
this.track_errors = function (segments) {
if (!isBrowser) {
Expand Down Expand Up @@ -1608,7 +1612,7 @@ constructor(ob) {
/**
* Log an exception that you caught through try and catch block and handled yourself and just want to report it to server
* @param {Object} err - error exception object provided in catch block
* @param {string=} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc.
* @param {Object} segments - additional key value pairs you want to provide with error report, like versions of libraries used, etc.
* */
this.log_error = function (err, segments) {
log(logLevelEnums.INFO, "log_error, Logging errors");
Expand Down

0 comments on commit 0af8398

Please sign in to comment.