@blotoutio/providers-twitter-sdk 0.29.0 → 0.30.1
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 +8 -3
- package/index.js +8 -3
- package/index.mjs +8 -3
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const packageName = 'twitter';
|
|
4
|
+
const sdkUrl = 'https://static.ads-twitter.com/uwt.js';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
3
7
|
const snippet = () => {
|
|
4
8
|
if (!window || !document || window.twq) {
|
|
5
9
|
return;
|
|
@@ -15,7 +19,7 @@ const snippet = () => {
|
|
|
15
19
|
n['queue'] = [];
|
|
16
20
|
const element = document.createElement('script');
|
|
17
21
|
element.async = !0;
|
|
18
|
-
element.src =
|
|
22
|
+
element.src = sdkUrl;
|
|
19
23
|
const script = document.getElementsByTagName('script')[0];
|
|
20
24
|
if (script && script.parentNode) {
|
|
21
25
|
script.parentNode.insertBefore(element, script);
|
|
@@ -79,7 +83,7 @@ const getEventId = (event, conversions) => {
|
|
|
79
83
|
};
|
|
80
84
|
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
81
85
|
const payload = {
|
|
82
|
-
sdkVersion: "0.
|
|
86
|
+
sdkVersion: "0.30.1" ,
|
|
83
87
|
};
|
|
84
88
|
if (window.twq && manifestVariables['enableBrowser'] === '1') {
|
|
85
89
|
const twitterEventId = getEventId(eventName, manifestVariables['mappedConversions']);
|
|
@@ -91,8 +95,9 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
91
95
|
return payload;
|
|
92
96
|
};
|
|
93
97
|
|
|
98
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
94
99
|
const data = {
|
|
95
|
-
name:
|
|
100
|
+
name: packageName,
|
|
96
101
|
tag,
|
|
97
102
|
init,
|
|
98
103
|
};
|
package/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
var ProvidersTwitterSdk = (function () {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
const packageName = 'twitter';
|
|
5
|
+
const sdkUrl = 'https://static.ads-twitter.com/uwt.js';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
4
8
|
const snippet = () => {
|
|
5
9
|
if (!window || !document || window.twq) {
|
|
6
10
|
return;
|
|
@@ -16,7 +20,7 @@ var ProvidersTwitterSdk = (function () {
|
|
|
16
20
|
n['queue'] = [];
|
|
17
21
|
const element = document.createElement('script');
|
|
18
22
|
element.async = !0;
|
|
19
|
-
element.src =
|
|
23
|
+
element.src = sdkUrl;
|
|
20
24
|
const script = document.getElementsByTagName('script')[0];
|
|
21
25
|
if (script && script.parentNode) {
|
|
22
26
|
script.parentNode.insertBefore(element, script);
|
|
@@ -80,7 +84,7 @@ var ProvidersTwitterSdk = (function () {
|
|
|
80
84
|
};
|
|
81
85
|
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
82
86
|
const payload = {
|
|
83
|
-
sdkVersion: "0.
|
|
87
|
+
sdkVersion: "0.30.1" ,
|
|
84
88
|
};
|
|
85
89
|
if (window.twq && manifestVariables['enableBrowser'] === '1') {
|
|
86
90
|
const twitterEventId = getEventId(eventName, manifestVariables['mappedConversions']);
|
|
@@ -92,8 +96,9 @@ var ProvidersTwitterSdk = (function () {
|
|
|
92
96
|
return payload;
|
|
93
97
|
};
|
|
94
98
|
|
|
99
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
95
100
|
const data = {
|
|
96
|
-
name:
|
|
101
|
+
name: packageName,
|
|
97
102
|
tag,
|
|
98
103
|
init,
|
|
99
104
|
};
|
package/index.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
const packageName = 'twitter';
|
|
2
|
+
const sdkUrl = 'https://static.ads-twitter.com/uwt.js';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
1
5
|
const snippet = () => {
|
|
2
6
|
if (!window || !document || window.twq) {
|
|
3
7
|
return;
|
|
@@ -13,7 +17,7 @@ const snippet = () => {
|
|
|
13
17
|
n['queue'] = [];
|
|
14
18
|
const element = document.createElement('script');
|
|
15
19
|
element.async = !0;
|
|
16
|
-
element.src =
|
|
20
|
+
element.src = sdkUrl;
|
|
17
21
|
const script = document.getElementsByTagName('script')[0];
|
|
18
22
|
if (script && script.parentNode) {
|
|
19
23
|
script.parentNode.insertBefore(element, script);
|
|
@@ -77,7 +81,7 @@ const getEventId = (event, conversions) => {
|
|
|
77
81
|
};
|
|
78
82
|
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
79
83
|
const payload = {
|
|
80
|
-
sdkVersion: "0.
|
|
84
|
+
sdkVersion: "0.30.1" ,
|
|
81
85
|
};
|
|
82
86
|
if (window.twq && manifestVariables['enableBrowser'] === '1') {
|
|
83
87
|
const twitterEventId = getEventId(eventName, manifestVariables['mappedConversions']);
|
|
@@ -89,8 +93,9 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
89
93
|
return payload;
|
|
90
94
|
};
|
|
91
95
|
|
|
96
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
92
97
|
const data = {
|
|
93
|
-
name:
|
|
98
|
+
name: packageName,
|
|
94
99
|
tag,
|
|
95
100
|
init,
|
|
96
101
|
};
|