Skip to content

Commit b1053b1

Browse files
Merge pull request #1955 from hpe-dev-incubator/google-analytics-4
Google analytics 4
2 parents 1a53454 + 18da5ad commit b1053b1

File tree

7 files changed

+120
-89
lines changed

7 files changed

+120
-89
lines changed

gatsby-config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,18 @@ module.exports = {
244244
head: true,
245245
},
246246
},
247+
{
248+
resolve: 'gatsby-plugin-google-gtag',
249+
options: {
250+
trackingIds: [
251+
'G-45LYYFDK5J', // Google Analytics / GA
252+
],
253+
pluginConfig: {
254+
// Puts tracking script in the head instead of the body
255+
head: true,
256+
},
257+
},
258+
},
247259
// {
248260
// resolve: 'gatsby-plugin-adobe-launch-hpe',
249261
// options: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"gatsby-plugin-catch-links": "^2.10.0",
2323
"gatsby-plugin-feed": "^2.13.0",
2424
"gatsby-plugin-google-analytics": "^2.11.0",
25+
"gatsby-plugin-google-gtag": "2.8.0",
2526
"gatsby-plugin-lunr": "^1.5.2",
2627
"gatsby-plugin-manifest": "2.4.34",
2728
"gatsby-plugin-netlify-cms": "^4.10.0",

src/components/Header/index.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
import { Menu, Search, FormDown } from 'grommet-icons';
1414
import styled from 'styled-components';
1515
import { AppContext } from '../../providers/AppProvider';
16-
import { ButtonLink, ExternalButtonLink } from '..';
16+
import { ButtonLink } from '..';
1717
import { UserMenu } from './UserMenu';
1818

1919
const { GATSBY_WORKSHOPCHALLENGE_API_ENDPOINT } = process.env;
@@ -38,27 +38,27 @@ function Header() {
3838
const greenlake = data?.greenlake?.edges;
3939

4040
const GreenLakeButtonLinks = ({ column }) => {
41-
/* const leftColumn = greenlake.filter((gl, index) => index % 2 === 0); */
42-
const leftColumn = greenlake;
43-
const rightColumn = greenlake.filter((gl, index) => index % 2);
44-
45-
const externalLinks = [
46-
{
47-
title: 'HPE GreenLake API Portal',
48-
slug: 'https://developer.greenlake.hpe.com/',
49-
},
50-
{
51-
title: 'HPE GreenLake Test Drive',
52-
slug: 'https://testdrive.greenlake.hpe.com/',
53-
},
54-
];
41+
/* const leftColumn = greenlake.filter((gl, index) => index % 2 === 0); */
42+
const leftColumn = greenlake;
43+
const rightColumn = greenlake.filter((gl, index) => index % 2);
5544

56-
const externalLeftColumn = externalLinks.filter(
57-
(el, index) => index % 2 === 0,
58-
);
59-
const externalRightColumn = externalLinks.filter((el, index) => index % 2);
60-
const externalLinksColumn =
61-
column === 'left' ? externalLeftColumn : externalRightColumn;
45+
// const externalLinks = [
46+
// {
47+
// title: 'HPE GreenLake API Portal',
48+
// slug: 'https://developer.greenlake.hpe.com/',
49+
// },
50+
// {
51+
// title: 'HPE GreenLake Test Drive',
52+
// slug: 'https://testdrive.greenlake.hpe.com/',
53+
// },
54+
// ];
55+
56+
// const externalLeftColumn = externalLinks.filter(
57+
// (el, index) => index % 2 === 0,
58+
// );
59+
// const externalRightColumn = externalLinks.filter((el, index) => index % 2);
60+
// const externalLinksColumn =
61+
// column === 'left' ? externalLeftColumn : externalRightColumn;
6262
const greenlakeColumn = column === 'left' ? leftColumn : rightColumn;
6363

6464
const glColumns = greenlakeColumn.map((gl, index) => {
@@ -75,19 +75,19 @@ function Header() {
7575
/>
7676
);
7777
});
78-
const elColumns = externalLinksColumn.map((el, index) => {
79-
const { slug, title } = el;
80-
return (
81-
<ExternalButtonLink
82-
key={index}
83-
label={title}
84-
to={`${slug}`}
85-
alignSelf="start"
86-
fill="horizontal"
87-
/>
88-
);
89-
});
90-
const allLinks = [/* ...elColumns, */...glColumns];
78+
// const elColumns = externalLinksColumn.map((el, index) => {
79+
// const { slug, title } = el;
80+
// return (
81+
// <ExternalButtonLink
82+
// key={index}
83+
// label={title}
84+
// to={`${slug}`}
85+
// alignSelf="start"
86+
// fill="horizontal"
87+
// />
88+
// );
89+
// });
90+
const allLinks = [/* ...elColumns, */ ...glColumns];
9191
return allLinks;
9292
};
9393
// const iframeRef = useRef();
@@ -205,7 +205,7 @@ function Header() {
205205
<TextAlignLeft>
206206
<GreenLakeButtonLinks column="left" />
207207
</TextAlignLeft>
208-
{/* <TextAlignLeft>
208+
{/* <TextAlignLeft>
209209
<GreenLakeButtonLinks column="right" />
210210
</TextAlignLeft> */}
211211
</Box>

src/pages/hackshack/hpediscover2023-participations-terms-conditions/index.js

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,14 @@ const ParticipationTC = () => {
9494
<ul>
9595
<li>Complete one (1) Hack Shack Workshops-on-demand challenge</li>
9696
<li>Complete the Hack Shack Treasure Hunt</li>
97-
<li>Attend one Hack Shack Meet-the-Expert session or customer discussion meetup</li>
9897
<li>
99-
Attend the Hack Shack celebration evening on Wednesday, June 21
100-
at 5:30 PM Pacific Time at the Hack Shack zone in the Event show floor
101-
and complete the Hack Shack foosball game at the celebration
98+
Attend one Hack Shack Meet-the-Expert session or customer
99+
discussion meetup
100+
</li>
101+
<li>
102+
Attend the Hack Shack celebration evening on Wednesday, June 21 at
103+
5:30 PM Pacific Time at the Hack Shack zone in the Event show
104+
floor and complete the Hack Shack foosball game at the celebration
102105
</li>
103106
</ul>
104107
<Text size="xlarge">
@@ -110,23 +113,29 @@ const ParticipationTC = () => {
110113
<Text size="xlarge">
111114
6. <strong>PRIZE:</strong> Interested parties who merely complete an
112115
Activity or submit an entry are not guaranteed a Prize. Eligible
113-
participants who are awarded a Prize will receive either an
114-
HPE Developer/Innovate branded t-shirt, or an HPE Developer branded hat
116+
participants who are awarded a Prize will receive either an HPE
117+
Developer/Innovate branded t-shirt, or an HPE Developer branded hat
115118
depending on the Activity completed as outlined below:
116119
</Text>
117120
<ul>
118121
<li>
119-
One (1) HPE Developer/Innovate branded t-shirt will be awarded for the
120-
completion of one (1) of the following Activities (each, a “Shirt Activity”):
122+
One (1) HPE Developer/Innovate branded t-shirt will be awarded for
123+
the completion of one (1) of the following Activities (each, a
124+
“Shirt Activity”):
121125
<ul>
122-
<li>Complete one (1) Hack Shack Workshops-on-demand challenge</li>
126+
<li>
127+
Complete one (1) Hack Shack Workshops-on-demand challenge
128+
</li>
123129
<li>Complete the Hack Shack Treasure Hunt</li>
124-
<li>Attend a Hack Shack Meet-the-Expert session or customer discussion meetup</li>
130+
<li>
131+
Attend a Hack Shack Meet-the-Expert session or customer
132+
discussion meetup
133+
</li>
125134
</ul>
126135
</li>
127136
<li>
128-
One (1) HPE Developer branded hat will be awarded for the completion of the
129-
following Activity (“Hat Activity”):
137+
One (1) HPE Developer branded hat will be awarded for the
138+
completion of the following Activity (“Hat Activity”):
130139
</li>
131140
<ul>
132141
<li>
@@ -140,16 +149,16 @@ const ParticipationTC = () => {
140149
of the Program by completing one (1) Shirt Activity and one (1) Hat
141150
Activity during the Program Period. For the sake of clarity, the
142151
total Prize each participant may win is one (1) t-shirt, one (1)
143-
hat. Once a participant has received the total permitted Prize, the participant
144-
may continue to participate in the Activities, but will not be eligible to receive
145-
any further Prize(s). The total estimated retail value of each Prize
146-
is USD $15.00. The Program budget will not exceed USD $7,350.00 in
147-
total and will be allocated on a first come first serve basis. HPE
148-
reserves the right to distribute Prizes until the budget is reached.
149-
Prizes will be awarded to each participant who completes an eligible
150-
entry during the Program Period, while supplies last. Odds of
151-
winning depend on the total number of eligible entries received
152-
during the Program Period.
152+
hat. Once a participant has received the total permitted Prize, the
153+
participant may continue to participate in the Activities, but will
154+
not be eligible to receive any further Prize(s). The total estimated
155+
retail value of each Prize is USD $15.00. The Program budget will
156+
not exceed USD $7,350.00 in total and will be allocated on a first
157+
come first serve basis. HPE reserves the right to distribute Prizes
158+
until the budget is reached. Prizes will be awarded to each
159+
participant who completes an eligible entry during the Program
160+
Period, while supplies last. Odds of winning depend on the total
161+
number of eligible entries received during the Program Period.
153162
</Text>
154163
<br />
155164
<Text size="xlarge">

src/pages/hackshack/hpediscover2023-treasurehunt-terms-conditions/index.js

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ const HPEDiscoverTreasureHuntTC = () => {
4040
<br />
4141
<Text size="xlarge">
4242
2. <strong>INTRODUCTION:</strong> HPE invites HPE Discover 2023
43-
(“Event”) attendees who wish to complete the HPE Developer Community Hack
44-
Shack Treasure Hunt (“Treasure Hunt”) to participate in the HPE
45-
Developer Community Hack Shack Treasure Hunt Giveaway (“Program”) for a chance
46-
to win an HPE Developer Community branded sweatshirt (“Prize”), subject to the
47-
terms and conditions below (“Terms and Conditions”). By
48-
participating in the Program, participants affirm that they have
49-
read, accepted, and agree to waive any right to claim any ambiguity
50-
or error in these Terms and Conditions or the entry itself and agree
51-
to be bound by these Terms and Conditions and HPE’s decisions, which
52-
are final and binding in all respects. HPE reserves the right to
53-
review, modify, extend or discontinue any and/or all aspects of the
54-
Program, including these Terms and Conditions, at any time without
55-
prior notice. The Program is subject to federal, state, and local
56-
laws and regulations and is void where prohibited.
43+
(“Event”) attendees who wish to complete the HPE Developer Community
44+
Hack Shack Treasure Hunt (“Treasure Hunt”) to participate in the HPE
45+
Developer Community Hack Shack Treasure Hunt Giveaway (“Program”)
46+
for a chance to win an HPE Developer Community branded sweatshirt
47+
(“Prize”), subject to the terms and conditions below (“Terms and
48+
Conditions”). By participating in the Program, participants affirm
49+
that they have read, accepted, and agree to waive any right to claim
50+
any ambiguity or error in these Terms and Conditions or the entry
51+
itself and agree to be bound by these Terms and Conditions and HPE’s
52+
decisions, which are final and binding in all respects. HPE reserves
53+
the right to review, modify, extend or discontinue any and/or all
54+
aspects of the Program, including these Terms and Conditions, at any
55+
time without prior notice. The Program is subject to federal, state,
56+
and local laws and regulations and is void where prohibited.
5757
</Text>
5858
<br />
5959
<Text size="xlarge">
@@ -91,12 +91,12 @@ const HPEDiscoverTreasureHuntTC = () => {
9191
must access the Treasure Hunt website by either (i) scanning the
9292
Treasure Hunt QR Code provided in the Hack Shack using their mobile
9393
phone, or (ii) using one of the designated Treasure Hunt laptops
94-
provided in the Hack Shack. At the HPE Developer Community Hack Shack website,
95-
participants must then select the Treasure Hunt card and click on
96-
the “Hunt for Treasure!” button. Participants must then complete the
97-
Treasure Hunt quiz by exploring the Hack Shack area and the HPE
98-
Developer Community’s rich ecosystem and submit their entry via the
99-
Treasure Hunt form during the Program Period.
94+
provided in the Hack Shack. At the HPE Developer Community Hack
95+
Shack website, participants must then select the Treasure Hunt card
96+
and click on the “Hunt for Treasure!” button. Participants must then
97+
complete the Treasure Hunt quiz by exploring the Hack Shack area and
98+
the HPE Developer Community’s rich ecosystem and submit their entry
99+
via the Treasure Hunt form during the Program Period.
100100
</Text>
101101
<br />
102102
<Text size="xlarge">
@@ -109,16 +109,17 @@ const HPEDiscoverTreasureHuntTC = () => {
109109
eligible entries received during the Program Period. A panel of two
110110
(2) HPE judges will select the twelve (12) winners who they
111111
determine have submitted the best Treasure Hunt entries based on the
112-
following criteria: Completeness, accuracy of responses, and date/time
113-
of the submission. Odds of winning depend on the total number of eligible
114-
entries received during the Program Period. Should you be awarded a Prize,
115-
it shall be your responsibility to claim the Prize by attending the
116-
HPE Hack Shack celebration party on Wednesday, June 21, 2023 at 5:30 PM
117-
Pacific Time in the HPE Hack Shack zone in the Event show floor.
118-
In order to win a Prize, participants must be present at the HPE Hack Shack
119-
celebration party at the time the winners are announced. Failure to be present will result
120-
in forfeiture of the Prize, and an alternate winner may be selected from among the
121-
remaining eligible entries.
112+
following criteria: Completeness, accuracy of responses, and
113+
date/time of the submission. Odds of winning depend on the total
114+
number of eligible entries received during the Program Period.
115+
Should you be awarded a Prize, it shall be your responsibility to
116+
claim the Prize by attending the HPE Hack Shack celebration party on
117+
Wednesday, June 21, 2023 at 5:30 PM Pacific Time in the HPE Hack
118+
Shack zone in the Event show floor. In order to win a Prize,
119+
participants must be present at the HPE Hack Shack celebration party
120+
at the time the winners are announced. Failure to be present will
121+
result in forfeiture of the Prize, and an alternate winner may be
122+
selected from among the remaining eligible entries.
122123
</Text>
123124
<br />
124125
<Text size="xlarge">

src/pages/hackshack/hpetss2023-treasurehunt-terms-conditions/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,15 @@ const TreasureHuntTC = () => {
199199
providing HPE with your personal data, you consent to the use of
200200
your data by HPE for purposes of conducting this Program in
201201
accordance with these Terms and Conditions and subject to HPE’s
202-
Privacy Statement, available at {' '}
202+
Privacy Statement, available at{' '}
203203
<Anchor
204204
href="https://www.hpe.com/us/en/legal/privacy.html"
205205
target="_blank"
206206
rel="noreferrer noopener"
207207
>
208208
https://www.hpe.com/us/en/legal/privacy.html
209209
</Anchor>
210-
&nbsp;(external) or {' '}
210+
&nbsp;(external) or{' '}
211211
<Anchor
212212
href="https://hpe.sharepoint.com/teams/CorporateStdDMT/Approved/HPE002-03.pdf"
213213
target="_blank"

yarn.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9148,6 +9148,14 @@ gatsby-plugin-google-analytics@^2.11.0:
91489148
"@babel/runtime" "^7.12.5"
91499149
minimatch "3.0.4"
91509150

9151+
9152+
version "2.8.0"
9153+
resolved "https://registry.yarnpkg.com/gatsby-plugin-google-gtag/-/gatsby-plugin-google-gtag-2.8.0.tgz#234dc936dd32440f861a3c0308521864ae55c5aa"
9154+
integrity sha512-ghvVjbcDszlt7/oaHvmx97WVceWbbMZQ7b6FSO4RY0FVUm/UkvrZldAxraioS1uEra+ndeEDyPM+MiftuDR8Aw==
9155+
dependencies:
9156+
"@babel/runtime" "^7.12.5"
9157+
minimatch "^3.0.4"
9158+
91519159
gatsby-plugin-lunr@^1.5.2:
91529160
version "1.5.2"
91539161
resolved "https://registry.yarnpkg.com/gatsby-plugin-lunr/-/gatsby-plugin-lunr-1.5.2.tgz#eaeba70b85294827e031070c9bad70a93226e509"

0 commit comments

Comments
 (0)