@blotoutio/providers-google-ads-clicks-sdk 0.47.2 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -25,12 +25,29 @@ const getCookieValue = (key) => {
25
25
  return '';
26
26
  }
27
27
  };
28
- const setCookie = (key, value) => {
28
+ const setCookie = (key, value, options) => {
29
+ var _a;
29
30
  try {
30
31
  if (!document) {
31
32
  return;
32
33
  }
33
- document.cookie = `${key}=${value};path=/`;
34
+ const extras = [`path=${(_a = options === null || options === void 0 ? void 0 : options.path) !== null && _a !== void 0 ? _a : '/'}`];
35
+ if (options === null || options === void 0 ? void 0 : options['maxAge']) {
36
+ extras.push(`max-age=${options['maxAge']}`);
37
+ }
38
+ if (options === null || options === void 0 ? void 0 : options.expires) {
39
+ extras.push(`expires=${options.expires}`);
40
+ }
41
+ if (options === null || options === void 0 ? void 0 : options.partitioned) {
42
+ extras.push('partitioned');
43
+ }
44
+ if (options === null || options === void 0 ? void 0 : options.samesite) {
45
+ extras.push(`samesite=${options.samesite}`);
46
+ }
47
+ if (options === null || options === void 0 ? void 0 : options.secure) {
48
+ extras.push('secure');
49
+ }
50
+ document.cookie = `${key}=${value};${extras.join(';')}`;
34
51
  }
35
52
  catch {
36
53
  return;
@@ -211,7 +228,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
211
228
  }
212
229
  return {
213
230
  loaded: isLoaded,
214
- sdkVersion: "0.47.2" ,
231
+ sdkVersion: "0.49.0" ,
215
232
  };
216
233
  };
217
234
 
package/index.js CHANGED
@@ -26,12 +26,29 @@ var ProvidersGoogleAdsClicksSdk = (function () {
26
26
  return '';
27
27
  }
28
28
  };
29
- const setCookie = (key, value) => {
29
+ const setCookie = (key, value, options) => {
30
+ var _a;
30
31
  try {
31
32
  if (!document) {
32
33
  return;
33
34
  }
34
- document.cookie = `${key}=${value};path=/`;
35
+ const extras = [`path=${(_a = options === null || options === void 0 ? void 0 : options.path) !== null && _a !== void 0 ? _a : '/'}`];
36
+ if (options === null || options === void 0 ? void 0 : options['maxAge']) {
37
+ extras.push(`max-age=${options['maxAge']}`);
38
+ }
39
+ if (options === null || options === void 0 ? void 0 : options.expires) {
40
+ extras.push(`expires=${options.expires}`);
41
+ }
42
+ if (options === null || options === void 0 ? void 0 : options.partitioned) {
43
+ extras.push('partitioned');
44
+ }
45
+ if (options === null || options === void 0 ? void 0 : options.samesite) {
46
+ extras.push(`samesite=${options.samesite}`);
47
+ }
48
+ if (options === null || options === void 0 ? void 0 : options.secure) {
49
+ extras.push('secure');
50
+ }
51
+ document.cookie = `${key}=${value};${extras.join(';')}`;
35
52
  }
36
53
  catch {
37
54
  return;
@@ -212,7 +229,7 @@ var ProvidersGoogleAdsClicksSdk = (function () {
212
229
  }
213
230
  return {
214
231
  loaded: isLoaded,
215
- sdkVersion: "0.47.2" ,
232
+ sdkVersion: "0.49.0" ,
216
233
  };
217
234
  };
218
235
 
package/index.mjs CHANGED
@@ -23,12 +23,29 @@ const getCookieValue = (key) => {
23
23
  return '';
24
24
  }
25
25
  };
26
- const setCookie = (key, value) => {
26
+ const setCookie = (key, value, options) => {
27
+ var _a;
27
28
  try {
28
29
  if (!document) {
29
30
  return;
30
31
  }
31
- document.cookie = `${key}=${value};path=/`;
32
+ const extras = [`path=${(_a = options === null || options === void 0 ? void 0 : options.path) !== null && _a !== void 0 ? _a : '/'}`];
33
+ if (options === null || options === void 0 ? void 0 : options['maxAge']) {
34
+ extras.push(`max-age=${options['maxAge']}`);
35
+ }
36
+ if (options === null || options === void 0 ? void 0 : options.expires) {
37
+ extras.push(`expires=${options.expires}`);
38
+ }
39
+ if (options === null || options === void 0 ? void 0 : options.partitioned) {
40
+ extras.push('partitioned');
41
+ }
42
+ if (options === null || options === void 0 ? void 0 : options.samesite) {
43
+ extras.push(`samesite=${options.samesite}`);
44
+ }
45
+ if (options === null || options === void 0 ? void 0 : options.secure) {
46
+ extras.push('secure');
47
+ }
48
+ document.cookie = `${key}=${value};${extras.join(';')}`;
32
49
  }
33
50
  catch {
34
51
  return;
@@ -209,7 +226,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
209
226
  }
210
227
  return {
211
228
  loaded: isLoaded,
212
- sdkVersion: "0.47.2" ,
229
+ sdkVersion: "0.49.0" ,
213
230
  };
214
231
  };
215
232
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-google-ads-clicks-sdk",
3
- "version": "0.47.2",
3
+ "version": "0.49.0",
4
4
  "description": "Google Ads Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",