Skip to content

Commit

Permalink
add referrer field to APIV2 analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
zateutsch committed Nov 21, 2023
1 parent 9d4ab80 commit 5fafed9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Report/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const httpTrigger: AzureFunction = async function (
analyticsInfo.platformIdVersion =
req.headers['platform-identifier-version'];
analyticsInfo.correlationId = req.headers['correlation-id'];
analyticsInfo.properties = {
referrer: req.query.ref
};
await uploadToAppInsights(webAppReport, analyticsInfo);

context.res = {
Expand Down
1 change: 0 additions & 1 deletion utils/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export async function uploadToAppInsights(
analyticsInfo: AnalyticsInfo
) {
try {
analyticsInfo.properties = {};
if (webAppReport.artifacts.webAppManifest?.json) {
const _manifest = webAppReport.artifacts.webAppManifest?.json;
console.log(_manifest);
Expand Down

0 comments on commit 5fafed9

Please sign in to comment.