mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 13:37:30 +00:00
Website: Update attribution cookie (#40532)
Closes: https://github.com/fleetdm/confidential/issues/14391 Changes: - Updated the attribution cookie set in the website's custom hook to include the value of a user's `gclid` query parameter (if it is set) - Updated the updateOrCreateContactAndAccount helper to set this value on created Contact records.
This commit is contained in:
parent
8c22ad0284
commit
0693041f13
2 changed files with 4 additions and 0 deletions
|
|
@ -178,6 +178,8 @@ module.exports = {
|
|||
em: 'Email marketing (EM)',
|
||||
};
|
||||
|
||||
attributionDetails.gclid = marketingAttributionCookie.gclid;
|
||||
|
||||
attributionDetails.sourceChannelDetails = sourceFriendlyNameByCodeName[lowerCaseMediumValue] ? sourceFriendlyNameByCodeName[lowerCaseMediumValue] : undefined;
|
||||
|
||||
attributionDetails.initialUrl = marketingAttributionCookie.initialUrl;
|
||||
|
|
@ -391,6 +393,7 @@ module.exports = {
|
|||
valuesToSet.Most_recent_channel__c = attributionDetails.sourceChannel;// eslint-disable-line camelcase
|
||||
valuesToSet.Most_recent_campaign__c = attributionDetails.campaign;// eslint-disable-line camelcase
|
||||
valuesToSet.Most_recent_campaign_initial_url__c = attributionDetails.initialUrl;// eslint-disable-line camelcase
|
||||
valuesToSet.GCLID__c = attributionDetails.gclid;// eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
1
website/api/hooks/custom/index.js
vendored
1
website/api/hooks/custom/index.js
vendored
|
|
@ -203,6 +203,7 @@ will be disabled and/or hidden in the UI.
|
|||
source: req.param('utm_source'),// will be undefined if this is not set
|
||||
medium: req.param('utm_medium'),// will be undefined if this is not set
|
||||
campaign: req.param('utm_campaign'),// will be undefined if this is not set
|
||||
gclid: req.param('gclid'),// will be undefined if this is not set
|
||||
referrer: req.get('referer'),
|
||||
initialUrl: req.url,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue