gatsby-core-theme 32.0.0 → 32.0.2
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [32.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.1...v32.0.2) (2024-05-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added props for aria-label and title ([747243c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/747243c71c7a3801644ebb98fb72174d39e1c467))
|
|
7
|
+
* ammended implementation ([19e26c1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/19e26c1fed853487a322da46c2625ed7ed246c03))
|
|
8
|
+
* implemented on cta ([5650f82](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5650f82b871cc5d0447373d89f938a5373a8528d))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
* Merge branch 'tm-4323-pretty-link-props' into 'master' ([a8f0ca5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a8f0ca5c7b0edad285b74c6aaf0d4c17d6a965ae))
|
|
12
|
+
|
|
13
|
+
## [32.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v32.0.0...v32.0.1) (2024-05-30)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* tracker ([72f0022](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/72f0022e49a21ab9e6a7750a090257aac6058072))
|
|
19
|
+
|
|
1
20
|
# [32.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v31.0.2...v32.0.0) (2024-05-28)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ const OperatorCtaButton = ({
|
|
|
18
18
|
buttonSize = '',
|
|
19
19
|
module = null,
|
|
20
20
|
tracker = 'main',
|
|
21
|
+
titleSuffix,
|
|
21
22
|
icon = null,
|
|
22
23
|
translationsObj = {
|
|
23
24
|
active: { translationKey: 'play_now', defaultValue: 'Visit' },
|
|
@@ -74,8 +75,12 @@ const OperatorCtaButton = ({
|
|
|
74
75
|
return status === 'active' ? (
|
|
75
76
|
<a
|
|
76
77
|
href={prettyLink || '#'}
|
|
77
|
-
title={typeof translateBtn === 'string' ? translateBtn : ''}
|
|
78
|
-
|
|
78
|
+
title={`${typeof translateBtn === 'string' ? translateBtn : ''} ${
|
|
79
|
+
titleSuffix || ''
|
|
80
|
+
}`.trimEnd()}
|
|
81
|
+
aria-label={`${typeof translateBtn === 'string' ? translateBtn : ''} ${
|
|
82
|
+
titleSuffix || ''
|
|
83
|
+
}`.trimEnd()}
|
|
79
84
|
className={`${classes} ${gtmClass}`}
|
|
80
85
|
target="_blank"
|
|
81
86
|
rel={rel}
|
|
@@ -86,8 +91,12 @@ const OperatorCtaButton = ({
|
|
|
86
91
|
</a>
|
|
87
92
|
) : (
|
|
88
93
|
<div
|
|
89
|
-
title={typeof translateBtn === 'string' ? translateBtn : ''}
|
|
90
|
-
|
|
94
|
+
title={`${typeof translateBtn === 'string' ? translateBtn : ''} ${
|
|
95
|
+
titleSuffix || ''
|
|
96
|
+
}`.trimEnd()}
|
|
97
|
+
aria-label={`${typeof translateBtn === 'string' ? translateBtn : ''} ${
|
|
98
|
+
titleSuffix || ''
|
|
99
|
+
}`.trimEnd()}
|
|
91
100
|
className={`${classes || ''} ${gtmClass || ''}`}
|
|
92
101
|
>
|
|
93
102
|
{translateBtn}
|
|
@@ -101,6 +110,7 @@ OperatorCtaButton.propTypes = {
|
|
|
101
110
|
name: PropTypes.string,
|
|
102
111
|
status: PropTypes.string,
|
|
103
112
|
}),
|
|
113
|
+
titleSuffix: PropTypes.string,
|
|
104
114
|
gtmClass: PropTypes.string,
|
|
105
115
|
pageTemplate: PropTypes.string,
|
|
106
116
|
buttonSize: PropTypes.string,
|
|
@@ -12,7 +12,7 @@ const PrettyLink = ({
|
|
|
12
12
|
pageTemplate,
|
|
13
13
|
module,
|
|
14
14
|
tracker,
|
|
15
|
-
|
|
15
|
+
titleSuffix,
|
|
16
16
|
className,
|
|
17
17
|
children,
|
|
18
18
|
rel = 'nofollow noreferrer sponsored',
|
|
@@ -48,11 +48,11 @@ const PrettyLink = ({
|
|
|
48
48
|
return (
|
|
49
49
|
<a
|
|
50
50
|
href={prettyLink || '#'}
|
|
51
|
-
title={operator?.name}
|
|
51
|
+
title={`${operator?.name} ${titleSuffix || ''}`.trimEnd()}
|
|
52
52
|
className={className}
|
|
53
53
|
target="_blank"
|
|
54
54
|
rel={rel}
|
|
55
|
-
aria-label={`${operator?.name} Link`}
|
|
55
|
+
aria-label={`${operator?.name} ${titleSuffix || 'Link'}`}
|
|
56
56
|
onClick={onCTAClick}
|
|
57
57
|
>
|
|
58
58
|
{children}
|
|
@@ -66,8 +66,8 @@ PrettyLink.propTypes = {
|
|
|
66
66
|
}),
|
|
67
67
|
pageTemplate: PropTypes.string,
|
|
68
68
|
module: PropTypes.string,
|
|
69
|
+
titleSuffix: PropTypes.string,
|
|
69
70
|
tracker: PropTypes.string,
|
|
70
|
-
clickedElement: PropTypes.string,
|
|
71
71
|
className: PropTypes.string,
|
|
72
72
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.any]),
|
|
73
73
|
rel: PropTypes.string,
|
|
@@ -11,6 +11,7 @@ export default function BonusBox({
|
|
|
11
11
|
splitBy = '+',
|
|
12
12
|
feSeparator = '+',
|
|
13
13
|
module = 'bonus_box',
|
|
14
|
+
titleSuffix,
|
|
14
15
|
}) {
|
|
15
16
|
const data = getBonusData(item, tracker, splitBy);
|
|
16
17
|
|
|
@@ -20,6 +21,7 @@ export default function BonusBox({
|
|
|
20
21
|
pageTemplate={pageTemplate}
|
|
21
22
|
module={module}
|
|
22
23
|
tracker={tracker}
|
|
24
|
+
titleSuffix={titleSuffix}
|
|
23
25
|
clickedElement="oneliner"
|
|
24
26
|
className={`${styles.detailsBox} ${'bonus-box-gtm'}`}
|
|
25
27
|
>
|
|
@@ -38,4 +40,5 @@ BonusBox.propTypes = {
|
|
|
38
40
|
splitBy: PropTypes.string,
|
|
39
41
|
feSeparator: PropTypes.string,
|
|
40
42
|
module: PropTypes.string,
|
|
43
|
+
titleSuffix: PropTypes.string,
|
|
41
44
|
};
|
package/src/helpers/tracker.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-nested-ternary */
|
|
1
2
|
/* eslint-disable no-underscore-dangle */
|
|
2
3
|
import { generateTrackerLink } from '~helpers/generators';
|
|
3
4
|
|
|
@@ -90,6 +91,7 @@ export async function getAffiliateLink(operator, path, page, headers, url) {
|
|
|
90
91
|
facebook_browser_id: cookie ? cookie._fbp || null : null,
|
|
91
92
|
facebook_click_id: cookie ? cookie._fbc || null : null,
|
|
92
93
|
split_test_name: cookie ? cookie.split_test_name || null : null,
|
|
94
|
+
google_client_id: cookie ? cookie._ga || null : null,
|
|
93
95
|
split_test_variant: cookie ? cookie.split_test_variant || null : null,
|
|
94
96
|
facebook_pixel_id: process.env.PIXEL_ID || null,
|
|
95
97
|
...(isJsonString(cookie.affObject) ? JSON.parse(cookie.affObject) : {}),
|
|
@@ -102,7 +104,7 @@ export async function getAffiliateLink(operator, path, page, headers, url) {
|
|
|
102
104
|
: {}),
|
|
103
105
|
...(extraURLParams || {}),
|
|
104
106
|
};
|
|
105
|
-
|
|
107
|
+
|
|
106
108
|
const res = await fetch(
|
|
107
109
|
`${process.env.GATSBY_TRACKING_API_URL}?${new URLSearchParams(clean(urlParam)).toString()}`
|
|
108
110
|
).catch((err) => null);
|
|
@@ -115,6 +117,7 @@ export async function getAffiliateLink(operator, path, page, headers, url) {
|
|
|
115
117
|
|
|
116
118
|
export function getTrackingAPIParams(pageTemplate, module, tracker, clickedElement, url, referer) {
|
|
117
119
|
const urlParams = {};
|
|
120
|
+
let extraData = {}
|
|
118
121
|
|
|
119
122
|
if (pageTemplate) {
|
|
120
123
|
urlParams.page_type = pageTemplate;
|
|
@@ -137,22 +140,20 @@ export function getTrackingAPIParams(pageTemplate, module, tracker, clickedEleme
|
|
|
137
140
|
if (url && url.split('?').length === 2) {
|
|
138
141
|
// eslint-disable-next-line prefer-destructuring
|
|
139
142
|
urlParams.request_url = url.split('?')[0];
|
|
140
|
-
|
|
143
|
+
extraData = deparam(url.split('?')[1]);
|
|
141
144
|
|
|
142
145
|
if (extraData.msclkid) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (extraData.brevo_customer_id) {
|
|
147
|
-
urlParams.brevo_customer_id = extraData.brevo_customer_id;
|
|
146
|
+
extraData.microsoft_click_id = extraData.msclkid;
|
|
147
|
+
delete extraData.msclkid;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
if (extraData.gclid) {
|
|
151
|
-
|
|
151
|
+
extraData.google_click_id = extraData.gclid;
|
|
152
|
+
delete extraData.gclid;
|
|
152
153
|
}
|
|
153
154
|
} else if (url) {
|
|
154
155
|
urlParams.request_url = url;
|
|
155
156
|
}
|
|
156
|
-
|
|
157
|
-
return urlParams;
|
|
157
|
+
|
|
158
|
+
return {...urlParams, ...extraData};
|
|
158
159
|
}
|