Referral cookie name

Hi, im trying to find out the name of the referral cookie name for Piwik. What I am trying to do is take the re feral information from the Piwik cookie, which is on a sub domain of our site, and populate our own in house analytics with the referral information, but I have been unable to find what it is I should be targeting. Does anyone know what I should be looking at?

I have tried to get Piwik to create another cookie for us inside piwik.js

This is my code

// Set the referral cookie if we have either a Referrer URL, or detected a Campaign (or both)
if (referralUrl.length
|| campaignNameDetected.length) {
referralTs = nowTs;
attributionCookie = [
purify(referralUrl.slice(0, referralUrlMaxLength))

					setCookie(refname, JSON2.stringify(attributionCookie), configReferralCookieTimeout, configCookiePath, configCookieDomain, cookieSecure);
					setCookie('FTO_REF', JSON2.stringify(attributionCookie), configReferralCookieTimeout, configCookiePath, '', cookieSecure);						

However my cookie is never created, am I missing something??