文章内容:
{ window.permutive.consent({ "opt_in": await window.consentGranted(), "token": "GRANTED", }); }); // 如果根据 OneTrust 不需要同意,则默认启用 Permutive SDK if (window.nxsConsentGroups?.includes('Notice_Only')) { window.permutive.consent({ "opt_in": false, "token": "none" }); // 如果用户已提交同意,则启用 SDK } else if (await window.consentGranted()) { window.permutive.consent({ "opt_in": true, "token": "GRANTED", }); } }); if (window.NXSTdata.identity.blueconicId) { permutive.identify([ { id: NXSTdata.identity.nexstarId, tag: "nexstar_id", priority: 0 } ]); permutive.identify([ { id:window.NXSTdata.identity.blueconicId,tag:“blueconic_id”,优先级:1 } ]); } var isNlpCategoriesAnObject = 'object' === typeof window.NXSTdata.content.nlpCategories && null !== window.NXSTdata.content.nlpCategories; var isNlpSentimentAnObject = 'object' === typeof window.NXSTdata.content.nlpSentiment && null !== window.NXSTdata.content.nlpSentiment; var pageVars = { “content”:{ “pageType”:window.NXSTdata.content.pageType, “authorName”:window.NXSTdata.content.authorName, “providerName”:window.NXSTdata.content.providerName, “categoryList”:window.NXSTdata.content.categoryList, “primaryCategory”:window.NXSTdata.content.primaryCategory, “wordCount”:window.NXSTdata.content.wordCount, “paragraphCount”:window.NXSTdata.content.paragraphCount, “tagList”:window.NXSTdata.content.tagList, “nlpCategories1”:isNlpCategoriesAnObject?Object.keys(window.NXSTdata.content.nlpCategories)[0]:'', “nlpCategories2”:isNlpCategoriesAnObject? Object.keys(window.NXSTdata.content.nlpCategories)[1] : '', "nlpCategories3": isNlpCategoriesAnObject ? Object.keys(window.NXSTdata.content.nlpCategories)[2] : '', "nlpConsumerGood": 'object' === typeof window.NXSTdata.content.nlpConsumerGood && null !== window.NXSTdata.content.nlpConsumerGood ? Object.keys(window.NXSTdata.content.nlpConsumerGood).toString() : '', "nlpEvent": 'object' === typeof window.NXSTdata.content.nlpEvent && null !== window.NXSTdata.content.nlpEvent ? Object.keys(window.NXSTdata.content.nlpEvent).toString() : '', "nlpLocation": 'object' === typeof window.NXSTdata.content.nlpLocation && null !== window.NXSTdata.content.nlpLocation ? Object.keys(window.NXSTdata.content.nlpLocation).toString() : '', "nlpOrganization": 'object' === typeof window.NXSTdata.content.nlpOrganization && null !== window.NXSTdata.content.nlpOrganization ? Object.keys(window.NXSTdata.content.nlpOrganization).toString() : '', "nlpPerson": 'object' === typeof window.NXSTdata.content.nlpPerson && null !== window.NXSTdata.content.nlpPerson ? Object.keys(window.NXSTdata.content.nlpPerson).toString() : '', }, "page": { "utmCampaign": window.NXSTdata.page.queryParams.utm_campaign, "utmMedium": window.NXSTdata.page.queryParams.utm_medium, "utmSource": window.NXSTdata.page.queryParams.utm_source, }, }; 如果(isNlpSentimentAnObject){pageVars['content']['nlpSentimentScore'] = window.NXSTdata.content.nlpSentiment.score; } 如果(isNlpSentimentAnObject){pageVars['content']['nlpSentimentMag'] = window.NXSTdata.content.nlpSentiment.magnitude; } permutive.addon('web', { page: pageVars, }); ]]>
分类:
标签:
留言