Hi,
How can I get the URL parameters when calling a js file saved in web/scripts?
Thanks,
Tal
Hi,
How can I get the URL parameters when calling a js file saved in web/scripts?
Thanks,
Tal
Hi Tal,
Try this:
request.query.PARAMETERNAME
Where PARAMETERNAME is the actual parameter.
Mark
this is not working:
var clk = request.query.clk;
var userAcquisitionRedirectsItem = new UserAcquisitionRedirectsItem( { adNetwork : 'archy', appId : 'appId', clickId : clk, country : 'IL', userAdvertisingId : '1234-afjad-test', userIp : '192.168.1.144' });
after this code I see in the table all the values, except for clickId which is empty
How do you send the parameter in the URL?
Is it a GET or POST request?
I’m pasting this url in a browser
Well, I just did a simple test and it is working as expected. Here’s a URL to try:
Here’s the source code of the script:
exports.run = function ( request, response )
{
response.send( "value of the test parameter is: " + request.query.test );
};
It seems like the problem would be somewhere in your code.
Regards,
Mark
thanks mark, found my error