Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
make tracking and ads resilient to changing concept id to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys committed May 4, 2017
1 parent 6dc0d84 commit cc85455
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/n-ui/ads/js/oAdsConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = function (flags, appName, adOptions) {
url += `?referrer=${encodeURIComponent(referrer.split(/[?#]/)[0])}`;
}
} else if (appName === 'stream-page') {
uuid = document.querySelector('[data-concept-id]').getAttribute('data-concept-id');
uuid = document.documentElement.getAttribute('data-concept-idv1') || document.documentElement.getAttribute('data-concept-id');
url = `${apiUrlRoot}concept/${uuid}`;
}

Expand Down
2 changes: 1 addition & 1 deletion components/n-ui/tracking/ft/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const oTrackingWrapper = {
context.rootContentId = contentId;
}

const conceptId = getRootData('concept-id');
const conceptId = getRootData('concept-idv1') || getRootData('concept-id');
if (conceptId) {
context.rootConceptId = conceptId;
context.rootTaxonomy = getRootData('taxonomy');
Expand Down

0 comments on commit cc85455

Please sign in to comment.