I am trying to access dynamic content within a Cloud Page landing page when the landing page is sent through as a Mobile Push message.

My goal would be to use DeviceId as a lookup to other data extensions which will in turn allow me to populate the landing page with dynamic content.

For example, if I put the following into a landing page, I would expect to be able to dynamically get the end user's first name:

%%[VAR @fname SET @fname=Lookup("Customer_demo", "first_name", "DeviceId", DeviceID)]%% 

Hello %%=v(@fname)=%%! 

When delivered through Mobile Push, I get a 500 error. If, however, I do the same type of lookup and send it as an alert through Mobile Push, it will work as expected.

Is there a way to pass a parameter to a landing page through a Mobile Push message?

1 Answer 1


I don't believe %%DeviceID%% is able to be used on Landing Pages.

If you have the customer's DeviceID on record, you can incorporate the DeviceID into the Landing Page URL as a parameter:

VAR @landingpage, @deviceid, @messageURL
SET @landingpage = "https://pub.exacttarget.com/myLandingPage"
SET @deviceid = Lookup("Customer_demo", "DeviceId", "SubscriberKey", SubscriberKey)
SET @messageURL = concat(@landingpage,'?devID=',@deviceid)

And then retrieve the DeviceID (devID) on the Landing Page using the following:

VAR @fname,@deviceID
SET @deviceID = QueryParameter("devID")
SET @fname = Lookup("Customer_demo", "first_name", "DeviceId", @deviceID)
Hello %%=v(@fname)=%%! 

Reference: QueryParameter

If you are concerned about passing readable DeviceIDs that people could alter, you could use Base64Encode and Base64Decode to encode the information so it's less readable.

Passing a 2nd validation value - such as SubscriberKey - would further secure your landing page.

  • Cameron, thank you for the response. The challenge I am facing is that I do not think I am able to configure the URL with a query parameter with regards to Mobile Push (though I can with and email or SMS). When I set up the landing page in Cloud Pages, I am able to reference the landing page when I set up the Mobile Push message, but I do not think (or am unsure how to) I can pass query parameters with it.
    – Rob
    Mar 14, 2017 at 0:24
  • Happy to help @Rob. The code in my first example shows how to Concat values together to create unique/personalised URLs. The example I created uses a unique URL Parameter (devID) to send customer values, however this could be Contact/Subscriber Key, or any other unique customer value you have. Have a look at the AMPScript documentation to start with, and let us know if you have further questions. Mar 14, 2017 at 0:50
  • Thanks Cameron, my problem was i was unsure of where to put that top block of AMPscript since it was an outbound push message. I was able to figure it out. I edited the URL of my Cloud Page to include a query parameter to include deviceid and use the QueryParameter function you recommended and use it in the landing page.
    – Rob
    Mar 14, 2017 at 2:41
  • Thanks @Rob, I'm glad my answer was helpful and it came to a positive resolution. Take a look into the Base64Encode and sending a 2nd validation value (such as SubscriberKey), as this will add more security to your landing page and prevent people from 'mining' it for customer data. Mar 14, 2017 at 4:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .