SOLVED

Landing Page Data Lookup?

Go to solution
Highlighted
Anonymous
Not applicable

Landing Page Data Lookup?

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!

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

Re: Landing Page Data Lookup?

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

http://www.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. http://www.w3schools.com/php/links.xml

There is a 'web service' which accepts a parameter 'q' and returns the matching records. Like,

http://www.w3schools.com/php/livesearch.php?q=javas

and

http://www.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

View solution in original post

12 REPLIES 12
Highlighted
Anonymous
Not applicable

Re: Landing Page Data Lookup?

I think that you can do this with our RTP module, that would be the easiest way.  It's an upgrade but well worth it!

Highlighted

Re: Landing Page Data Lookup?

This is exactly the kind of things that can be done with RTP.

-Greg

Highlighted
Level 10 - Community Moderator

Re: Landing Page Data Lookup?

I don't understand the need for RTP as described.  How big is the lookup table?

Highlighted
Anonymous
Not applicable

Re: Landing Page Data Lookup?

For this landing page it would be 150 stores. So 150 IDs matching name, address and phone.

Highlighted
Level 10 - Community Moderator

Re: Landing Page Data Lookup?

I'd put that in a separate JSON file (Mkto asset) -- or even self-executing JS script file -- and pull it in like Rajesh pointed to. It doesn't sound like the ID nor store info is private.

If you package it as a JS file, you can include the script in the page without needing to deal with any Ajax logic.

Highlighted
Anonymous
Not applicable

Re: Landing Page Data Lookup?

Yep, I like it! Thank you both!

Highlighted
Anonymous
Not applicable

Re: Landing Page Data Lookup?

There is always a need for RTP

Highlighted
Anonymous
Not applicable

Re: Landing Page Data Lookup?

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

http://www.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. http://www.w3schools.com/php/links.xml

There is a 'web service' which accepts a parameter 'q' and returns the matching records. Like,

http://www.w3schools.com/php/livesearch.php?q=javas

and

http://www.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

View solution in original post

Highlighted
Level 10 - Community Moderator

Re: Landing Page Data Lookup?

Yep, I was alluding to your #2 with the lookup table stored in a file asset.