@@ -2,6 +2,8 @@ import React, { useMemo } from "react"
22import Anchor from "@/src/components/anchor"
33import { Text } from "@netdata/netdata-ui"
44import { useLocalStorage } from "react-use"
5+ import { utmUrlSuffix } from "utils/utils"
6+ import { utmParametersToString } from "domains/global/selectors"
57
68export type UserStatus = "LOGGED_IN" | "EXPIRED_LOGIN" | "UNKNOWN"
79export type NodeClaimedStatus = "NOT_CLAIMED" | "CLAIMED"
@@ -43,6 +45,14 @@ type MigrationModalInfo = {
4345 [ key in MigrationModalPromos ] : MigrationModalContent
4446}
4547
48+ const campaign = "agent_nudge_to_cloud"
49+
50+ const makeUTMParameters = ( modalPromo : MigrationModalPromos ) =>
51+ `${ utmUrlSuffix } ${ utmParametersToString ( {
52+ content : modalPromo ,
53+ campaign,
54+ } ) } `
55+
4656export const migrationmodalInfo : MigrationModalInfo = {
4757 [ MigrationModalPromos . PROMO_SIGN_UP_CLOUD ] : {
4858 title : "Learn about Netdata Cloud!" ,
@@ -157,7 +167,9 @@ export const migrationmodalInfo: MigrationModalInfo = {
157167 < Anchor
158168 target = "_blank"
159169 rel = "noopener noreferrer"
160- href = "https://learn.netdata.cloud/docs/agent/claim#how-to-connect-a-node"
170+ href = { `https://learn.netdata.cloud/docs/agent/claim?${ makeUTMParameters (
171+ MigrationModalPromos . PROMO_CLAIM_NODE
172+ ) . substring ( 1 ) } #how-to-connect-a-node`}
161173 >
162174 how to connect a node
163175 </ Anchor >
@@ -172,7 +184,9 @@ export const migrationmodalInfo: MigrationModalInfo = {
172184 < Anchor
173185 target = "_blank"
174186 rel = "noopener noreferrer"
175- href = "https://learn.netdata.cloud/docs/agent/claim#how-to-connect-a-node"
187+ href = { `https://learn.netdata.cloud/docs/metrics-storage-management/enable-streaming?${ makeUTMParameters (
188+ MigrationModalPromos . PROMO_CLAIM_NODE
189+ ) . substring ( 1 ) } `}
176190 >
177191 how to configure streaming
178192 </ Anchor >
@@ -245,7 +259,9 @@ export const migrationmodalInfo: MigrationModalInfo = {
245259 < Anchor
246260 target = "_blank"
247261 rel = "noopener noreferrer"
248- href = "https://learn.netdata.cloud/docs/agent/claim#troubleshooting"
262+ href = { `https://learn.netdata.cloud/docs/agent/claim?${ makeUTMParameters (
263+ MigrationModalPromos . FALLBACK_TO_AGENT
264+ ) . substring ( 1 ) } #troubleshooting`}
249265 >
250266 this guide.
251267 </ Anchor >
0 commit comments