The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update PartnerInvite email
Steven Teye8c125969f04
diff --git a/apps/web/lib/actions/partners/create-program.ts b/apps/web/lib/actions/partners/create-program.tsindex 2e94d208c9..c4c924d90a 100644--- a/apps/web/lib/actions/partners/create-program.ts+++ b/apps/web/lib/actions/partners/create-program.ts@@ -237,6 +237,7 @@ async function invitePartner({email: partner.email,program: {name: program.name,+ slug: program.slug,logo: program.logo,},}),diff --git a/apps/web/lib/actions/partners/invite-partner.ts b/apps/web/lib/actions/partners/invite-partner.tsindex f800b4d9e2..d3f37d3f30 100644--- a/apps/web/lib/actions/partners/invite-partner.ts+++ b/apps/web/lib/actions/partners/invite-partner.ts@@ -114,6 +114,7 @@ export const invitePartnerAction = authActionClientemail,program: {name: program.name,+ slug: program.slug,logo: program.logo,},}),diff --git a/apps/web/lib/actions/partners/resend-program-invite.ts b/apps/web/lib/actions/partners/resend-program-invite.tsindex 72d60b3b04..c5ab913172 100644--- a/apps/web/lib/actions/partners/resend-program-invite.ts+++ b/apps/web/lib/actions/partners/resend-program-invite.ts@@ -56,6 +56,7 @@ export const resendProgramInviteAction = authActionClientemail: partner.email!,program: {name: program.name,+ slug: program.slug,logo: program.logo,},}),diff --git a/packages/email/src/templates/partner-invite.tsx b/packages/email/src/templates/partner-invite.tsxindex 241a3c1727..5777215323 100644--- a/packages/email/src/templates/partner-invite.tsx+++ b/packages/email/src/templates/partner-invite.tsx@@ -18,12 +18,14 @@ export function PartnerInvite({email = "[email protected]",program = {name: "Acme",+ slug: "acme",logo: DUB_WORDMARK,},}: {email: string;program: {name: string;+ slug: string;logo: string | null;};}) {@@ -62,7 +64,7 @@ export function PartnerInvite({<Section className="mb-12 mt-8"><LinkclassName="rounded-lg bg-neutral-900 px-4 py-3 text-[12px] font-semibold text-white no-underline"- href="https://partners.dub.co/register"+ href={`https://partners.dub.co/${program.slug}/register`}>Accept Invite</Link>diff --git a/packages/tinybird/pipes/v2_utms.pipe b/packages/tinybird/pipes/v2_utms.pipeindex 707904fa2b..58907e28c4 100644--- a/packages/tinybird/pipes/v2_utms.pipe+++ b/packages/tinybird/pipes/v2_utms.pipe@@ -31,16 +31,18 @@ SQL >%WITH- extractURLParameter(- decodeURLFormComponent(url),- {{- String(- groupByUtmTag,- 'utm_source',- description="The UTM tag to retrieve data for",- required=True,- )- }}+ decodeURLFormComponent(+ extractURLParameter(+ url,+ {{+ String(+ groupByUtmTag,+ 'utm_source',+ description="The UTM tag to retrieve data for",+ required=True,+ )+ }}+ )) as utmSELECT utm, count(*) as clicksFROM@@ -71,20 +73,23 @@ SQL >{% if defined(referer) %} AND referer = {{ referer }} {% end %}{% if defined(refererUrl) %} AND splitByString('?', referer_url)[1] = {{ refererUrl }} {% end %}{% if defined(utm_source) %}- AND url LIKE concat('%utm_source=', encodeURLFormComponent({{ String(utm_source) }}), '%')+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_source'))+ = {{ String(utm_source) }}{% end %}{% if defined(utm_medium) %}- AND url LIKE concat('%utm_medium=', encodeURLFormComponent({{ String(utm_medium) }}), '%')+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_medium'))+ = {{ String(utm_medium) }}{% end %}{% if defined(utm_campaign) %}- AND url- LIKE concat('%utm_campaign=', encodeURLFormComponent({{ String(utm_campaign) }}), '%')+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_campaign'))+ = {{ String(utm_campaign) }}{% end %}{% if defined(utm_term) %}- AND url LIKE concat('%utm_term=', encodeURLFormComponent({{ String(utm_term) }}), '%')+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_term')) = {{ String(utm_term) }}{% end %}{% if defined(utm_content) %}- AND url LIKE concat('%utm_content=', encodeURLFormComponent({{ String(utm_content) }}), '%')+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_content'))+ = {{ String(utm_content) }}{% end %}{% if defined(url) %} AND url = {{ url }} {% end %}{% if defined(start) %} AND timestamp >= {{ DateTime64(start) }} {% end %}@@ -100,16 +105,18 @@ SQL >%WITH- extractURLParameter(- decodeURLFormComponent(url),- {{- String(- groupByUtmTag,- 'utm_source',- description="The UTM tag to retrieve data for",- required=True,- )- }}+ decodeURLFormComponent(+ extractURLParameter(+ url,+ {{+ String(+ groupByUtmTag,+ 'utm_source',+ description="The UTM tag to retrieve data for",+ required=True,+ )+ }}+ )) as utmSELECT utm, count(*) as leadsFROM@@ -131,11 +138,25 @@ SQL >{% if defined(os) %} AND os = {{ os }} {% end %}{% if defined(referer) %} AND referer = {{ referer }} {% end %}{% if defined(refererUrl) %} AND splitByString('?', referer_url)[1] = {{ refererUrl }} {% end %}- {% if defined(utm_source) %} AND url LIKE concat('%utm_source=', encodeURLFormComponent({{ String(utm_source) }}), '%') {% end %}- {% if defined(utm_medium) %} AND url LIKE concat('%utm_medium=', encodeURLFormComponent({{ String(utm_medium) }}), '%') {% end %}- {% if defined(utm_campaign) %} AND url LIKE concat('%utm_campaign=', encodeURLFormComponent({{ String(utm_campaign) }}), '%') {% end %}- {% if defined(utm_term) %} AND url LIKE concat('%utm_term=', encodeURLFormComponent({{ String(utm_term) }}), '%') {% end %}- {% if defined(utm_content) %} AND url LIKE concat('%utm_content=', encodeURLFormComponent({{ String(utm_content) }}), '%') {% end %}+ {% if defined(utm_source) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_source'))+ = {{ String(utm_source) }}+ {% end %}+ {% if defined(utm_medium) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_medium'))+ = {{ String(utm_medium) }}+ {% end %}+ {% if defined(utm_campaign) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_campaign'))+ = {{ String(utm_campaign) }}+ {% end %}+ {% if defined(utm_term) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_term')) = {{ String(utm_term) }}+ {% end %}+ {% if defined(utm_content) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_content'))+ = {{ String(utm_content) }}+ {% end %}{% if defined(url) %} AND url = {{ url }} {% end %}{% if defined(start) %} AND timestamp >= {{ DateTime64(start) }} {% end %}{% if defined(end) %} AND timestamp <= {{ DateTime64(end) }} {% end %}@@ -150,23 +171,25 @@ SQL >%WITH- extractURLParameter(- decodeURLFormComponent(url),- {{- String(- groupByUtmTag,- 'utm_source',- description="The UTM tag to retrieve data for",- required=True,- )- }}+ decodeURLFormComponent(+ extractURLParameter(+ url,+ {{+ String(+ groupByUtmTag,+ 'utm_source',+ description="The UTM tag to retrieve data for",+ required=True,+ )+ }}+ )) as utmSELECT utm, count(*) as sales, sum(amount) as saleAmountFROMdub_sale_events_mv- {% if not defined(linkId) and (defined(workspaceId) or defined(partnerId) or defined(programId)) %}- PREWHERE link_id in (SELECT link_id from workspace_links)- {% end %}+ {% if not defined(linkId) and (+ defined(workspaceId) or defined(partnerId) or defined(programId)+ ) %} PREWHERE link_id in (SELECT link_id from workspace_links) {% end %}WHEREurl != ''{% if defined(linkId) %} AND link_id = {{ String(linkId) }} {% end %}@@ -181,11 +204,25 @@ SQL >{% if defined(os) %} AND os = {{ os }} {% end %}{% if defined(referer) %} AND referer = {{ referer }} {% end %}{% if defined(refererUrl) %} AND splitByString('?', referer_url)[1] = {{ refererUrl }} {% end %}- {% if defined(utm_source) %} AND url LIKE concat('%utm_source=', encodeURLFormComponent({{ String(utm_source) }}), '%') {% end %}- {% if defined(utm_medium) %} AND url LIKE concat('%utm_medium=', encodeURLFormComponent({{ String(utm_medium) }}), '%') {% end %}- {% if defined(utm_campaign) %} AND url LIKE concat('%utm_campaign=', encodeURLFormComponent({{ String(utm_campaign) }}), '%') {% end %}- {% if defined(utm_term) %} AND url LIKE concat('%utm_term=', encodeURLFormComponent({{ String(utm_term) }}), '%') {% end %}- {% if defined(utm_content) %} AND url LIKE concat('%utm_content=', encodeURLFormComponent({{ String(utm_content) }}), '%') {% end %}+ {% if defined(utm_source) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_source'))+ = {{ String(utm_source) }}+ {% end %}+ {% if defined(utm_medium) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_medium'))+ = {{ String(utm_medium) }}+ {% end %}+ {% if defined(utm_campaign) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_campaign'))+ = {{ String(utm_campaign) }}+ {% end %}+ {% if defined(utm_term) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_term')) = {{ String(utm_term) }}+ {% end %}+ {% if defined(utm_content) %}+ AND decodeURLFormComponent(extractURLParameter(url, 'utm_content'))+ = {{ String(utm_content) }}+ {% end %}{% if defined(url) %} AND url = {{ url }} {% end %}{% if defined(start) %} AND timestamp >= {{ DateTime64(start) }} {% end %}{% if defined(end) %} AND timestamp <= {{ DateTime64(end) }} {% end %}