mkTrackingPayload :: Text -> Text -> Text -> Maybe Text -> IO Text
mkTrackingPayload uaCode jobName uid content = do
  let utmContent = case content of
        Nothing -> ""
        Just c  -> "&cc=" <> c
  maybeUUID <- UU.nextUUID
  case maybeUUID of
    Nothing   -> return ""
    Just uuid -> return $ "v=1&t=event&ds=backend&tid=" <> uaCode <> "&cid=" <> (UU.toText uuid) <> "&uid=" <> uid <> "&cn=" <> jobName <> "&cm=backend&ni=1" <> utmContent
mkTrackingPayload :: Text -> Text -> Text -> Maybe Text -> IO Text
mkTrackingPayload uaCode jobName uid content = do
  let utmContent = case content of
        Nothing -> ""
        Just c  -> "&cc=" <> c
  maybeUUID <- UU.nextUUID
  case maybeUUID of
    Nothing   -> return ""
    Just uuid -> return $ "v=1&t=event&ds=backend&tid=" <> uaCode <> "&cid=" <> (UU.toText uuid) <> "&uid=" <> uid <> "&cn=" <> jobName <> "&cm=backend&ni=1" <> utmContent
mkTrackingPayload uaCode jobName uid content = do
  let utmContent = case content of
        Nothing -> ""
        Just c  -> "&cc=" <> c
  maybeUUID <- UU.nextUUID
  case maybeUUID of
    Nothing   -> return ""
    Just uuid -> return $ "v=1&t=event&ds=backend&tid=" <> uaCode <> "&cid=" <> (UU.toText uuid) <> "&uid=" <> uid <> "&cn=" <> jobName <> "&cm=backend&ni=1" <> utmContent