client/lib/analytics/utils.js
function parseAmpEncodedParams( value ) {
	value = value
		.split( '*' )
		.filter( val => val.length )
		.slice( 2 );
	// return null if empty or we have an odd number of elements
	if ( 0 === value.length || 0 !== value.length % 2 ) {
		return null;
	}
	const keyValMap = {};
	for ( let i = 0; i < value.length; i += 2 ) {
		keyValMap[ value[ i ] ] = urlSafeBase64DecodeString( value[ i + 1 ] );
	}

	return keyValMap;
}
function parseAmpEncodedParams( value ) {
	value = value
		.split( '*' )
		.filter( val => val.length )
		.slice( 2 );
	// return null if empty or we have an odd number of elements
	if ( 0 === value.length || 0 !== value.length % 2 ) {
		return null;
	}
	const keyValMap = {};
	for ( let i = 0; i < value.length; i += 2 ) {
		keyValMap[ value[ i ] ] = urlSafeBase64DecodeString( value[ i + 1 ] );
	}

	return keyValMap;
}
Decodes a URL param encoded by AMP's linker.js
See also https://github.com/ampproject/amphtml/blob/master/extensions/amp-analytics/linker-id-receiving.md

@param {String} value Value to be decoded
@return {null|Object} null or and object containing key/value pairs