Dynamize Picture

Once created driven by our AdServer, images change based on established parameters ( Geolocation, weather, date/time, cookies, retargeting …).

To dynamize pictures you have to follow this way:

First Step

In the panel Design view, use the Element tool to create an Image element. Place the picture where you want inside your banner. Keep in mind the element’s name which is displayed.

Second Step

In the panel Code view, go to the HTML part and find your picture : it’s a <gwd-image> tag with an id which has the same value that you see before in the panel Design view.

Third Step

Still in the panel Code view, go to the JS part and add the following line of javascript after initializing your data .

document.getElementById(element).setAttribute('source', data);

  • element: The id of your image element you have to write, example: gwd-image_1
  • data: The data that will be sent in this element

Example

Download the example

To test if your dynamization work, you have to click on the preview button.