@blotoutio/providers-pinterest-sdk 0.28.0 → 0.30.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 +10 -7
- package/index.js +10 -7
- package/index.mjs +10 -7
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const packageName = 'pinterest';
|
|
4
|
+
const sdkUrl = 'https://s.pinimg.com/ct/core.js';
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
3
7
|
const snippet = () => {
|
|
4
8
|
if (!window || !document || window.pintrk) {
|
|
5
9
|
return;
|
|
@@ -16,7 +20,7 @@ const snippet = () => {
|
|
|
16
20
|
n.version = '3.0';
|
|
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);
|
|
@@ -38,11 +42,9 @@ const getPinterestEventName = (name) => {
|
|
|
38
42
|
case 'Purchase': {
|
|
39
43
|
return 'checkout';
|
|
40
44
|
}
|
|
41
|
-
case 'PageView':
|
|
42
|
-
return 'pagevisit';
|
|
43
|
-
}
|
|
45
|
+
case 'PageView':
|
|
44
46
|
case 'ViewContent': {
|
|
45
|
-
return '
|
|
47
|
+
return 'pagevisit';
|
|
46
48
|
}
|
|
47
49
|
case 'AddToCart': {
|
|
48
50
|
return 'addtocart';
|
|
@@ -138,12 +140,13 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
138
140
|
});
|
|
139
141
|
}
|
|
140
142
|
return {
|
|
141
|
-
sdkVersion: "0.
|
|
143
|
+
sdkVersion: "0.30.0" ,
|
|
142
144
|
};
|
|
143
145
|
};
|
|
144
146
|
|
|
147
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
145
148
|
const data = {
|
|
146
|
-
name:
|
|
149
|
+
name: packageName,
|
|
147
150
|
tag,
|
|
148
151
|
init,
|
|
149
152
|
};
|
package/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
var ProvidersPinterestSdk = (function () {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
const packageName = 'pinterest';
|
|
5
|
+
const sdkUrl = 'https://s.pinimg.com/ct/core.js';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
4
8
|
const snippet = () => {
|
|
5
9
|
if (!window || !document || window.pintrk) {
|
|
6
10
|
return;
|
|
@@ -17,7 +21,7 @@ var ProvidersPinterestSdk = (function () {
|
|
|
17
21
|
n.version = '3.0';
|
|
18
22
|
const element = document.createElement('script');
|
|
19
23
|
element.async = !0;
|
|
20
|
-
element.src =
|
|
24
|
+
element.src = sdkUrl;
|
|
21
25
|
const script = document.getElementsByTagName('script')[0];
|
|
22
26
|
if (script && script.parentNode) {
|
|
23
27
|
script.parentNode.insertBefore(element, script);
|
|
@@ -39,11 +43,9 @@ var ProvidersPinterestSdk = (function () {
|
|
|
39
43
|
case 'Purchase': {
|
|
40
44
|
return 'checkout';
|
|
41
45
|
}
|
|
42
|
-
case 'PageView':
|
|
43
|
-
return 'pagevisit';
|
|
44
|
-
}
|
|
46
|
+
case 'PageView':
|
|
45
47
|
case 'ViewContent': {
|
|
46
|
-
return '
|
|
48
|
+
return 'pagevisit';
|
|
47
49
|
}
|
|
48
50
|
case 'AddToCart': {
|
|
49
51
|
return 'addtocart';
|
|
@@ -139,12 +141,13 @@ var ProvidersPinterestSdk = (function () {
|
|
|
139
141
|
});
|
|
140
142
|
}
|
|
141
143
|
return {
|
|
142
|
-
sdkVersion: "0.
|
|
144
|
+
sdkVersion: "0.30.0" ,
|
|
143
145
|
};
|
|
144
146
|
};
|
|
145
147
|
|
|
148
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
146
149
|
const data = {
|
|
147
|
-
name:
|
|
150
|
+
name: packageName,
|
|
148
151
|
tag,
|
|
149
152
|
init,
|
|
150
153
|
};
|
package/index.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
const packageName = 'pinterest';
|
|
2
|
+
const sdkUrl = 'https://s.pinimg.com/ct/core.js';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
1
5
|
const snippet = () => {
|
|
2
6
|
if (!window || !document || window.pintrk) {
|
|
3
7
|
return;
|
|
@@ -14,7 +18,7 @@ const snippet = () => {
|
|
|
14
18
|
n.version = '3.0';
|
|
15
19
|
const element = document.createElement('script');
|
|
16
20
|
element.async = !0;
|
|
17
|
-
element.src =
|
|
21
|
+
element.src = sdkUrl;
|
|
18
22
|
const script = document.getElementsByTagName('script')[0];
|
|
19
23
|
if (script && script.parentNode) {
|
|
20
24
|
script.parentNode.insertBefore(element, script);
|
|
@@ -36,11 +40,9 @@ const getPinterestEventName = (name) => {
|
|
|
36
40
|
case 'Purchase': {
|
|
37
41
|
return 'checkout';
|
|
38
42
|
}
|
|
39
|
-
case 'PageView':
|
|
40
|
-
return 'pagevisit';
|
|
41
|
-
}
|
|
43
|
+
case 'PageView':
|
|
42
44
|
case 'ViewContent': {
|
|
43
|
-
return '
|
|
45
|
+
return 'pagevisit';
|
|
44
46
|
}
|
|
45
47
|
case 'AddToCart': {
|
|
46
48
|
return 'addtocart';
|
|
@@ -136,12 +138,13 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
136
138
|
});
|
|
137
139
|
}
|
|
138
140
|
return {
|
|
139
|
-
sdkVersion: "0.
|
|
141
|
+
sdkVersion: "0.30.0" ,
|
|
140
142
|
};
|
|
141
143
|
};
|
|
142
144
|
|
|
145
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
143
146
|
const data = {
|
|
144
|
-
name:
|
|
147
|
+
name: packageName,
|
|
145
148
|
tag,
|
|
146
149
|
init,
|
|
147
150
|
};
|