The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add partner tags email
Steven Teybe3dedb97843
diff --git a/apps/web/lib/email/email-templates-map.ts b/apps/web/lib/email/email-templates-map.tsindex eb0edd887d..2eb6ffba49 100644--- a/apps/web/lib/email/email-templates-map.ts+++ b/apps/web/lib/email/email-templates-map.ts@@ -1,6 +1,6 @@import BountyApproved from "@dub/email/templates/bounty-approved";import IdentityVerificationAnnouncement from "@dub/email/templates/broadcasts/identity-verification-announcement";-import DubLaunchWeekDay1 from "@dub/email/templates/broadcasts/launch-week-day-1";+import DubLaunchWeekDay2 from "@dub/email/templates/broadcasts/launch-week-day-2";import ConnectPayoutReminder from "@dub/email/templates/connect-payout-reminder";import ConnectPlatformsReminder from "@dub/email/templates/connect-platforms-reminder";import PartnerBanned from "@dub/email/templates/partner-banned";@@ -30,5 +30,5 @@ export const EMAIL_TEMPLATES_MAP = {// PayoutAutoWithdrawals,// ProgramMarketplaceAnnouncement,// StablecoinPayoutsAnnouncement,- DubLaunchWeekDay1,+ DubLaunchWeekDay2,} as const;diff --git a/apps/web/scripts/send-batch-emails.ts b/apps/web/scripts/send-batch-emails.tsindex 0945b53f4a..7a6718c8a0 100644--- a/apps/web/scripts/send-batch-emails.ts+++ b/apps/web/scripts/send-batch-emails.ts@@ -1,4 +1,4 @@-import DubLaunchWeekDay1 from "@dub/email/templates/broadcasts/launch-week-day-1";+import DubLaunchWeekDay2 from "@dub/email/templates/broadcasts/launch-week-day-2";import { prisma } from "@dub/prisma";import { chunk } from "@dub/utils";import "dotenv-flow/config";@@ -43,12 +43,12 @@ async function main() {}console.log(`Found ${usersToNotify.length} users to notify`);- const res = await queueBatchEmail<typeof DubLaunchWeekDay1>(+ const res = await queueBatchEmail<typeof DubLaunchWeekDay2>(usersToNotify.map((user) => ({to: user.email!,variant: "marketing",- subject: "Dub Launch Week Day 1: Introducing Partner Referrals",- templateName: "DubLaunchWeekDay1",+ subject: "Dub Launch Week Day 2: Introducing Partner Tags",+ templateName: "DubLaunchWeekDay2",templateProps: {email: user.email!,unsubscribeUrl: `https://app.dub.co/unsubscribe/${generateUnsubscribeToken(user.email!)}`,diff --git a/packages/email/src/templates/broadcasts/launch-week-day-1.tsx b/packages/email/src/templates/broadcasts/launch-week-day-1.tsxindex 114a809fbc..2c2af33058 100644--- a/packages/email/src/templates/broadcasts/launch-week-day-1.tsx+++ b/packages/email/src/templates/broadcasts/launch-week-day-1.tsx@@ -17,7 +17,7 @@ import { Footer } from "../../components/footer";export default function DubLaunchWeekDay1({email = "[email protected]",- unsubscribeUrl = "https://partners.dub.co/account/settings",+ unsubscribeUrl = "https://app.dub.co/account/settings",}: {email: string;unsubscribeUrl: string;diff --git a/packages/email/src/templates/broadcasts/launch-week-day-2.tsx b/packages/email/src/templates/broadcasts/launch-week-day-2.tsxnew file mode 100644index 0000000000..f18715e27a--- /dev/null+++ b/packages/email/src/templates/broadcasts/launch-week-day-2.tsx@@ -0,0 +1,237 @@+import { DUB_WORDMARK } from "@dub/utils";+import {+ Body,+ Container,+ Head,+ Heading,+ Hr,+ Html,+ Img,+ Link,+ Preview,+ Section,+ Tailwind,+ Text,+} from "@react-email/components";+import { Footer } from "../../components/footer";++export default function DubLaunchWeekDay2({+ email = "[email protected]",+ unsubscribeUrl = "https://app.dub.co/account/settings",+}: {+ email: string;+ unsubscribeUrl: string;+}) {+ return (+ <Html>+ <Head>+ <style>{`+ @media only screen and (max-width: 600px) {+ .email-container {+ padding-left: 16px !important;+ padding-right: 16px !important;+ }+ }+ `}</style>+ </Head>+ <Preview>+ Segment your partners by tags and build custom reports to measure the+ ROI of your partner program.+ </Preview>+ <Tailwind>+ <Body className="mx-auto my-auto bg-white font-sans">+ <Container className="email-container mx-auto my-10 max-w-[600px] px-10 py-5">+ <Section className="mt-2 text-center">+ <Img+ src={DUB_WORDMARK}+ width="65"+ height="32"+ alt="Dub"+ style={{ display: "block", margin: "0 auto" }}+ />+ </Section>++ <Heading className="mx-0 mb-2 mt-8 p-0 text-center text-2xl font-semibold text-black">+ Dub Launch Week Day 2+ </Heading>++ <Text className="mx-auto mb-8 mt-0 max-w-sm text-center text-base leading-6 text-neutral-600">+ Introducing Partner Tags – segment your partners and build custom+ reports+ </Text>++ <Text className="mx-0 mb-4 mt-0 text-sm leading-6 text-neutral-600">+ 👋 Hey, it's Steven from Dub!+ </Text>+ <Text className="mx-0 mb-8 mt-0 text-sm leading-6 text-neutral-600">+ Today is <strong>Day 2 of our Spring Launch Week</strong>, where+ we'll be launching an exciting new feature for{" "}+ <Link+ href="http://ship.dub.co/partners"+ className="font-medium text-black underline"+ >+ Dub Partners+ </Link>{" "}+ every day – for 5 days straight!+ </Text>++ <Section className="mb-8 text-center">+ <Link+ href="https://ship.dub.co/partner-tags"+ style={{ textDecoration: "none" }}+ >+ <Img+ src="https://assets.dub.co/cms/partner-tags.jpg"+ width={560}+ height={320}+ alt="Partner Tags"+ style={{+ display: "block",+ maxWidth: "100%",+ height: "auto",+ margin: "0 auto",+ borderRadius: "8px",+ }}+ />+ </Link>+ </Section>++ <Heading className="mx-0 mb-3 mt-0 p-0 text-lg font-semibold text-black">+ Introducing Partner Tags+ </Heading>++ <Text className="mx-0 mb-4 mt-0 text-sm leading-6 text-neutral-600">+ You can now segment your partners by tags and build custom reports+ to measure the ROI of your partner program.+ </Text>+ <Text className="mx-0 mb-2 mt-0 text-sm leading-6 text-neutral-600">+ Some examples include:+ </Text>+ <Text className="mx-0 mb-1 mt-0 pl-4 text-sm leading-6 text-neutral-600">+ • Partner types –{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ Influencers+ </code>+ ,{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ Creators+ </code>+ ,{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ Affiliates+ </code>+ ,{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ Publishers+ </code>+ </Text>+ <Text className="mx-0 mb-1 mt-0 pl-4 text-sm leading-6 text-neutral-600">+ • Partner status –{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ High performer+ </code>+ ,{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ Needs follow up+ </code>+ </Text>+ <Text className="mx-0 mb-4 mt-0 pl-4 text-sm leading-6 text-neutral-600">+ • Custom campaigns –{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ Black Friday+ </code>+ ,{" "}+ <code className="rounded bg-neutral-100 px-1.5 py-0.5 text-neutral-800">+ Webinar cohort+ </code>+ </Text>+ <Link+ href="https://ship.dub.co/partner-tags"+ className="block w-full rounded-lg bg-neutral-900 py-2.5 text-center text-sm font-medium text-white no-underline"+ style={{+ backgroundColor: "#171717",+ color: "#ffffff",+ borderRadius: "8px",+ padding: "10px 16px",+ textDecoration: "none",+ fontWeight: "500",+ fontSize: "14px",+ width: "100%",+ boxSizing: "border-box",+ }}+ >+ Learn more about Partner Tags+ </Link>++ <Hr className="mx-0 my-6 w-full border border-neutral-200" />++ <Section className="mb-8 text-center">+ <Link+ href="https://ship.dub.co/partner-tags#filtering-program-analytics-by-partner-tags"+ style={{ textDecoration: "none" }}+ >+ <Img+ src="https://assets.dub.co/cms/filter-analytics-partner-tag.png"+ width={560}+ height={320}+ alt="Filter analytics by partner tag"+ style={{+ display: "block",+ maxWidth: "100%",+ height: "auto",+ margin: "0 auto",+ borderRadius: "8px",+ }}+ />+ </Link>+ </Section>++ <Heading className="mx-0 mb-3 mt-0 p-0 text-lg font-semibold text-black">+ Filter analytics by partner tag+ </Heading>++ <Text className="mx-0 mb-4 mt-0 text-sm leading-6 text-neutral-600">+ You can also filter your program analytics by partner tags, which+ lets you measure the success of your campaign at a more granular+ level.+ </Text>++ <Section className="mt-4 text-center">+ <Link+ href="https://ship.dub.co/partner-tags#filtering-program-analytics-by-partner-tags"+ className="block w-full rounded-lg bg-neutral-900 py-2.5 text-center text-sm font-medium text-white no-underline"+ style={{+ backgroundColor: "#171717",+ color: "#ffffff",+ borderRadius: "8px",+ padding: "10px 16px",+ textDecoration: "none",+ fontWeight: "500",+ fontSize: "14px",+ width: "100%",+ boxSizing: "border-box",+ }}+ >+ Learn more+ </Link>+ </Section>++ <Hr className="mx-0 my-6 w-full border border-neutral-200" />++ <Text className="mx-0 mb-4 mt-0 text-sm leading-6 text-neutral-600">+ That's all for Day 2! Stay tuned for the remaining days of our+ Spring Launch Week – see you tomorrow!+ </Text>+ <Text className="mx-0 mb-4 mt-0 text-sm leading-6 text-neutral-400">+ Steven from Dub.co+ </Text>++ <Section className="mx-auto max-w-[400px] text-center">+ <Footer email={email} marketing unsubscribeUrl={unsubscribeUrl} />+ </Section>+ </Container>+ </Body>+ </Tailwind>+ </Html>+ );+}