Dynamically Populate Random Number Within DTM

Avatar

Avatar

davidb98884514

Avatar

davidb98884514

davidb98884514

15-10-2015

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=&ra...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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Rahsing

Avatar

Rahsing

Rahsing

15-10-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

Answers (0)