My team wants to have have a landing page that will know what store location the customer should go to based on an ID in the url.
Store Name
Address
Phone
The leads that get here from Market emails will be easy to do. The ones that get here through 3rd party sites... How would I do this? I know I need a lookup table but now I need some advice on my best move.
Thanks!
Solved! Go to Solution.
There can be 2 main options...
Option 1:
Using a webservice for 'lookup' and AJAX for rendering in the landing page.
You can use the example from
w3schools.com/php/php_ajax_livesearch.asp
and retrofit it to your needs.
The 'lookup table' is stored in a xml file in this case. w3schools.com/php/links.xml
There is a 'web service' which accepts a parameter 'q' and returns the matching records. Like,
w3schools.com/php/livesearch.php?q=javas
and
w3schools.com/php/livesearch.php?q=dat
and so on.
In your case, it will be the id from the url of the landing page.
On your Marketo landing page, you will write AJAX code which will,
a> Grab the id from the url
b> Query the 'web service' with that id. The webservice will return the data looked up for that id.
c> The AJAX code will parse the xml returned and display on your landing page at appropriate places.
Instead of xml, you can use JSON object too.
Pros:
1> If the lookup data is sensitive, this might be the way to go.
Cons:
1> You will need a webserver with server side code development in this case php.
Option 2:
Using Javascript Array / Object
If the 'look up table' is not too big and not too sensitive, you can have it coded as a javascript array or object on the landing page itself and look up the values directly from the array. Thus your landing page will be self-sufficient.
Cons:
1> Do not use if the look up data is sensitive. View html source can show the entire look up table.
2> If this lookup table is used in several landing pages and there are 'frequent' changes, you will have to modify each landing page separately. But you can potentially use Marketo tokens or files to avoid it.
Hope this helps
Rajesh