URL: http://www.apple.com/at/shop/goto/ipad/toys_hobbies
var headNode = document.getElementsByTagName("head")[0]; var sbNode = document.createElement('meta'); var url = decodeURI("https://www.apple.com/at/shop/ipad/accessories/gaming"); var ses = "; " + document.cookie; var sesParts = ses.split("; s_vi="); ses = sesParts.length == 2 ? sesParts.pop().split(";").shift() : ''; if (ses !== '') { url += url.indexOf('?') >= 0 ? '&' : '?'; url += 'ses=' + encodeURI(ses); } sbNode.name = 'apple-itunes-app'; sbNode.content = 'app-id=375380948, app-argument=' + url; headNode.appendChild(sbNode); }