Skip to content

Commit 45532a3

Browse files
author
Danny Ruchtie
committed
added amplitude event
1 parent 30fad1b commit 45532a3

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

packages/homepage/src/pages/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,14 @@ const Homepage = () => (
5656
</Layout>
5757
);
5858

59+
if (typeof window !== 'undefined') {
60+
window.addEventListener('load', () => {
61+
try {
62+
window.amplitude.identify('hero0420', 'A');
63+
} catch (e) {
64+
console.warn(e);
65+
}
66+
});
67+
}
68+
5969
export default Homepage;

packages/homepage/src/pages/index2.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,14 @@ const Homepage = () => (
5757
</Layout>
5858
);
5959

60+
if (typeof window !== 'undefined') {
61+
window.addEventListener('load', () => {
62+
try {
63+
window.amplitude.identify('hero0420', 'B');
64+
} catch (e) {
65+
console.warn(e);
66+
}
67+
});
68+
}
69+
6070
export default Homepage;

0 commit comments

Comments
 (0)