This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch scarf-pixel
in repository https://gitbox.apache.org/repos/asf/superset.git

commit a3dff6664ed4fbc863c477613fb7cc978360df70
Author: Evan Rusackas <[email protected]>
AuthorDate: Thu Nov 16 15:19:37 2023 -0700

    Passing version/sha/build to pixel
---
 superset-frontend/src/components/TelemetryPixel/index.tsx | 11 +++++++++--
 superset-frontend/src/features/home/RightMenu.tsx         |  2 +-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/components/TelemetryPixel/index.tsx 
b/superset-frontend/src/components/TelemetryPixel/index.tsx
index 0d209a72da..b426a539e8 100644
--- a/superset-frontend/src/components/TelemetryPixel/index.tsx
+++ b/superset-frontend/src/components/TelemetryPixel/index.tsx
@@ -20,13 +20,20 @@
 import React from 'react';
 import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core';
 
-const TelemetryPixel = () => {
+interface TelemetryPixelProps {
+  version?: string;
+  sha?: string;
+  build?: string;
+}
+
+const TelemetryPixel = ({version, sha, build}: TelemetryPixelProps) => {
   console.log('TelemetryPixel', isFeatureEnabled(FeatureFlag.ENABLE_TELEMETRY))
+  var pixelPath = 
`https://apachesuperset.gateway.scarf.sh/pixel.png?x-pxid=0d3461e1-abb1-4691-a0aa-5ed50de66af0&version=${version}&sha=${sha}&build=${build}`;
   return  isFeatureEnabled(FeatureFlag.ENABLE_TELEMETRY) ? (
     // eslint-disable-next-line jsx-a11y/alt-text
     <img
       referrerPolicy="no-referrer-when-downgrade"
-      
src="https://static.scarf.sh/a.png?x-pxid=0d3461e1-abb1-4691-a0aa-5ed50de66af0";
+      src={pixelPath}
     />
   ) : null;
   }
diff --git a/superset-frontend/src/features/home/RightMenu.tsx 
b/superset-frontend/src/features/home/RightMenu.tsx
index 2fb2d0f967..9cbc54b2c6 100644
--- a/superset-frontend/src/features/home/RightMenu.tsx
+++ b/superset-frontend/src/features/home/RightMenu.tsx
@@ -342,7 +342,7 @@ const RightMenu = ({
 
   return (
     <StyledDiv align={align}>
-      <TelemetryPixel />
+      <TelemetryPixel version={navbarRight.version_string} 
sha={navbarRight.version_sha} build={navbarRight.build_number} />
       {canDatabase && (
         <DatabaseModal
           onHide={handleOnHideModal}

Reply via email to