@guardian/commercial-core 0.39.0 → 0.39.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/dist/cjs/ad-sizes.d.ts +1 -1
- package/dist/cjs/ad-sizes.js +10 -10
- package/dist/cjs/targeting/viewport.js +1 -1
- package/dist/cjs/third-party-tags/facebook-pixel.d.ts +5 -0
- package/dist/cjs/third-party-tags/facebook-pixel.js +5 -0
- package/dist/cjs/third-party-tags/ias.d.ts +5 -0
- package/dist/cjs/third-party-tags/ias.js +5 -0
- package/dist/cjs/third-party-tags/inizio.d.ts +5 -0
- package/dist/cjs/third-party-tags/inizio.js +5 -0
- package/dist/cjs/third-party-tags/permutive.d.ts +4 -0
- package/dist/cjs/third-party-tags/permutive.js +4 -0
- package/dist/cjs/third-party-tags/remarketing.d.ts +5 -0
- package/dist/cjs/third-party-tags/remarketing.js +5 -0
- package/dist/cjs/third-party-tags/twitter-uwt.d.ts +5 -0
- package/dist/cjs/third-party-tags/twitter-uwt.js +5 -0
- package/dist/esm/ad-sizes.d.ts +1 -1
- package/dist/esm/ad-sizes.js +10 -10
- package/dist/esm/targeting/viewport.js +1 -1
- package/dist/esm/third-party-tags/facebook-pixel.d.ts +5 -0
- package/dist/esm/third-party-tags/facebook-pixel.js +5 -0
- package/dist/esm/third-party-tags/ias.d.ts +5 -0
- package/dist/esm/third-party-tags/ias.js +5 -0
- package/dist/esm/third-party-tags/inizio.d.ts +5 -0
- package/dist/esm/third-party-tags/inizio.js +5 -0
- package/dist/esm/third-party-tags/permutive.d.ts +4 -0
- package/dist/esm/third-party-tags/permutive.js +4 -0
- package/dist/esm/third-party-tags/remarketing.d.ts +5 -0
- package/dist/esm/third-party-tags/remarketing.js +5 -0
- package/dist/esm/third-party-tags/twitter-uwt.d.ts +5 -0
- package/dist/esm/third-party-tags/twitter-uwt.js +5 -0
- package/package.json +4 -4
package/dist/cjs/ad-sizes.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare type AdSize = Readonly<{
|
|
|
4
4
|
height: number;
|
|
5
5
|
toString: () => AdSizeString;
|
|
6
6
|
}>;
|
|
7
|
-
export declare type SizeKeys = '
|
|
7
|
+
export declare type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'skyscraper' | 'video';
|
|
8
8
|
export declare const adSizes: Record<SizeKeys, AdSize>;
|
|
9
9
|
export declare const getAdSize: (size: SizeKeys) => AdSize;
|
|
10
10
|
export declare const _: {
|
package/dist/cjs/ad-sizes.js
CHANGED
|
@@ -12,27 +12,27 @@ const createAdSize = (width, height) => {
|
|
|
12
12
|
const adSizesPartial = {
|
|
13
13
|
// standard ad sizes
|
|
14
14
|
billboard: createAdSize(970, 250),
|
|
15
|
+
halfPage: createAdSize(300, 600),
|
|
15
16
|
leaderboard: createAdSize(728, 90),
|
|
17
|
+
mobilesticky: createAdSize(320, 50),
|
|
16
18
|
mpu: createAdSize(300, 250),
|
|
17
|
-
halfPage: createAdSize(300, 600),
|
|
18
19
|
portrait: createAdSize(300, 1050),
|
|
19
20
|
skyscraper: createAdSize(160, 600),
|
|
20
|
-
mobilesticky: createAdSize(320, 50),
|
|
21
21
|
// dfp proprietary ad sizes
|
|
22
22
|
fluid: createAdSize(0, 0),
|
|
23
|
-
outOfPage: createAdSize(1, 1),
|
|
24
23
|
googleCard: createAdSize(300, 274),
|
|
24
|
+
outOfPage: createAdSize(1, 1),
|
|
25
25
|
// guardian proprietary ad sizes
|
|
26
|
-
|
|
26
|
+
empty: createAdSize(2, 2),
|
|
27
|
+
fabric: createAdSize(88, 71),
|
|
28
|
+
inlineMerchandising: createAdSize(88, 85),
|
|
29
|
+
merchandising: createAdSize(88, 88),
|
|
30
|
+
merchandisingHigh: createAdSize(88, 87),
|
|
31
|
+
merchandisingHighAdFeature: createAdSize(88, 89),
|
|
27
32
|
outstreamDesktop: createAdSize(620, 350),
|
|
28
33
|
outstreamGoogleDesktop: createAdSize(550, 310),
|
|
29
34
|
outstreamMobile: createAdSize(300, 197),
|
|
30
|
-
|
|
31
|
-
merchandisingHigh: createAdSize(88, 87),
|
|
32
|
-
merchandising: createAdSize(88, 88),
|
|
33
|
-
inlineMerchandising: createAdSize(88, 85),
|
|
34
|
-
fabric: createAdSize(88, 71),
|
|
35
|
-
empty: createAdSize(2, 2),
|
|
35
|
+
video: createAdSize(620, 1),
|
|
36
36
|
};
|
|
37
37
|
exports.adSizes = {
|
|
38
38
|
...adSizesPartial,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fbPixel = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* tracking pixel
|
|
6
|
+
* https://en-gb.facebook.com/business/learn/facebook-ads-pixel
|
|
7
|
+
* @param {} {shouldRun}
|
|
8
|
+
*/
|
|
4
9
|
const fbPixel = ({ shouldRun }) => ({
|
|
5
10
|
shouldRun,
|
|
6
11
|
url: `https://www.facebook.com/tr?id=279880532344561&ev=PageView&noscript=1`,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ias = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* IAS script filters bad ads
|
|
6
|
+
* https://integralads.com/uk/
|
|
7
|
+
* @param {} {shouldRun}
|
|
8
|
+
*/
|
|
4
9
|
const ias = ({ shouldRun }) => ({
|
|
5
10
|
shouldRun,
|
|
6
11
|
url: '//cdn.adsafeprotected.com/iasPET.1.js',
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { GetThirdPartyTag } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Allows creatives to show survey
|
|
4
|
+
* https://trello.com/c/wHffHVF1/171-integrate-and-test-inizio
|
|
5
|
+
* @param {} {shouldRun}
|
|
6
|
+
*/
|
|
2
7
|
export declare const inizio: GetThirdPartyTag;
|
|
3
8
|
export declare const _: {
|
|
4
9
|
onLoad: () => void;
|
|
@@ -21,6 +21,11 @@ const onLoad = () => {
|
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Allows creatives to show survey
|
|
26
|
+
* https://trello.com/c/wHffHVF1/171-integrate-and-test-inizio
|
|
27
|
+
* @param {} {shouldRun}
|
|
28
|
+
*/
|
|
24
29
|
const inizio = ({ shouldRun }) => ({
|
|
25
30
|
shouldRun,
|
|
26
31
|
url: '//cdn.brandmetrics.com/survey/script/e96d04c832084488a841a06b49b8fb2d.js',
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.permutive = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Permutive script updates local user segmentation data
|
|
6
|
+
* @param {} {shouldRun}
|
|
7
|
+
*/
|
|
4
8
|
const permutive = ({ shouldRun }) => ({
|
|
5
9
|
shouldRun,
|
|
6
10
|
url: '//cdn.permutive.com/d6691a17-6fdb-4d26-85d6-b3dd27f55f08-web.js',
|
|
@@ -8,6 +8,11 @@ const onLoad = () => {
|
|
|
8
8
|
google_remarketing_only: true,
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Google conversion tracking
|
|
13
|
+
* https://support.google.com/google-ads/answer/6095821
|
|
14
|
+
* @param {} {shouldRun}
|
|
15
|
+
*/
|
|
11
16
|
const remarketing = ({ shouldRun }) => ({
|
|
12
17
|
shouldRun,
|
|
13
18
|
url: '//www.googleadservices.com/pagead/conversion_async.js',
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { GetThirdPartyTag } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* tracking pixel
|
|
4
|
+
* https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html
|
|
5
|
+
* @param {} {shouldRun}
|
|
6
|
+
*/
|
|
2
7
|
export declare const twitter: GetThirdPartyTag;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.twitter = void 0;
|
|
4
4
|
const twitter_script_1 = require("../__vendor/twitter-script");
|
|
5
|
+
/**
|
|
6
|
+
* tracking pixel
|
|
7
|
+
* https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html
|
|
8
|
+
* @param {} {shouldRun}
|
|
9
|
+
*/
|
|
5
10
|
const twitter = ({ shouldRun }) => ({
|
|
6
11
|
shouldRun,
|
|
7
12
|
name: 'twitter',
|
package/dist/esm/ad-sizes.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare type AdSize = Readonly<{
|
|
|
4
4
|
height: number;
|
|
5
5
|
toString: () => AdSizeString;
|
|
6
6
|
}>;
|
|
7
|
-
export declare type SizeKeys = '
|
|
7
|
+
export declare type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'skyscraper' | 'video';
|
|
8
8
|
export declare const adSizes: Record<SizeKeys, AdSize>;
|
|
9
9
|
export declare const getAdSize: (size: SizeKeys) => AdSize;
|
|
10
10
|
export declare const _: {
|
package/dist/esm/ad-sizes.js
CHANGED
|
@@ -9,27 +9,27 @@ const createAdSize = (width, height) => {
|
|
|
9
9
|
const adSizesPartial = {
|
|
10
10
|
// standard ad sizes
|
|
11
11
|
billboard: createAdSize(970, 250),
|
|
12
|
+
halfPage: createAdSize(300, 600),
|
|
12
13
|
leaderboard: createAdSize(728, 90),
|
|
14
|
+
mobilesticky: createAdSize(320, 50),
|
|
13
15
|
mpu: createAdSize(300, 250),
|
|
14
|
-
halfPage: createAdSize(300, 600),
|
|
15
16
|
portrait: createAdSize(300, 1050),
|
|
16
17
|
skyscraper: createAdSize(160, 600),
|
|
17
|
-
mobilesticky: createAdSize(320, 50),
|
|
18
18
|
// dfp proprietary ad sizes
|
|
19
19
|
fluid: createAdSize(0, 0),
|
|
20
|
-
outOfPage: createAdSize(1, 1),
|
|
21
20
|
googleCard: createAdSize(300, 274),
|
|
21
|
+
outOfPage: createAdSize(1, 1),
|
|
22
22
|
// guardian proprietary ad sizes
|
|
23
|
-
|
|
23
|
+
empty: createAdSize(2, 2),
|
|
24
|
+
fabric: createAdSize(88, 71),
|
|
25
|
+
inlineMerchandising: createAdSize(88, 85),
|
|
26
|
+
merchandising: createAdSize(88, 88),
|
|
27
|
+
merchandisingHigh: createAdSize(88, 87),
|
|
28
|
+
merchandisingHighAdFeature: createAdSize(88, 89),
|
|
24
29
|
outstreamDesktop: createAdSize(620, 350),
|
|
25
30
|
outstreamGoogleDesktop: createAdSize(550, 310),
|
|
26
31
|
outstreamMobile: createAdSize(300, 197),
|
|
27
|
-
|
|
28
|
-
merchandisingHigh: createAdSize(88, 87),
|
|
29
|
-
merchandising: createAdSize(88, 88),
|
|
30
|
-
inlineMerchandising: createAdSize(88, 85),
|
|
31
|
-
fabric: createAdSize(88, 71),
|
|
32
|
-
empty: createAdSize(2, 2),
|
|
32
|
+
video: createAdSize(620, 1),
|
|
33
33
|
};
|
|
34
34
|
export const adSizes = {
|
|
35
35
|
...adSizesPartial,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { GetThirdPartyTag } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Allows creatives to show survey
|
|
4
|
+
* https://trello.com/c/wHffHVF1/171-integrate-and-test-inizio
|
|
5
|
+
* @param {} {shouldRun}
|
|
6
|
+
*/
|
|
2
7
|
export declare const inizio: GetThirdPartyTag;
|
|
3
8
|
export declare const _: {
|
|
4
9
|
onLoad: () => void;
|
|
@@ -18,6 +18,11 @@ const onLoad = () => {
|
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Allows creatives to show survey
|
|
23
|
+
* https://trello.com/c/wHffHVF1/171-integrate-and-test-inizio
|
|
24
|
+
* @param {} {shouldRun}
|
|
25
|
+
*/
|
|
21
26
|
export const inizio = ({ shouldRun }) => ({
|
|
22
27
|
shouldRun,
|
|
23
28
|
url: '//cdn.brandmetrics.com/survey/script/e96d04c832084488a841a06b49b8fb2d.js',
|
|
@@ -5,6 +5,11 @@ const onLoad = () => {
|
|
|
5
5
|
google_remarketing_only: true,
|
|
6
6
|
});
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Google conversion tracking
|
|
10
|
+
* https://support.google.com/google-ads/answer/6095821
|
|
11
|
+
* @param {} {shouldRun}
|
|
12
|
+
*/
|
|
8
13
|
export const remarketing = ({ shouldRun }) => ({
|
|
9
14
|
shouldRun,
|
|
10
15
|
url: '//www.googleadservices.com/pagead/conversion_async.js',
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { GetThirdPartyTag } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* tracking pixel
|
|
4
|
+
* https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html
|
|
5
|
+
* @param {} {shouldRun}
|
|
6
|
+
*/
|
|
2
7
|
export declare const twitter: GetThirdPartyTag;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { twitterScript as insertSnippet } from '../__vendor/twitter-script';
|
|
2
|
+
/**
|
|
3
|
+
* tracking pixel
|
|
4
|
+
* https://business.twitter.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites.html
|
|
5
|
+
* @param {} {shouldRun}
|
|
6
|
+
*/
|
|
2
7
|
export const twitter = ({ shouldRun }) => ({
|
|
3
8
|
shouldRun,
|
|
4
9
|
name: 'twitter',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guardian/commercial-core",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.1",
|
|
4
4
|
"description": "Guardian advertising business logic",
|
|
5
5
|
"homepage": "https://github.com/guardian/commercial-core#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
},
|
|
42
42
|
"prettier": "@guardian/prettier",
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@commitlint/cli": "^
|
|
45
|
-
"@commitlint/config-conventional": "^
|
|
44
|
+
"@commitlint/cli": "^16.1.0",
|
|
45
|
+
"@commitlint/config-conventional": "^16.0.0",
|
|
46
46
|
"@guardian/ab-core": "^2.0.0",
|
|
47
47
|
"@guardian/consent-management-platform": "^10.1.0",
|
|
48
48
|
"@guardian/eslint-config-typescript": "^0.7.0",
|
|
49
|
-
"@guardian/libs": "3.
|
|
49
|
+
"@guardian/libs": "3.6.1",
|
|
50
50
|
"@guardian/prettier": "^0.7.0",
|
|
51
51
|
"@octokit/core": "^3.5.1",
|
|
52
52
|
"@semantic-release/github": "^8.0.2",
|