Dynamically Populate Random Number Within DTM

Avatar

Avatar
Validate 25
Level 2
davidb98884514
Level 2

Likes

8 likes

Total Posts

37 posts

Correct reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile

Avatar
Validate 25
Level 2
davidb98884514
Level 2

Likes

8 likes

Total Posts

37 posts

Correct reply

0 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Boost 5
Boost 3
View profile
davidb98884514
Level 2

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
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
Rahsing
Level 6

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)