@blotoutio/providers-pinterest-sdk 0.31.0 → 0.33.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 +8 -4
- package/index.js +8 -4
- package/index.mjs +8 -4
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -35,6 +35,7 @@ const init = ({ manifest }) => {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
window.pintrk('load', manifest.variables['pixelId']);
|
|
38
|
+
window.pintrk('page');
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
const getPinterestEventName = (name) => {
|
|
@@ -143,7 +144,11 @@ const prepareData = (data, idMapping) => {
|
|
|
143
144
|
}
|
|
144
145
|
return payload;
|
|
145
146
|
};
|
|
146
|
-
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
147
|
+
const tag = ({ data, eventName, manifestVariables, eventId, executionContext, }) => {
|
|
148
|
+
const result = { sdkVersion: "0.33.0" };
|
|
149
|
+
if (executionContext.get('pixelFired')) {
|
|
150
|
+
return result;
|
|
151
|
+
}
|
|
147
152
|
if (window.pintrk && manifestVariables['pixelId']) {
|
|
148
153
|
const name = data['skipTransformation']
|
|
149
154
|
? eventName
|
|
@@ -152,14 +157,13 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
152
157
|
? data
|
|
153
158
|
: prepareData(data, manifestVariables['productIdMapping']);
|
|
154
159
|
delete eventData['skipTransformation'];
|
|
160
|
+
executionContext.set('pixelFired', true);
|
|
155
161
|
window.pintrk('track', name, {
|
|
156
162
|
...eventData,
|
|
157
163
|
event_id: eventId.toString(),
|
|
158
164
|
});
|
|
159
165
|
}
|
|
160
|
-
return
|
|
161
|
-
sdkVersion: "0.31.0" ,
|
|
162
|
-
};
|
|
166
|
+
return result;
|
|
163
167
|
};
|
|
164
168
|
|
|
165
169
|
// eslint-disable-next-line @nx/enforce-module-boundaries
|
package/index.js
CHANGED
|
@@ -36,6 +36,7 @@ var ProvidersPinterestSdk = (function () {
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
window.pintrk('load', manifest.variables['pixelId']);
|
|
39
|
+
window.pintrk('page');
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
const getPinterestEventName = (name) => {
|
|
@@ -144,7 +145,11 @@ var ProvidersPinterestSdk = (function () {
|
|
|
144
145
|
}
|
|
145
146
|
return payload;
|
|
146
147
|
};
|
|
147
|
-
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
148
|
+
const tag = ({ data, eventName, manifestVariables, eventId, executionContext, }) => {
|
|
149
|
+
const result = { sdkVersion: "0.33.0" };
|
|
150
|
+
if (executionContext.get('pixelFired')) {
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
148
153
|
if (window.pintrk && manifestVariables['pixelId']) {
|
|
149
154
|
const name = data['skipTransformation']
|
|
150
155
|
? eventName
|
|
@@ -153,14 +158,13 @@ var ProvidersPinterestSdk = (function () {
|
|
|
153
158
|
? data
|
|
154
159
|
: prepareData(data, manifestVariables['productIdMapping']);
|
|
155
160
|
delete eventData['skipTransformation'];
|
|
161
|
+
executionContext.set('pixelFired', true);
|
|
156
162
|
window.pintrk('track', name, {
|
|
157
163
|
...eventData,
|
|
158
164
|
event_id: eventId.toString(),
|
|
159
165
|
});
|
|
160
166
|
}
|
|
161
|
-
return
|
|
162
|
-
sdkVersion: "0.31.0" ,
|
|
163
|
-
};
|
|
167
|
+
return result;
|
|
164
168
|
};
|
|
165
169
|
|
|
166
170
|
// eslint-disable-next-line @nx/enforce-module-boundaries
|
package/index.mjs
CHANGED
|
@@ -33,6 +33,7 @@ const init = ({ manifest }) => {
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
window.pintrk('load', manifest.variables['pixelId']);
|
|
36
|
+
window.pintrk('page');
|
|
36
37
|
};
|
|
37
38
|
|
|
38
39
|
const getPinterestEventName = (name) => {
|
|
@@ -141,7 +142,11 @@ const prepareData = (data, idMapping) => {
|
|
|
141
142
|
}
|
|
142
143
|
return payload;
|
|
143
144
|
};
|
|
144
|
-
const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
145
|
+
const tag = ({ data, eventName, manifestVariables, eventId, executionContext, }) => {
|
|
146
|
+
const result = { sdkVersion: "0.33.0" };
|
|
147
|
+
if (executionContext.get('pixelFired')) {
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
145
150
|
if (window.pintrk && manifestVariables['pixelId']) {
|
|
146
151
|
const name = data['skipTransformation']
|
|
147
152
|
? eventName
|
|
@@ -150,14 +155,13 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
|
|
|
150
155
|
? data
|
|
151
156
|
: prepareData(data, manifestVariables['productIdMapping']);
|
|
152
157
|
delete eventData['skipTransformation'];
|
|
158
|
+
executionContext.set('pixelFired', true);
|
|
153
159
|
window.pintrk('track', name, {
|
|
154
160
|
...eventData,
|
|
155
161
|
event_id: eventId.toString(),
|
|
156
162
|
});
|
|
157
163
|
}
|
|
158
|
-
return
|
|
159
|
-
sdkVersion: "0.31.0" ,
|
|
160
|
-
};
|
|
164
|
+
return result;
|
|
161
165
|
};
|
|
162
166
|
|
|
163
167
|
// eslint-disable-next-line @nx/enforce-module-boundaries
|