public function setAttributionInfo($jsonEncoded)
    {
        $decoded = json_decode($jsonEncoded, $assoc = true);
        if (!is_array($decoded)) {
            throw new Exception("setAttributionInfo() is expecting a JSON encoded string, $jsonEncoded given");
        }
        $this->attributionInfo = $decoded;
        return $this;
    }
public function setAttributionInfo($jsonEncoded)
    {
        $decoded = json_decode($jsonEncoded, $assoc = true);
        if (!is_array($decoded)) {
            throw new Exception("setAttributionInfo() is expecting a JSON encoded string, $jsonEncoded given");
        }
        $this->attributionInfo = $decoded;
        return $this;
    }
public function setAttributionInfo ( $ jsonEncoded ) { $ decoded = json_decode ( $ jsonEncoded , $ assoc = true ) ; if ( ! is_array ( $ decoded ) ) { throw new Exception ( "setAttributionInfo() is expecting a JSON encoded string, $jsonEncoded given" ) ; } $ this -> attributionInfo = $ decoded ; return $ this ; }
Sets the attribution information to the visit, so that subsequent Goal conversions are
properly attributed to the right Referrer URL, timestamp, Campaign Name & Keyword.

This must be a JSON encoded string that would typically be fetched from the JS API:
piwikTracker.getAttributionInfo() and that you have JSON encoded via JSON2.stringify()

If you call enableCookies() then these referral attribution values will be set
to the 'ref' first party cookie storing referral information.

@param string $jsonEncoded JSON encoded array containing Attribution info
@return $this
@throws Exception
@see function getAttributionInfo() in https://github.com/piwik/piwik/blob/master/js/piwik.js
Sets the attribution information to the visit so that subsequent Goal conversions are properly attributed to the right Referrer URL timestamp Campaign Name & Keyword .