Dynamically Populate Random Number Within DTM | Community
Skip to main content
davidb98884514
New Participant
October 16, 2015
Solved

Dynamically Populate Random Number Within DTM

  • October 16, 2015
  • 1 reply
  • 1412 views

Hello,

I've been asked to dynamically populate a random number in the img src below:

    
<img src='http://h.nexac.com/e/a-858/s-1486/c-705/g-2423.xgi?pkey=xbue89gtzpg16&chpcm=&chpsg=&chpcr=&chpck=&rand=INSERTRANDOMNUMBER&chpth=' width='1' height='1' border='0'>

 

I've added this tag within DTM as a "Javascript / Third Party Tags" on one of our pages, but I do not know how to go about populating a random number for the rand URL parameter. Would I create a custom script data element to generate a random number?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Rahsing

Hi David,

That's the way I'd go about it. Create a data element with a custom script in it to feed it the random number. You can then call this data element in your code.

Kind Regards

Rahul

1 reply

Rahsing
RahsingAccepted solution
New Participant
October 16, 2015

Hi David,

That's the way I'd go about it. Create a data element with a custom script in it to feed it the random number. You can then call this data element in your code.

Kind Regards

Rahul