Home > Tracking Campaigns > Voluum

Tokens doesn't work! (18)


12-10-2016 03:35 PM #1 madjunior (Member)
Tokens doesn't work!

Hello, i'm trying to display for example city on my lander but it doesn't work, here is my setup:
<head>
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
</script>
</head>
<body>
Hello <script>document.write(getURLParameter('model')) </script> user....!
</body>

I added also at the end of the lander link on Voluum the token!

Can't see what's wrong:/ Any help?
Thank you


12-11-2016 03:30 AM #2 erikgyepes (Moderator)

It looks good to me.

Maybe you could show us how are tou adding tokens in Voluum?


12-11-2016 04:00 AM #3 gedeve (Member)

Something else to try here. But check you're passing it through your tracker correctly...

<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>

...and then use the below script after the body tag...

<script language="JavaScript">
var country=geoip_country();
var region=geoip_region();
var city=geoip_city();
if(country=="")
country="US";
if(region=="")
region="New York";
if(city=="")
city="New York";
</script>

...and then use the below script where you want the city/region/country to show up

<script language="JavaScript">document.write(country);</script>


12-11-2016 07:54 AM #4 madjunior (Member)

Quote Originally Posted by erikgyepes View Post
It looks good to me.

Maybe you could show us how are tou adding tokens in Voluum?
Hi Eric, here is my setup in Voluum: http://XXXXXXXX/index.html?country={France}
I tried every variation:3


12-11-2016 07:56 AM #5 madjunior (Member)

Quote Originally Posted by gedeve View Post
Something else to try here. But check you're passing it through your tracker correctly...

<script language="JavaScript" src="http://j.maxmind.com/app/geoip.js"></script>

...and then use the below script after the body tag...

<script language="JavaScript">
var country=geoip_country();
var region=geoip_region();
var city=geoip_city();
if(country=="")
country="US";
if(region=="")
region="New York";
if(city=="")
city="New York";
</script>

...and then use the below script where you want the city/region/country to show up

<script language="JavaScript">document.write(country);</script>
Hi thank you, i tried to implement this method but every time i got this message on my lander: Welcome user fromundefined.


12-11-2016 08:04 AM #6 erikgyepes (Moderator)

try country={country} and then France will be inserted.


12-11-2016 11:00 AM #7 madjunior (Member)

Quote Originally Posted by erikgyepes View Post
try country={country} and then France will be inserted.
Click image for larger version. 

Name:	Screen Shot 2016-12-11 at 11.53.54 AM.png 
Views:	14 
Size:	10.6 KB 
ID:	13728

It doesn't work! I tried with http://XXXXX/index.html?country=France and it works but like that i need to create many links so it's better to mention that on the lander!


12-11-2016 03:08 PM #8 panthary (Member)

Quote Originally Posted by madjunior View Post
Hello, i'm trying to display for example city on my lander but it doesn't work, here is my setup:
<head>
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
</script>
</head>
<body>
Hello <script>document.write(getURLParameter('model'))</script> user....!
</body>

I added also at the end of the lander link on Voluum the token!

Can't see what's wrong:/ Any help?
Thank you
You're trying to display the model (see highlighted in red as quoted above), you need to display the city: <script>document.write(getURLParameter('city'))</script>

And city must be added to your landing page inside of Voluum, so it is attached to the URL for example: http://landingpage.com/city={city}


12-11-2016 03:13 PM #9 madjunior (Member)

Quote Originally Posted by adivity View Post
You're trying to display the model (see highlighted in red as quoted above), you need to display the city: <script>document.write(getURLParameter('city'))</script>

And city must be added to your landing page inside of Voluum, so it is attached to the URL for example: http://landingpage.com/city={city}
It was just an example i tried with city, country, device...


12-11-2016 03:16 PM #10 panthary (Member)

Did you add it to landing page? Share a screenshot of your Landing Page set up inside of Voluum. Don't block the full url though, still need to see the parameters on the end


12-11-2016 04:00 PM #11 madjunior (Member)

Quote Originally Posted by adivity View Post
Did you add it to landing page? Share a screenshot of your Landing Page set up inside of Voluum. Don't block the full url though, still need to see the parameters on the end
Here is it
Click image for larger version. 

Name:	Screen Shot 2016-12-11 at 4.56.36 PM.png 
Views:	40 
Size:	54.1 KB 
ID:	13735


12-11-2016 10:48 PM #12 platinum (Veteran Member)

if you are using ripped LPs maybe there is any other script present in the page. I once went through this and when changing parameter names noticed the below highlighted

<script type="text/javascript">var city = decodeURIComponent(window.location.search.match(/(\?|&)city\=([^&]*)/)[2]).replace(/(\+|%20)/g, ' ');</script>

In this excample if variable names are not equal it won't work correctly.

Hope this helps...


12-12-2016 02:53 AM #13 erikgyepes (Moderator)

Try this version of the getURLParameter() function from Voluum knowledgebase http://feedback.Voluum.com/knowledge...eter-on-lander and make sure there is no other function overwriting it on your landing page.


12-12-2016 10:30 AM #14 panthary (Member)

Quote Originally Posted by madjunior View Post
Here is it
Click image for larger version. 

Name:	Screen Shot 2016-12-11 at 4.56.36 PM.png 
Views:	40 
Size:	54.1 KB 
ID:	13735
<html>
<head>
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
</script>
</head>

<body>
Hello <script>document.write(getURLParameter('country')) </script> user, you just won!
</body>

</html>

1. Add that to your page.
2. Make sure there are no other scripts interferring with it.
3. Set up your campaigns and visit the landing page from your Voluum URL. Which is something like: http://volummurl.com/?damse92311-421421mf-421421-dasda

It should display your country


12-13-2016 09:56 PM #15 madjunior (Member)

Quote Originally Posted by adivity View Post
<html>
<head><script type="text/javascript">(window.NREUM||(NREUM={})).loader_conf ig={xpid:"VQYCVVFWCxABUFdUAwMHVQ=="};window.NREUM| |(NREUM={}),__nr_require=function(t,e,n){function r(n){if(!e[n]){var o=e[n]={exports:{}};t[n][0].call(o.exports,function(e){var o=t[n][1][e];return r(o||e)},o,o.exports)}return e[n].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e,n){function r(t){try{c.console&&console.log(t)}catch(e){}}var o,i=t("ee"),a=t(15),c={};try{o=localStorage.getIte m("__nr_flags").split(","),console&&"function"==ty peof console.log&&(c.console=!0,o.indexOf("dev")!==-1&&(c.dev=!0),o.indexOf("nr_dev")!==-1&&(c.nrDev=!0))}catch(s){}c.nrDev&&i.on("intern al-error",function(t){r(t.stack)}),c.dev&&i.on("fn-err",function(t,e,n){r(n.stack)}),c.dev&&(r("NR AGENT IN DEVELOPMENT MODE"),r("flags: "+a(c,function(t,e){return t}).join(", ")))},{}],2:[function(t,e,n){function r(t,e,n,r,o){try{d?d-=1:i("err",[o||new UncaughtException(t,e,n)])}catch(c){try{i("ierr",[c,(new Date).getTime(),!0])}catch(s){}}return"function"==typeof f&&f.apply(this,a(arguments))}function UncaughtException(t,e,n){this.message=t||"Uncaught error with no additional information",this.sourceURL=e,this.line=n}function o(t){i("err",[t,(new Date).getTime()])}var i=t("handle"),a=t(16),c=t("ee"),s=t("loader"),f=wi ndow.onerror,u=!1,d=0;s.features.err=!0,t(1),windo w.onerror=r;try{throw new Error}catch(l){"stack"in l&&(t(8),t(7),"addEventListener"in window&&t(5),s.xhrWrappable&&t(9),u=!0)}c.on("fn-start",function(t,e,n){u&&(d+=1)}),c.on("fn-err",function(t,e,n){u&&(this.thrown=!0,o(n))}),c. on("fn-end",function(){u&&!this.thrown&&d>0&&(d-=1)}),c.on("internal-error",function(t){i("ierr",[t,(new Date).getTime(),!0])})},{}],3:[function(t,e,n){t("loader").features.ins=!0},{}],4:[function(t,e,n){function r(t){}if(window.performance&&window.performance.ti ming&&window.performance.getEntriesByType){var o=t("ee"),i=t("handle"),a=t(8),c=t(7),s="learResou rceTimings",f="addEventListener",u="resourcetiming bufferfull",d="bstResource",l="resource",p="-start",h="-end",m="fn"+p,w="fn"+h,v="bstTimer",y="pushState"; t("loader").features.stn=!0,t(6);var g=NREUM.o.EV;o.on(m,function(t,e){var n=t[0];n instanceof g&&(this.bstStart=Date.now())}),o.on(w,function(t, e){var n=t[0];n instanceof g&&i("bst",[n,e,this.bstStart,Date.now()])}),a.on(m,function(t,e,n){this.bstStart=Date.now( ),this.bstType=n}),a.on(w,function(t,e){i(v,[e,this.bstStart,Date.now(),this.bstType])}),c.on(m,function(){this.bstStart=Date.now()}),c .on(w,function(t,e){i(v,[e,this.bstStart,Date.now(),"requestAnimationFrame"])}),o.on(y+p,function(t){this.time=Date.now(),this .startPath=location.pathname+location.hash}),o.on( y+h,function(t){i("bstHist",[location.pathname+location.hash,this.startPath,thi s.time])}),f in window.performance&&(window.performance["c"+s]?window.performance[f](u,function(t){i(d,[window.performance.getEntriesByType(l)]),window.performance["c"+s]()},!1):window.performance[f]("webkit"+u,function(t){i(d,[window.performance.getEntriesByType(l)]),window.performance["webkitC"+s]()},!1)),document[f]("scroll",r,!1),document[f]("keypress",r,!1),document[f]("click",r,!1)}},{}],5:[function(t,e,n){function r(t){for(var e=t;e&&!e.hasOwnProperty(u)e=Object.getPrototypeOf(e);e&&o(e)}function o(t){c.inPlace(t,[u,d],"-",i)}function i(t,e){return t[1]}var a=t("ee").get("events"),c=t(17)(a,!0),s=t("gos"),f =XMLHttpRequest,u="addEventListener",d="removeEven tListener";e.exports=a,"getPrototypeOf"in Object?(r(document),r(window),r(f.prototype)):f.pr ototype.hasOwnProperty(u)&&(o(window),o(f.prototyp e)),a.on(u+"-start",function(t,e){var n=t[1],r=s(n,"nr@wrapped",function(){function t(){if("function"==typeof n.handleEvent)return n.handleEvent.apply(n,arguments)}var e={object:t,"function":n}[typeof n];return e?c(e,"fn-",null,e.name||"anonymous"):n});this.wrapped=t[1]=r}),a.on(d+"-start",function(t){t[1]=this.wrapped||t[1]})},{}],6:[function(t,e,n){var r=t("ee").get("history"),o=t(17)(r);e.exports=r,o. inPlace(window.history,["pushState","replaceState"],"-")},{}],7:[function(t,e,n){var r=t("ee").get("raf"),o=t(17)(r),i="equestAnimation Frame";e.exports=r,o.inPlace(window,["r"+i,"mozR"+i,"webkitR"+i,"msR"+i],"raf-"),r.on("raf-start",function(t){t[0]=o(t[0],"fn-")})},{}],8:[function(t,e,n){function r(t,e,n){t[0]=a(t[0],"fn-",null,n)}function o(t,e,n){this.method=n,this.timerDuration="number" ==typeof t[1]?t[1]:0,t[0]=a(t[0],"fn-",this,n)}var i=t("ee").get("timer"),a=t(17)(i),c="setTimeout",s ="setInterval",f="clearTimeout",u="-start",d="-";e.exports=i,a.inPlace(window,[c,"setImmediate"],c+d),a.inPlace(window,[s],s+d),a.inPlace(window,[f,"clearImmediate"],f+d),i.on(s+u,r),i.on(c+u,o)},{}],9:[function(t,e,n){function r(t,e){d.inPlace(e,["onreadystatechange"],"fn-",c)}function o(){var t=this,e=u.context(t);t.readyState>3&&!e.resolved& &(e.resolved=!0,u.emit("xhr-resolved",[],t)),d.inPlace(t,w,"fn-",c)}function i(t){v.push(t),h&&(g=-g,b.data=g)}function a(){for(var t=0;t<v.length;t++)r([],v[t]);v.length&&(v=[])}function c(t,e){return e}function s(t,e){for(var n in t)e[n]=t[n];return e}t(5);var f=t("ee"),u=f.get("xhr"),d=t(17)(u),l=NREUM.o,p=l. XHR,h=l.MO,m="readystatechange",w=["onload","onerror","onabort","onloadstart","onload end","onprogress","ontimeout"],v=[];e.exports=u;var y=window.XMLHttpRequest=function(t){var e=new p(t);try{u.emit("new-xhr",[e],e),e.addEventListener(m,o,!1)}catch(n){try{u.emit ("internal-error",[n])}catch(r){}}return e};if(s(p,y),y.prototype=p.prototype,d.inPlace(y.p rototype,["open","send"],"-xhr-",c),u.on("send-xhr-start",function(t,e){r(t,e),i(e)}),u.on("open-xhr-start",r),h){var g=1,b=document.createTextNode(g);new h(a).observe(b,{characterData:!0})}else f.on("fn-end",function(t){t[0]&&t[0].type===m||a()})},{}],10:[function(t,e,n){function r(t){var e=this.params,n=this.metrics;if(!this.ended){this. ended=!0;for(var r=0;r<d;r++)t.removeEventListener(u[r],this.listener,!1);if(!e.aborted){if(n.duration=(n ew Date).getTime()-this.startTime,4===t.readyState){e.status=t.status ;var i=o(t,this.lastSize);if(i&&(n.rxSize=i),this.sameO rigin){var a=t.getResponseHeader("X-NewRelic-App-Data");a&&(e.cat=a.split(", ").pop())}}else e.status=0;n.cbTime=this.cbTime,f.emit("xhr-done",[t],t),c("xhr",[e,n,this.startTime])}}}function o(t,e){var n=t.responseType;if("json"===n&&null!==e)return e;var r="arraybuffer"===n||"blob"===n||"json"===n?t.resp onse:t.responseText;return h(r)}function i(t,e){var n=s(e),r=t.params;r.host=n.hostname+":"+n.port,r.p athname=n.pathname,t.sameOrigin=n.sameOrigin}var a=t("loader");if(a.xhrWrappable){var c=t("handle"),s=t(11),f=t("ee"),u=["load","error","abort","timeout"],d=u.length,l=t("id"),p=t(14),h=t(13),m=window.XML HttpRequest;a.features.xhr=!0,t(9),f.on("new-xhr",function(t){var e=this;e.totalCbs=0,e.called=0,e.cbTime=0,e.end=r, e.ended=!1,e.xhrGuids={},e.lastSize=null,p&&(p>34| |p<10)||window.opera||t.addEventListener("progress ",function(t){e.lastSize=t.loaded},!1)}),f.on("ope n-xhr-start",function(t){this.params={method:t[0]},i(this,t[1]),this.metrics={}}),f.on("open-xhr-end",function(t,e){"loader_config"in NREUM&&"xpid"in NREUM.loader_config&&this.sameOrigin&&e.setRequest Header("X-NewRelic-ID",NREUM.loader_config.xpid)}),f.on("send-xhr-start",function(t,e){var n=this.metrics,r=t[0],o=this;if(n&&r){var i=h(r);i&&(n.txSize=i)}this.startTime=(new Date).getTime(),this.listener=function(t){try{"abo rt"===t.type&&(o.params.aborted=!0),("load"!==t.ty pe||o.called===o.totalCbs&&(o.onloadCalled||"funct ion"!=typeof e.onload))&&o.end(e)}catch(n){try{f.emit("internal-error",[n])}catch(r){}}};for(var a=0;a<d;a++)e.addEventListener(u[a],this.listener,!1)}),f.on("xhr-cb-time",function(t,e,n){this.cbTime+=t,e?this.onload Called=!0:this.called+=1,this.called!==this.totalC bs||!this.onloadCalled&&"function"==typeof n.onload||this.end(n)}),f.on("xhr-load-added",function(t,e){var n=""+l(t)+!!e;this.xhrGuids&&!this.xhrGuids[n]&&(this.xhrGuids[n]=!0,this.totalCbs+=1)}),f.on("xhr-load-removed",function(t,e){var n=""+l(t)+!!e;this.xhrGuids&&this.xhrGuids[n]&&(delete this.xhrGuids[n],this.totalCbs-=1)}),f.on("addEventListener-end",function(t,e){e instanceof m&&"load"===t[0]&&f.emit("xhr-load-added",[t[1],t[2]],e)}),f.on("removeEventListener-end",function(t,e){e instanceof m&&"load"===t[0]&&f.emit("xhr-load-removed",[t[1],t[2]],e)}),f.on("fn-start",function(t,e,n){e instanceof m&&("onload"===n&&(this.onload=!0),("load"===(t[0]&&t[0].type)||this.onload)&&(this.xhrCbStart=(new Date).getTime()))}),f.on("fn-end",function(t,e){this.xhrCbStart&&f.emit("xhr-cb-time",[(new Date).getTime()-this.xhrCbStart,this.onload,e],e)})}},{}],11:[function(t,e,n){e.exports=function(t){var e=document.createElement("a"),n=window.location,r= {};e.href=t,r.port=e.port;var o=e.href.split("://");!r.port&&o[1]&&(r.port=o[1].split("/")[0].split("@").pop().split(":")[1]),r.port&&"0"!==r.port||(r.port="https"===o[0]?"443":"80"),r.hostname=e.hostname||n.hostname,r.p athname=e.pathname,r.protocol=o[0],"/"!==r.pathname.charAt(0)&&(r.pathname="/"+r.pathname);var i=!e.protocol||":"===e.protocol||e.protocol===n.pr otocol,a=e.hostname===document.domain&&e.port===n. port;return r.sameOrigin=i&&(!e.hostname||a),r}},{}],12:[function(t,e,n){function r(){}function o(t,e,n){return function(){return i(t,[(new Date).getTime()].concat(c(arguments)),e?null:this,n),e?void 0:this}}var i=t("handle"),a=t(15),c=t(16),s=t("ee").get("trace r"),f=NREUM;"undefined"==typeof window.newrelic&&(newrelic=f);var u=["setPageViewName","setCustomAttribute","setErrorHa ndler","finished","addToTrace","inlineHit"],d="api-",l=d+"ixn-";a(u,function(t,e){f[e]=o(d+e,!0,"api")}),f.addPageAction=o(d+"addPageAct ion",!0),f.setCurrentRouteName=o(d+"routeName",!0) ,e.exports=newrelic,f.interaction=function(){retur n(new r).get()};var p=r.prototype={createTracer:function(t,e){var n={},r=this,o="function"==typeof e;return i(l+"tracer",[Date.now(),t,n],r),function(){if(s.emit((o?"":"no-")+"fn-start",[Date.now(),r,o],n),o)try{return e.apply(this,arguments)}finally{s.emit("fn-end",[Date.now()],n)}}}};a("setName,setAttribute,save,ignore,onEnd, getContext,end,get".split(","),function(t,e){p[e]=o(l+e)}),newrelic.noticeError=function(t){"string "==typeof t&&(t=new Error(t)),i("err",[t,(new Date).getTime()])}},{}],13:[function(t,e,n){e.exports=function(t){if("string"= =typeof t&&t.length)return t.length;if("object"==typeof t){if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer&&t.byteLength)return t.byteLength;if("undefined"!=typeof Blob&&t instanceof Blob&&t.size)return t.size;if(!("undefined"!=typeof FormData&&t instanceof FormData))try{return JSON.stringify(t).length}catch(e){return}}}},{}],14:[function(t,e,n){var r=0,o=navigator.userAgent.match(/Firefox[\/\s](\d+\.\d+)/);o&&(r=+o[1]),e.exports=r},{}],15:[function(t,e,n){function r(t,e){var n=[],r="",i=0;for(r in t)o.call(t,r)&&(n[i]=e(r,t[r]),i+=1);return n}var o=Object.prototype.hasOwnProperty;e.exports=r},{}],16:[function(t,e,n){function r(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,o=n-e||0,i=Array(o<0?0);++r<oi[r]=t[e+r];return i}e.exports=r},{}],17:[function(t,e,n){function r(t){return!(t&&t instanceof Function&&t.apply&&!t[a])}var o=t("ee"),i=t(16),a="nr@original",c=Object.prototy pe.hasOwnProperty,s=!1;e.exports=function(t,e){fun ction n(t,e,n,o){function nrWrapper(){var r,a,c,s;try{a=this,r=i(arguments),c="function"==ty peof n?n(r,a):n||{}}catch(f){l([f,"",[r,a,o],c])}u(e+"start",[r,a,o],c);try{return s=t.apply(a,r)}catch(d){throw u(e+"err",[r,a,d],c),d}finally{u(e+"end",[r,a,s],c)}}return r(t)?te||(e=""),nrWrapper[a]=t,d(t,nrWrapper),nrWrapper)}function f(t,e,o,i){o||(o="");var a,c,s,f="-"===o.charAt(0);for(s=0;s<e.length;s++)c=e[s],a=t[c],r(a)||(t[c]=n(a,f?c+o,i,c))}function u(n,r,o){if(!s||e){var i=s;s=!0;try{t.emit(n,r,o)}catch(a){l([a,n,r,o])}s=i}}function d(t,e){if(Object.defineProperty&&Object.keys)try{v ar n=Object.keys(t);return n.forEach(function(n){Object.defineProperty(e,n,{g et:function(){return t[n]},set:function(e){return t[n]=e,e}})}),e}catch(r){l([r])}for(var o in t)c.call(t,o)&&(e[o]=t[o]);return e}function l(e){try{t.emit("internal-error",e)}catch(n){}}return t||(t=o),n.inPlace=f,n.flag=a,n}},{}],ee:[function(t,e,n){function r(){}function o(t){function e(t){return t&&t instanceof r?t:t?s(t,c,i):i()}function n(n,r,o){if(!l.aborted){t&&t(n,r,o);for(var i=e(o),a=h(n),c=a.length,s=0;s<c;s++)a[s].apply(i,r);var f=u[y[n]];return f&&f.push([g,n,r,i]),i}}function p(t,e){v[t]=h(t).concat(e)}function h(t){return v[t]||[]}function m(t){return d[t]=d[t]||o(n)}function w(t,e){f(t,function(t,n){e=e||"feature",y[n]=e,e in u||(u[e]=[])})}var v={},y={},g={on,emit:n,get:m,listeners:h,context:e,buffer:w,abort :a,aborted:!1};return g}function i(){return new r}function a(){(u.api||u.feature)&&(l.aborted=!0,u=l.backlog= {})}var c="nr@context",s=t("gos"),f=t(15),u={},d={},l=e.ex ports=o();l.backlog=u},{}],gos:[function(t,e,n){function r(t,e,n){if(o.call(t,e))return t[e];var r=n();if(Object.defineProperty&&Object.keys)try{re turn Object.defineProperty(t,e,{value:r,writable:!0,enu merable:!1}),r}catch(i){}return t[e]=r,r}var o=Object.prototype.hasOwnProperty;e.exports=r},{}],handle:[function(t,e,n){function r(t,e,n,r){o.buffer([t],r),o.emit(t,e,n)}var o=t("ee").get("handle");e.exports=r,r.ee=o},{}],id:[function(t,e,n){function r(t){var e=typeof t;return!t||"object"!==e&&"function"!==e?-1:t===window?0:a(t,i,function(){return o++})}var o=1,i="nr@id",a=t("gos");e.exports=r},{}],loader:[function(t,e,n){function r(){if(!b++){var t=g.info=NREUM.info,e=d.getElementsByTagName("scri pt")[0];if(setTimeout(f.abort,3e4),!(t&&t.licenseKey&&t.a pplicationID&&e))return f.abort();s(v,function(e,n){t[e]||(t[e]=n)}),c("mark",["onload",a()],null,"api");var n=d.createElement("script");n.src="https://"+t.agent,e.parentNode.insertBefore(n,e)}}func tion o(){"complete"===d.readyState&&i()}function i(){c("mark",["domContent",a()],null,"api")}function a(){return(new Date).getTime()}var c=t("handle"),s=t(15),f=t("ee"),u=window,d=u.docum ent,l="addEventListener",p="attachEvent",h=u.XMLHt tpRequest,m=h&&h.prototype;NREUM.o={ST:setTimeout, CT:clearTimeout,XHR:h,REQ:u.Request,EV:u.Event,PR: u.Promise,MO:u.MutationObserver},t(12);var w=""+location,v={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net",agent:"js-agent.newrelic.com/nr-998.min.js"},y=h&&m&&m[l]&&!/CriOS/.test(navigator.userAgent),g=e.exports={offset:a() ,origin:w,features:{},xhrWrappable:y};d[l]?(d[l]("DOMContentLoaded",i,!1),u[l]("load",r,!1))d[p]("onreadystatechange",o),u[p]("onload",r)),c("mark",["firstbyte",a()],null,"api");var b=0},{}]},{},["loader",2,10,4,3]);</script>
<script>
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] || ''
);
}
</script>
</head>

<body>
Hello <script>document.write(getURLParameter('country')) </script> user, you just won!
<script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={" beacon":"bam.nr-data.net","licenseKey":"a4aa585abd","applicationID ":"14664203","transactionName":"bgZTZEEEWUNWWkNZDl dMZEJaSlFfRUxaHwBTAkkeQw1H","queueTime":0,"applica tionTime":38,"atts":"QkFQEgkeSk0=","errorBeacon":" bam.nr-data.net","agent":""}</script></body>

</html>

1. Add that to your page.
2. Make sure there are no other scripts interferring with it.
3. Set up your campaigns and visit the landing page from your Voluum URL. Which is something like: http://volummurl.com/?damse92311-421421mf-421421-dasda

It should display your country
It works i was checking from the LP link :3


12-16-2016 03:11 PM #16 madjunior (Member)

Guys, it is possible to display it on a pop alert?


12-16-2016 03:53 PM #17 dabrostyles (Member)

If you mean displaying Voluum parameters in an entry alert, yes it works for me.


12-17-2016 01:24 AM #18 erikgyepes (Moderator)

Guys, it is possible to display it on a pop alert?
Yes, you can display it anywhere on the lander.

Here is how would you do it for the vanilla JS alert:

alert("Your current location is ""+getURLParameter('city')+");


Home > Tracking Campaigns > Voluum