Skip to content

Commit e8f04d5

Browse files
Update analytics tracking
1 parent eb408b6 commit e8f04d5

File tree

3 files changed

+42
-41
lines changed

3 files changed

+42
-41
lines changed

src/components/button/JoinAudioDotComButton.jsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
import React from "react";
22

3-
function handleButtonClick() {
3+
function handleButtonClick(eventName) {
44
if (typeof _paq !== "undefined") {
5-
_paq.push([
6-
"trackEvent",
7-
"CTA Button",
8-
"audio.com CTA",
9-
"audio.com block CTA",
10-
]);
5+
_paq.push(["trackEvent", "CTA Button", "audio.com CTA", `${eventName}`]);
116
}
127
}
138

14-
function JoinAudioDotComButton() {
9+
function JoinAudioDotComButton(props) {
10+
const { href, matomoEventName, large } = props;
1511
return (
1612
<a
1713
onClick={() => {
18-
handleButtonClick();
14+
handleButtonClick(matomoEventName);
1915
}}
20-
href="https://audio.com/auth/sign-up?mtm_campaign=audacityteamorg&mtm_content=Block_button"
21-
className="px-6 py-4 bg-blue-700 w-fit text-white rounded hover:bg-blue-600"
16+
href={href}
17+
className={` ${
18+
large ? "py-4 px-6" : "py-2 px-4"
19+
} bg-blue-700 w-fit text-white rounded hover:bg-blue-600`}
2220
>
2321
Join for free
2422
</a>

src/components/homepage/ShareYourSounds.jsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState } from "react";
22
import AudioDotComLogo from "../../assets/img/audio-dot-com.svg";
33
import VideoPlaceholder from "../../assets/img/audiocom-placeholder.webp";
4+
import JoinAudioDotComButton from "../button/JoinAudioDotComButton";
45

56
function ShareYourSounds() {
67
const [isClicked, setIsClicked] = useState(false);
@@ -41,15 +42,11 @@ function ShareYourSounds() {
4142
publish your work.
4243
</p>
4344
</div>
44-
<a
45-
onClick={() => {
46-
handleButtonClick();
47-
}}
45+
46+
<JoinAudioDotComButton
4847
href="https://audio.com/auth/sign-up?mtm_campaign=audacityteamorg&mtm_content=Block_button"
49-
className="px-4 py-2 bg-blue-700 w-fit text-white rounded hover:bg-blue-600"
50-
>
51-
Join for free
52-
</a>
48+
matomoEventName="audio.com block CTA"
49+
/>
5350
</div>
5451

5552
<div className="col-span-12 md:col-start-1 md:col-span-6 md:row-start-1 items-center flex">

src/pages/post-download.astro

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,39 @@ import FeatureCard from "../components/card/FeatureCard";
1616
<div class="py-8 sm:py-12 flex flex-col items-center">
1717
<div class="text-center">
1818
<h1>
19-
Sign up to Audacity's cloud saving platform and access your
20-
projects from anywhere!
19+
Sign up to Audacity's cloud saving platform and access your projects
20+
from anywhere!
2121
</h1>
22-
<div class="mt-12"><JoinAudioDotComButton /></div>
22+
<div class="mt-12">
23+
<JoinAudioDotComButton
24+
href="https://audio.com/auth/sign-up?mtm_campaign=audacityteamorg&mtm_content=post_download_button"
25+
matomoEventAction="post-download CTA"
26+
large
27+
/>
28+
</div>
2329
</div>
2430

2531
<div class="grid grid-cols-6 sm:grid-cols-12 w-full gap-4 m-16">
2632
<FeatureCard
27-
icon="icon-cloud"
28-
title="Secure cloud storage"
29-
description="Keep your projects safe and accessible with cloud storage. Access your work anywhere and never lose a file."
30-
/>
31-
<FeatureCard
32-
icon="icon-note"
33-
title="Share your creations"
34-
description="Upload and share your audio from Audacity with just a few clicks. Quick, easy, and built for creators."
35-
/>
36-
<FeatureCard
37-
icon="icon-pen"
38-
title="Transcribe your audio"
39-
description="Free AI-powered transcription for your podcasts or voice overs, delivering fast and precise text for effortless editing."
40-
/>
41-
<FeatureCard
42-
icon="icon-globe"
43-
title="Explore new sounds"
44-
description="Collaborate with other creators, find new inspiration, and discover sounds to enhance and elevate your projects."
45-
/>
33+
icon="icon-cloud"
34+
title="Secure cloud storage"
35+
description="Keep your projects safe and accessible with cloud storage. Access your work anywhere and never lose a file."
36+
/>
37+
<FeatureCard
38+
icon="icon-note"
39+
title="Share your creations"
40+
description="Upload and share your audio from Audacity with just a few clicks. Quick, easy, and built for creators."
41+
/>
42+
<FeatureCard
43+
icon="icon-pen"
44+
title="Transcribe your audio"
45+
description="Free AI-powered transcription for your podcasts or voice overs, delivering fast and precise text for effortless editing."
46+
/>
47+
<FeatureCard
48+
icon="icon-globe"
49+
title="Explore new sounds"
50+
description="Collaborate with other creators, find new inspiration, and discover sounds to enhance and elevate your projects."
51+
/>
4652
</div>
4753
</div>
4854
</section>

0 commit comments

Comments
 (0)