-
1. Re: Dynamic content based on query string value
Bob at Elemental Marketing Apr 5, 2018 11:43 AM (in response to Brianna Young)If I get what you're trying to do correctly, you can do exactly what you did in the past. Except you don't have to use Dynamic Content. Here's the gist of it:
- put the logo's URL in an Eloqua field (I assume a CDO field works best for you as its related to a specific offer and not a contact)
- Using JS/WDL and the User ID, look up the Eloqua Contact Record and grab the value from that specific field
- Now use JS to paste the value into the page's HTML code of the image, i.e. <img src = "yourvaluehere">
- Have a fallback url to show a general image in case no User ID is passed
I think this should work. Does this help?
-
2. Re: Dynamic content based on query string value
Brianna Young Apr 5, 2018 2:52 PM (in response to Bob at Elemental Marketing)That does help, thank you! I wasn't sure if I could put an entire image URL into a field. I'll give this a try and report back. Thank you!!
-
3. Re: Dynamic content based on query string value
Brianna Young Apr 6, 2018 5:10 PM (in response to Bob at Elemental Marketing)Hi Bob - I think I'm getting closer, but I'm getting stuck on how to use JS to paste the value into the page's HTML code. My Javascript knowledge is limited, so I may need to get outside help. When we did this previously, we were just inserting text from a field onto the page. Is there a simple code snippet for doing this, or would I be better off seeking a JS expert to do this?
Thanks again for your help!
-
4. Re: Dynamic content based on query string value
Bob at Elemental Marketing Apr 16, 2018 7:43 AM (in response to Brianna Young)Hi Brianna,
I wish I could help you, but my JS knowledge is also limited. In this case, to the extent that I'm fairly confident that what I describe is possible with JS, I just don't know how to write it into a script. I don't think it's a very complex piece of JS, but hey, if one doesn't know how to write it, it might as well be Conceptually, the whole JS / WDL script would do the following in order:
- Parse the page URL for the contact's ID
- Use the contact's ID to look up the image URL from that contact's related CDO in Eloqua
- Save that image URL to a variable
- Search the page's HTML for an image with a certain class or ID
- Replace that image's src attribute value with the URL stored in the variable