by tyson_core_page_attachments(), before the
* OneTrust SDK, Google Tag Manager and any gtag.js snippet. Every signal
* starts as "denied". OneTrust calls OptanonWrapper() when it loads and after
* every choice; it updates Consent Mode from OneTrust's active categories and
* removes the first-party cookies of the categories that are off. A Global
* Privacy Control signal always keeps advertising denied.
*/
(function (window, document, navigator) {
"use strict";
/* OneTrust category IDs. */
var PERFORMANCE = "C0002";
var TARGETING = "C0004";
/* First-party cookies set by each category's tags: exact names, or
patterns for names with an ID suffix. Third-party cookies (e.g. on
.google.com) can't be removed by any site script. */
var TRACKING_COOKIES = {
analytics: [
/^_ga$/, /^_ga_/, /^_gid$/, /^_gat/, /^_gaexp$/,
/^_hj/
],
advertising: [
/^_gcl_/, /^_fbp$/, /^_fbc$/,
/^li_fat_id$/, /^li_gc$/, /^_uet/,
/^_ttp$/, /^_tt_enable_cookie$/, /^ttcsid/,
/^_scid/, /^_sctr$/
]
};
var gpc = navigator.globalPrivacyControl === true;
var previous = null;
window.dataLayer = window.dataLayer || [];
function gtag() {
window.dataLayer.push(arguments);
}
window.gtag = window.gtag || gtag;
function signals(choice) {
var ad = choice.advertising ? "granted" : "denied";
return {
ad_storage: ad,
ad_user_data: ad,
ad_personalization: ad,
analytics_storage: choice.analytics ? "granted" : "denied"
};
}
/* Expires a cookie the way OneTrust does: without a domain and on each
domain (with and without a leading dot), plain and SameSite=None; Secure. */
function deleteCookie(name, domains) {
domains.forEach(function (domain) {
var cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;" + (domain ? " domain=" + domain + ";" : "");
document.cookie = cookie;
document.cookie = cookie + " SameSite=None; Secure;";
});
}
/* Deletes first-party tracking cookies for every denied category. */
function clearCookies(choice) {
/* The current host and every parent domain, since tags set cookies on
the registrable domain (e.g. .tysonfoods.com). */
var parts = window.location.hostname.split(".");
var domains = [""];
for (var i = 0; i < parts.length - 1; i++) {
domains.push(parts.slice(i).join("."), "." + parts.slice(i).join("."));
}
document.cookie.split(";").forEach(function (cookie) {
var name = cookie.split("=")[0].trim();
Object.keys(TRACKING_COOKIES).forEach(function (category) {
var tracked = TRACKING_COOKIES[category].some(function (pattern) {
return pattern.test(name);
});
if (name && !choice[category] && tracked) {
deleteCookie(name, domains);
}
});
});
}
var defaults = signals({analytics: false, advertising: false});
defaults.functionality_storage = "granted";
defaults.security_storage = "granted";
defaults.wait_for_update = 500;
gtag("consent", "default", defaults);
gtag("set", "ads_data_redaction", true);
/* Called by OneTrust on load and after every choice. */
window.OptanonWrapper = function () {
var groups = window.OnetrustActiveGroups || "";
var choice = {
analytics: groups.indexOf("," + PERFORMANCE + ",") > -1,
advertising: groups.indexOf("," + TARGETING + ",") > -1 && !gpc
};
gtag("consent", "update", signals(choice));
clearCookies(choice);
/* Tags already running on this page can't be stopped, so reload. */
if (previous && ((previous.analytics && !choice.analytics) || (previous.advertising && !choice.advertising))) {
window.location.reload();
return;
}
previous = choice;
};
})(window, document, navigator);
Free confidential support 24/7 for any veterans, family members or friends (no VA enrollment needed).
Call: 988, press 1
Text: 838255
Visit:
Apply for VA Health Care
Health
Check eligibility and enroll in VA health care online. Many veterans qualify based on service and income.
Call: 1-877-222-8387
Visit:
Find a VA Facility
Health & Local
Locate the nearest VA medical center, clinic or vet center.
Visit:
VA Disability Compensation
Finance & Benefits
Tax-free monthly payments for service-connected conditions. See what qualifies and how to file a claim.
Call: 1-800-827-1000
Visit:
VA-Backed Home Loans
Housing
Buy, build or refinance a home, often with no down payment and no private mortgage insurance.
Call: 1-877-827-3702
Visit:
GI Bill & Education Benefits
Education & Training
Apply for and manage benefits that help pay for college, trade school, certificates and training.
Call: 1-888-442-4551
Visit:
Get Help from an Accredited Rep
Benefits & Legal
Find a VA-accredited VSO, attorney or agent to help you file and appeal claims.
Visit:
DOL Veterans' Employment
Employment & Career
Federal job programs, USERRA job protections and the American Job Center network for vets and military spouses.
Call: 1-866-487-2365
Visit:
National Resource Directory
Resource Finder
Federal directory of 50,000+ vetted national, state and local resources you can search by ZIP code.
Visit:
*In crisis or worried about a fellow veteran? Call 988 and press 1, or text 838255. Programs and web addresses change. Confirm details before relying on information.