Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to previous path as it is no longer required #12402

Draft
wants to merge 10 commits into
base: latest
Choose a base branch
from
2 changes: 0 additions & 2 deletions src/app/components/ATIAnalytics/atiUrl/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@ describe('Reverb', () => {
pageIdentifier: 'pageIdentifier',
pageTitle: 'pageTitle',
platform: 'canonical' as Platforms,
previousPath: '',
producerName: 'producerName',
origin: 'http://localhost',
nationsProducer: '',
statsDestination: 'statsDestination',
timePublished: 'timePublished',
Expand Down
10 changes: 3 additions & 7 deletions src/app/components/ATIAnalytics/atiUrl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ export const buildATIPageTrackPath = ({
statsDestination,
timePublished,
timeUpdated,
origin,
previousPath,
categoryName,
campaigns,
nationsProducer,
ampExperimentName,
experimentVariant,
}: ATIPageTrackingProps) => {
const href = getHref(platform);
const referrer = getReferrer(platform, origin, previousPath);
const referrer = getReferrer(platform);
const campaignType = getCampaignType();

// on AMP, variable substitutions are used in the value and they cannot be
Expand Down Expand Up @@ -269,7 +267,7 @@ export const buildATIPageTrackPath = ({
// the ref param should always be the last param because ATI will interpret it as part of the referrer URL
key: 'ref',
description: 'referrer url',
value: getReferrer(platform, origin, previousPath),
value: getReferrer(platform),
wrap: false,
// disable encoding for this parameter as ati does not appear to support
// decoding of the ref parameter
Expand Down Expand Up @@ -431,16 +429,14 @@ export const buildReverbAnalyticsModel = ({
pageIdentifier,
pageTitle,
platform,
previousPath,
producerName,
origin,
nationsProducer,
statsDestination,
timePublished,
timeUpdated,
}: ATIPageTrackingProps) => {
const href = getHref(platform);
const referrer = getReferrer(platform, origin, previousPath);
const referrer = getReferrer(platform);

const aggregatedCampaigns = (Array.isArray(campaigns) ? campaigns : [])
.map(({ campaignName }) => campaignName)
Expand Down
Loading
Loading