Anonymous Identifier - dan7davis/Lambda GitHub Wiki
Your iframe call should be like this:
<iframe title="TITLE" id="pienapple_Search" src="https://LINK?anonId=%%USER_ID%%" frameborder="0" width="100%" height="1200px"></iframe>
Add this function to your Javascript script to get the anonymous identifier:
var getParameterByName = function (name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
};
Finally get the identifier:
getParameterByName('anonId')